#13467 [29.x[All-e]Payment Discount with Prices Incl. VAT provides unexpected results in the Spanish version
Spanish version payment discount calculation corrected for prices including VAT by accounting for payment discount amount when recalculating VAT base.
- 3files
- 2AL files
- 2objects
Pull request · merged into releases/29.x (BC29) on 2026-11-12 by sanjmaurya · 3 files (+170 -1), 2 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Payment discounts now correctly reflected in sales and purchase totals when prices include VAT
- VAT-inclusive branch now subtracts payment discount amount during VAT base recalculation
- VAT-exclusive calculations left unchanged to preserve existing behavior
- Addresses issue when VAT base discount percentage and EC amount are zero
- Comprehensive test coverage added for payment discount scenarios
- Behaviour changes for users or extensions.
AL objects touched
- Table 290 “VAT Amount Line”, Base Application (ES layer): modified
- Codeunit 70 “Purch.-Calc.Discount”, Base Application (ES layer): modified
Context
- Work items: AB#657334
- Labels: Team: Finance
- Systems: finance, purchasing
- From the description: “Subtract “Pmt. Discount Amount” when recalculating the VAT base in the VAT-inclusive branch.”
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Application Testing Example to Test Purchase Invoice Discounts — possibly related: touches Codeunit 70 “Purch.-Calc.Discount”
- Record special sales prices and discounts — possibly related: Documents sales price and discount calculation, relevant to payment discounts with prices including VAT. (model-linked)
Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).