Skip to content

[Main]Customer Direct Debit Payment Slip – SEPA File Generation Fails and Credit Memo Is Processed Incorrectly When Invoice and Credit Memo Exist for the Same Customer in the French version. - #11596

Draft
Shikhverma wants to merge 5 commits into
mainfrom
bugs/Bug-644993-main-Cust-Pmt-Slip-SEPA-File-Fails-Cr-Memo-Process-Incorrect
Draft

Shikhverma wants to merge 5 commits into
mainfrom
bugs/Bug-644993-main-Cust-Pmt-Slip-SEPA-File-Fails-Cr-Memo-Process-Incorrect

Conversation

@Shikhverma

@Shikhverma Shikhverma commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Fixes: AB#644993

Issue:

When a customer had an open invoice and an unapplied credit memo, the Customer Payment Slip (FR) handled them incorrectly:

SEPA Direct Debit export failed with errors such as "You cannot export a SEPA customer payment that is applied to multiple documents" and "unapplied lines not allowed" whenever a credit memo was collected alongside an invoice for the same customer.
Posting produced the wrong result — the credit memo was posted as a separate Refund entry instead of being netted against the invoice, so the customer was debited the gross invoice amount rather than the net balance, and entries were left open.

Root cause:

Posting side (Payment Management FR): settlement amounts were always taken as Abs(...) regardless of the applied document type, so a credit memo was never subtracted. There was no logic to net a credit memo into the invoice it shared collection with, so each document posted on its own line and the credit memo became a refund.
SEPA export side (PaymentMgt Subscribers FR): CheckPaymentLine required every collected line to resolve to a single invoice ledger entry. Credit-memo lines, and invoice+credit-memo combinations under one Applies-to ID, tripped the "multiple documents" / "unapplied lines" validations. The transfer amount also used the raw Credit Amount without deducting the credit memo, so the exported amount would have been wrong even if validation passed.

Solutions:

Fixed SEPA customer payment slip processing for credit memo scenarios by correcting posting document type and amount handling, validating invoice/credit memo applications, and ensuring the correct direct debit mandate and bank account are retrieved.

…Bug-644993-main-Cust-Pmt-Slip-SEPA-File-Fails-Cr-Memo-Process-Incorrect
@Shikhverma Shikhverma added the Team: Finance GitHub request for Finance area label Sep 18, 2026
@github-actions github-actions Bot added this to the Version 30.0 milestone Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team: Finance GitHub request for Finance area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant