[29.0] [CH] When posting with FCY, VAT G/L Entry stores VAT base amount in Source Currency Amount instead of VAT amount - #11265
[29.0] [CH] When posting with FCY, VAT G/L Entry stores VAT base amount in Source Currency Amount instead of VAT amount#11265dcenic wants to merge 1 commit into
Conversation
…res VAT base amount in Source Currency Amount instead of VAT amount
Good Sense Reviewer - Round 1Recommendation: AcceptWhat this PR doesThis change stops the CH posting code from recalculating Source Currency Amount for system-created G/L entries. That lets VAT split entries keep the source-currency amount that was already calculated for the VAT amount. The guard is narrow: normal non-payable account entries can still receive the net-of-VAT source amount, while system-created VAT entries keep the amount passed into InitGLEntry. The added test posts a foreign-currency purchase journal line and checks both the expense entry and the VAT entry, so it covers the reported posting path. Problem-solution fitFit: Strong The reported issue is that a foreign-currency VAT G/L entry stores the VAT base in Source Currency Amount instead of the VAT amount. The diff addresses the overwrite that causes this and adds a regression test for the affected purchase posting scenario. SuggestionsNone. Risk assessment and necessityRisk: This is a CH finance posting path in GenJnlPostLine.Codeunit.al, so an incorrect change could persist wrong source-currency amounts on VAT or G/L entries. The code change is small, has no public API or event signature change, and leaves non-system-created account-entry behavior in place. Necessity: The change is needed because the VAT split entry already receives the correct source VAT amount, and recalculating from the full journal amount can store the base amount instead. The scope is appropriate: one posting guard plus a focused regression test.
|
What & why
During initialization of a system-generated G/L Entry, not recalculating source currency amounts, as it already carries the correct source currency amount.
Linked work
Fixes AB#649596
How I validated this
What I tested and the outcome (required — be specific: scenarios, commands, screenshots for UI changes)
Automated test to cover the repro steps
Risk & compatibility