Bug 637507: [master] [Report 743 VAT Reconciliation Report] Incorrect VAT Base and Amount when using Non-Deductible VAT#9260
Conversation
Ports changes from ADO bug 637506 (VAT Reconciliation Report - Non-Deductible VAT).
Copilot PR ReviewIteration 1 · Outcome: completed
Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630 Orchestrator pre-filter (13 file(s) excluded)
Findings produced by the Copilot CLI agent against BCQuality at |
Agentic PR Review - Round 1Recommendation: Request ChangesWhat this PR doesThis PR adds a request-page option to Report 743 so users can keep the current full VAT amounts or show only the deductible VAT part. The default enum value keeps the existing include-NDV behavior. The arithmetic uses the right VAT Entry fields for the two built-in options, and the tests cover several purchase, journal, reverse charge, and sales paths. The remaining issue is that the report still calculates from each SuggestionsS1 - Deduplicate VAT entries before summing S2 - Assert totals for both amount types S3 - Make the option enum closed Risk assessment and necessityRisk: This is a VAT report change, so wrong values can affect tax review and reconciliation. The change does not add or move event subscribers, so there is no publisher dependency to verify. The default option is backward compatible, but the report totals remain risky until duplicated VAT Entry links are handled. Necessity: The linked Bug has a concrete repro for Non-Deductible VAT in Report 743, and the scenario is important enough to fix. Adding a deductible-only option is a reasonable small scope, but the fix must also prove that 75% NDV totals reconcile and that the old include-NDV option still behaves as intended.
|
| GLAccNo: Code[20]; | ||
| DocNo: Code[20]; | ||
| begin | ||
| // [SCENARIO 637506] Purchase invoice with 100% Non-Deductible VAT reports 0 deductible base and VAT with "Deductible VAT Only" |
There was a problem hiding this comment.
Do you miss the AI tag or you just did not use the AL test agent/skill?
There was a problem hiding this comment.
I didn't use the skill I think.
ISSUE:
The VAT Reconciliation Report always includes the Non-Deductible VAT in the reported base and VAT amounts, with no way to report the deductible portion only.
SOLUTION:
Added a "VAT Amount Type" option to the report letting the user choose between including Non-Deductible VAT or reporting deductible VAT only.
TESTS:
Added scenarios covering both options.
Fixes AB#637507