Skip to content

ability to duplicate a transaction + manual upload from external source#50

Open
mdelpire wants to merge 3 commits intovas3k:mainfrom
mdelpire:main
Open

ability to duplicate a transaction + manual upload from external source#50
mdelpire wants to merge 3 commits intovas3k:mainfrom
mdelpire:main

Conversation

@mdelpire
Copy link
Copy Markdown

Hello,

  1. Abitlity to duplicate a single transaction. If several transactions are selected, it is not possible. this useful for recurring transaction (like monthly payment)
  2. allow a manual upload from an external source. For instance if I have a scanner that can scan to a folder on the network, I can push the invoice directly to the manual upload folder and process it by clicking on the button on the top left corner. This is only available in selfhosted mode.

@adryserage
Copy link
Copy Markdown

Code Review Analysis 🔍

This PR adds transaction duplication and manual upload functionality. Here's my analysis:

✅ What looks good

  • The duplicate transaction feature is a useful addition for recurring expenses
  • Manual upload from external sources adds flexibility

⚠️ Concerns to address

  1. Large file changes (+605/-536 lines): This is a significant change. Consider breaking it down into smaller PRs:

    • PR 1: Transaction duplication
    • PR 2: Manual upload feature
      This makes review easier and reduces risk.
  2. Security consideration: For the manual upload API endpoint, ensure:

    • Proper authentication/authorization checks
    • Input validation for uploaded data
    • Rate limiting to prevent abuse
  3. Missing tests: For features handling financial data, tests are important. Consider adding:

    • Unit tests for the duplication logic
    • Integration tests for the upload endpoint

💡 Suggestions

  1. Duplicate transaction UX: When duplicating, consider:

    • Clearing the date field so user must set a new date
    • Adding a visual indicator that it's a duplicate
    • Option to duplicate with or without attachments
  2. Manual upload validation:

    • Validate required fields before saving
    • Show preview of imported data before committing

📊 Summary

Good feature additions, but consider splitting into smaller PRs and adding tests for better maintainability.


Automated review by Aetheris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants