#11026 Service Line CalcVATAmountLines: count VAT Difference once and clear filters before OnAfterCalcVATAmountLines
Service Line CalcVATAmountLines now counts VAT differences correctly and clears filters before firing the OnAfterCalcVATAmountLines event, matching the behavior of Sales and Purchase lines.
- 6files
- 2AL files
- 1objects
Pull request · merged into main (BC30) on 2026-11-18 by Franco111000 (community contribution) · 6 files (+656 -6), 2 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Fixed VAT difference being counted twice in the accumulation by removing redundant term
- Added VATAmountLine.Reset() before OnAfterCalcVATAmountLines event to ensure unfiltered records
- Aligns Service Line implementation with Sales Line and Purchase Line behavior
- Applied fix to both W1 and NA table layers
- Added two regression tests covering VAT difference counting and filter clearing scenarios
- Behaviour changes for users or extensions.
AL objects touched
- Table 5902 “Service Line”, Base Application: modified
Context
- Fixes: #9102 [Bug]: Service Line CalcVATAmountLines double-counts VAT Difference and leaks filters onto OnAfterCalcVATAmountLines (closed)
- Work items: AB#659639
- Labels: ADO: Sync, From Fork, Ownership: Manual, Team: Finance
- Systems: service
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Purchase and Sales Quantity Power BI Report — possibly related: touches Table 5902 “Service Line”
- Scheduled Receipt Power BI Report — possibly related: touches Table 5902 “Service Line”
- Check amounts on purchase invoices and credit memos — possibly related: Documents amount checking on service documents, related to VAT calculation on service lines. (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).