#13414 [Main]Payment Discount with Prices Incl. VAT provides unexpected results in the Spanish version
In the Spanish version, when Prices Including VAT is on, the VAT base recalculation now subtracts the payment discount amount. Payment discounts are now reflected in sales and purchase totals and statistics. VAT-exclusive calculations are unchanged.
- 3files
- 2AL files
- 2objects
Pull request · merged into main (BC30) on 2026-11-12 by sanjmaurya · 3 files (+170 -1), 2 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Fixes payment discount calculations when Prices Including VAT setting is enabled
- Corrects VAT base recalculation by subtracting payment discount amount
- Issue only affected Spanish localization with specific VAT settings (zero base discount and EC amount)
- Adds test coverage for payment discount scenarios with VAT-inclusive pricing
- Does not affect VAT-exclusive calculations
- 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#657151
- Labels: Team: Finance
- Systems: finance, purchasing
- From the description: “Payment discounts are not correctly reflected in sales and purchase totals and statistics when the VAT base discount percentage and EC amount are zero.”
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”
- Set up prices and discounts — possibly related: Documents prices and discounts setup including VAT handling in purchase calculations. (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).