Skip to content

[main] Allocation Accounts with Invoice Discount produces wrong posted entries in Sales and Purchases documents in the Spanish version. - #11645

Draft
Shikhverma wants to merge 3 commits into
mainfrom
bugs/Bug-650386-main-AllocationwithInvDiscproducewrongpostedentriesSaleandPurch
Draft

Shikhverma wants to merge 3 commits into
mainfrom
bugs/Bug-650386-main-AllocationwithInvDiscproducewrongpostedentriesSaleandPurch

Conversation

@Shikhverma

@Shikhverma Shikhverma commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Fixes: AB#650386

Issue:

When posting Sales/Purchase documents using Allocation Accounts in the Spanish (ES) version, invoice discount was being applied twice, producing incorrect posted entries.

Root Cause:

The allocation logic used the Amount field to derive AmountToAllocate. On ES documents, Amount already reflects the invoice discount applied at the line level. Passing this discounted value into the allocation calculation caused the discount percentage to be applied a second time during allocation, understating the allocated/posted amounts.

Solution:

Changed the source field for AmountToAllocate from Amount to Line Amount (the pre-discount value), so invoice discount is applied exactly once. Allocation Accounts now produce correct posted entries in Sales and Purchase documents.

@Shikhverma Shikhverma added the Team: Finance GitHub request for Finance area label Sep 21, 2026
@github-actions github-actions Bot added this to the Version 30.0 milestone Sep 21, 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