Skip to content

[29.0]-[WHT] Inconsistency with the Payments - #11142

Open
ViditGupta1277 wants to merge 1 commit into
releases/29.0from
bugs/Bug-648811-WHT-Inconsistency-with-the-Payments
Open

[29.0]-[WHT] Inconsistency with the Payments#11142
ViditGupta1277 wants to merge 1 commit into
releases/29.0from
bugs/Bug-648811-WHT-Inconsistency-with-the-Payments

Conversation

@ViditGupta1277

@ViditGupta1277 ViditGupta1277 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Fixes AB#648811

@ViditGupta1277
ViditGupta1277 requested a review from a team September 7, 2026 12:39
@ViditGupta1277
ViditGupta1277 requested a review from a team as a code owner September 7, 2026 12:39
@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 Team: Finance GitHub request for Finance area labels Sep 7, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Sep 7, 2026
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 1

Recommendation: Request Changes

What this PR does

This 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 fit

Fit: 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.

Suggestions

S1 (🔴 High): Missing template branch still blocks WHT posting
Do not raise an error just because no Purchases journal template exists. In this path the payment journal still needs the WHT balancing line, so use the current journal template type to decide whether to add the buffer line, or insert it when the current template is not a Purchases template.

S2 (🟠 Moderate): Add a WHT payment regression test
This change touches a posting path that creates WHT and G/L amounts. Add a test for the reported partial vendor payment with WHT rounding enabled, and assert the WHT entry amounts and the balancing G/L line.

Risk assessment and necessity

Risk: 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.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11142 round=1 by=alexei-dobriansky at=2026-09-07T13:29:14.6631250Z lastSha=192b9b6f3a8ad8c5563456438b79a1b38ce6ab89 reviewKey=7036e54630eb86732db4c300bf00d34083632e8855643928e2fcc25fb1b6e925 suggestions=S1@2bf11594,S2@b55c69ea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Team: Finance GitHub request for Finance area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants