Repository navigation
[Master]-[BE] Intervat XML Report 11307 Does Not Include Non-Deductible VAT Amount Reflected in VAT Statement Preview - #13481
Conversation
Good Sense Reviewer - Round 1Recommendation: AcceptWhat this PR doesThe change preserves Incl. Non Deductible VAT when a Belgian VAT statement line changes to Amount or Base, and still clears it for unsupported amount types. The new condition matches the flag's own validation. The pinned VAT Statement calculation already adds non-deductible VAT for Amount and subtracts it for Base; both Preview and Form/Intervat Declaration use that calculation, including row totaling. The revised positive test now calls Amount Type validation after setting the flag, so it exercises the exact defect and would fail with the old trigger. The added negative test confirms that changing to Unrealized Base still clears the flag. Existing numeric preview coverage verifies Base minus Non Ded. VAT Amount. No correctness blocker was found. Problem-solution fitFit: Strong The change directly fixes the inconsistent validation that silently cleared a supported flag on Base lines. It preserves the existing calculation rules and does not try to compensate for unrelated statement configuration errors. SuggestionsNone. Risk assessment and necessityRisk: VAT declaration amounts are financially sensitive, but the regression surface is narrow: only the Belgian Amount Type validation changes. Amount continues to preserve the flag, Base now preserves it as the flag validation and report calculation already expect, and all other amount types still clear it. No posting logic, ledger entries, field definitions, public signatures, or events change. Sales and Purchase ledger reports use the same VAT Statement calculation. Other country tables are unchanged. The fix does not automatically re-enable flags already cleared or add missing statement rows. Necessity: Without this change, changing or revalidating Base can silently disable the non-deductible VAT adjustment and produce an incorrect declared base. Users must notice the cleared flag and enable it again after choosing Base. Keeping valid statement settings intact is important for reliable VAT reporting, and this targeted trigger change is proportionate.
|
Fixes AB#657370