[29.0]-[WHT] Inconsistency with the Payments - #11142
Conversation
Good Sense Reviewer - Round 1Recommendation: Request ChangesWhat this PR doesThis PR changes the WHT payment posting path so it raises a specific error when no general journal template with type Purchases is found. The reported scenario needs a WHT balancing line and correct realized WHT amounts during a partial vendor payment. The changed branch still does not create that balancing line; it only stops posting earlier. The code also decides this by looking for any Purchases template, not by checking the template used by the current journal line, so a payment journal can still be blocked instead of being balanced. Problem-solution fitFit: Partial The reported scenario is about posting a partial vendor payment with WHT and getting balanced WHT and G/L amounts. The change improves the error in one setup state, but it does not make that payment scenario post correctly. SuggestionsS1 (🔴 High): Missing template branch still blocks WHT posting S2 (🟠 Moderate): Add a WHT payment regression test Risk assessment and necessityRisk: This is a high-risk posting path. If it is wrong, vendor payments with WHT can still fail posting, or the generated WHT and G/L amounts can be incomplete. The changed code does not add public API or event-subscriber coupling. Necessity: The fix is needed because the reported payment scenario has no good workaround inside posting. The scope is small, but it should create or preserve the required WHT balancing behavior rather than only replacing the failure with a setup error.
|
Fixes AB#648811