[Master]-]VAT Settlement G/L Entries Do Not Populate Source Currency Amount and Source VAT Currency Amount After Running Calculate and Post VAT Settlement - #11186
Conversation
Good Sense Reviewer - Round 1Recommendation: Request ChangesWhat this PR doesThe change updates the VAT settlement reports so source currency amounts use LCY values when Additional Reporting Currency is blank, and ACY values when it is set. This matches the reported blank-source-currency problem for the normal settlement paths, but the NO proportional deduction paths still set source amounts from values that do not match the final posted amount. Problem-solution fitFit: Partial The reported scenario is clear and the main approach is needed. The solution is incomplete because one localization can still post source currency amounts that do not match the G/L entry amount in proportional deduction VAT flows. SuggestionsS1 (🔴 High): Use the posted NO settlement amount S2 (🔴 High): Update NO source amount after overwrite S3 (🔴 High): Add VAT settlement posting coverage S4 (🟠 Moderate): Remove the extra AU BOM Risk assessment and necessityRisk: This is a high-risk financial posting area because report 20 creates G/L entries and persists source currency amounts. The NO proportional deduction paths can still write source currency amounts that differ from the final posted amounts, and the AU header change adds a small tooling risk. Necessity: The change is needed because VAT settlement entries should keep source currency values when Additional Reporting Currency is blank. The scope is right, but the NO edge cases and missing posting coverage should be fixed before merge.
|
…lement.Report.al Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Good Sense Reviewer - Round 5Recommendation: Request ChangesWhat this PR doesThe new commit removes the key-unsafe Source Code filter from the RU regression test helper. It does not change the posting logic. The main LCY/ACY source amount fallback is still the right direction for normal VAT settlement entries, but one NO proportional deduction path can still post a source amount calculated from an old line amount. BE and US validation also still fail. Status of previous suggestions
New observations (commits since round 4)None - the new commit only partially addresses S6 by fixing RU. US still has the same validation issue. Risk assessment and necessityRisk: This is still a high-risk financial posting path because report 20 creates G/L entries and stores source currency fields. The remaining NO path can persist a source amount that does not match the final posted amount, and the BE/US builds are still failing. Necessity: The change is needed because VAT settlement entries should keep source currency values when Additional Reporting Currency is blank. The scope is appropriate, but the remaining posting mismatch and validation failures should be fixed before merge.
|
Good Sense Reviewer - Round 6Recommendation: Request ChangesWhat this PR doesThe new commits fix two previous test validation problems: the BE test now declares and uses the settlement document number, and the US helper no longer filters G/L Entry by Source Code. The posting logic did not change. The main LCY fallback still matches the reported VAT settlement problem, but the NO reverse charge proportional deduction branch can still set Source Currency Amount before it overwrites the posted amount. Status of previous suggestions
New observations (commits since round 5)None - the new commits only address previous validation issues. The remaining blockers are carried forward from the earlier review. Risk assessment and necessityRisk: This is still a high-risk financial posting path because report 20 creates G/L entries and writes source currency fields. The remaining NO proportional deduction path can persist a source amount that does not match the final posted amount. No public event or API surface is changed. Necessity: The change is needed because VAT settlement entries should keep source currency values when Additional Reporting Currency is blank. The scope is still appropriate, but the remaining posting mismatch and weak test coverage should be fixed before merge.
|
…Bug-648151-VAT-Settle-GL-Entries-populate-Source-Currency-Values11
|
In the BE report (src/Layers/BE/BaseApp/Finance/VAT/Reporting/CalcandPostVATSettlement.Report.al), BalanceReverseChargeVAT() creates GenJnlLine2 via CreateGenJnlLine(), which correctly routes 'Source Currency Amount' through the new SourceCurrencyAmount(AmountLCY, AmountACY) fallback (so it uses LCY when GLSetup."Additional Reporting Currency" is blank). Immediately after, the code does Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.41.6 |
No simi9lar NO related test found |
Good Sense Reviewer - Round 7Recommendation: Request ChangesWhat this PR doesThe latest code continues the VAT settlement source-currency fix across the localized settlement reports and improves several test helpers. The runtime direction is right, but the remaining test verifier can still pass without proving the settlement entries contain the required source-currency values. Status of previous suggestions
New observations (commits since round 6)None - the remaining blocker is the still-open test coverage issue from the previous round. Risk assessment and necessityRisk: High. VAT settlement writes G/L entries; a weak verifier can allow missing source-currency values to reach posted settlement entries unnoticed. Necessity: The fix is needed so settlement entries keep correct source-currency values when no additional reporting currency is configured, but the test must prove the posted values directly.
|
No NO related test found other cases covered |
Fixes AB#648151