Repository navigation
[29.X]-[BE] Intervat XML Report 11307 Does Not Include Non-Deductible VAT Amount Reflected in VAT Statement Preview - #13484
Conversation
Good Sense Reviewer - Round 1Recommendation: AcceptWhat this PR doesThe change preserves Incl. Non Deductible VAT when a Belgian VAT statement line is validated as Amount or Base, while still clearing it for unsupported amount types. This matches the flag's own validation and the existing VAT Statement calculation: Amount adds non-deductible VAT, and Base subtracts it. Both Preview and the Intervat declaration call that calculation, including through row totaling. The updated test directly exercises the previously failing Amount-to-Base transition, and the new test checks that switching to Unrealized Base still clears the flag. No correctness blocker was found. Problem-solution fitFit: Strong The change fixes the conflicting validation rules that silently removed an explicitly selected flag from Base lines. It uses the existing calculation and export paths without changing formulas or forcing the flag onto lines where it was not selected. SuggestionsNone. Risk assessment and necessityRisk: The affected output is financially sensitive, but the regression surface is limited to one Belgian table-field validation condition. Amount retains its existing behavior, Base now preserves the selected flag, and all unsupported types still clear it. There are no posting changes, new database writes, schema changes, or public procedure or event signature changes. Previously cleared flags are not restored automatically and must be selected again where appropriate. Necessity: Without this fix, changing or revalidating a Base line can silently clear the flag and leave non-deductible VAT in its reported base. The workaround is to select the flag again after setting the amount type and verify the statement configuration before exporting. Aligning the two validation rules is a proportionate fix for this reporting risk.
|
Fixes AB#657372