[29.x]-[WHT] Inconsistency with the Payments - #10869
Conversation
Good Sense Reviewer - Round 1Recommendation: Request ChangesWhat this PR doesThe change adds an explicit error when WHT payment posting cannot find a general journal template of type Purchases. The changed branch is the same branch where the WHT posting buffer is skipped today, so the payment still cannot complete and the missing WHT G/L posting is not created. Problem-solution fitFit: Partial The reported scenario is a partial vendor payment with gross-base WHT where posting should create the WHT entries and keep G/L in balance. The change prevents the silent buffer skip, but it does so by failing the posting instead of completing the expected payment and validating the WHT amounts. SuggestionsS1 (🔴 High): Setup error replaces the payment fix S2 (🔴 High): Missing regression test for WHT payment posting Risk assessment and necessityRisk: The touched code is in WithholdingTaxMgmt.Codeunit.al inside vendor payment realization. A wrong change here can leave WHT entries and G/L posting out of sync, especially for partial payments and journal-template setups that do not match the assumed purchase template. Necessity: A fix is required because the scenario affects payment posting and G/L balance. The scope should stay narrow, but it must complete the posting path rather than only replacing the balance error with a setup error.
|
|
Fixes AB#648516