Skip to content

fix(bank-payments): restore rejected transfers and count duplicate rows - #516

Open
hedon77 wants to merge 1 commit into
Panelica:mainfrom
hedon77:fix/bank-payments-review-followups
Open

hedon77 wants to merge 1 commit into
Panelica:mainfrom
hedon77:fix/bank-payments-review-followups

Conversation

@hedon77

@hedon77 hedon77 commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Addresses the review notes from #511 and #514.

Restore rejected transfers

  • Adds POST /admin/bank-payments/transactions/{transaction}/restore.
  • Restores any rejected transfer that has no imported payment, then reruns the matcher.
  • Adds Rejected to the matching-queue and transaction filters.
  • Shows Restore in the queue only for rejected transfers.
  • Keeps rejected transfers out of the default queue.

Count-aware statement deduplication

  • Identical rows are no longer collapsed just because the same date, amount, currency and reference already exists.
  • The importer counts existing rows and the row position in the statement; a row is a duplicate only when the stored rows already cover that position.
  • This preserves two genuine identical payments and still makes a repeated import idempotent.
  • Adds a fixture and tests for two identical rows, reimport, and one-existing-plus-two-in-file.

Smaller review follow-ups

Tests

  • BankAssignmentTest: 18 passed, 118 assertions.
  • Includes restore, rejected/imported guards, duplicate rows and reimport cases.

Target: DEV first. Production untouched.

This branch has not been deployed

No deployments
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.

1 participant