Skip to content

[Master] - Bug 647253: [WHT] Inconsistency with the Payments - #10545

Open
ViditGupta1277 wants to merge 1 commit into
microsoft:mainfrom
ViditGupta1277:bugs/Bug-647253-WHT-Inconsistency-with-the-Payments
Open

[Master] - Bug 647253: [WHT] Inconsistency with the Payments#10545
ViditGupta1277 wants to merge 1 commit into
microsoft:mainfrom
ViditGupta1277:bugs/Bug-647253-WHT-Inconsistency-with-the-Payments

Conversation

@ViditGupta1277

@ViditGupta1277 ViditGupta1277 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Fixes AB#647253

@ViditGupta1277
ViditGupta1277 requested a review from a team August 24, 2026 05:42
@ViditGupta1277
ViditGupta1277 requested a review from a team as a code owner August 24, 2026 05:42
@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork Team: Finance GitHub request for Finance area ADO: Sync Creates an Azure DevOps work item if needed and indicates that one is linked labels Aug 24, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Aug 24, 2026
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Agentic PR Review - Round 1

Recommendation: Request Changes

What this PR does

This PR changes WHT payment posting so a missing Purchases general journal template raises a new error after the WHT entry is created. The bug evidence expects the payment to post with balanced WHT G/L entries and correct unrealized amounts for a partial vendor payment. The current change does not create the missing WHT posting buffer in the setup that hit the bug; it stops posting with a setup error instead. That leaves the financial scenario unresolved.

Suggestions

S1 - Do not turn posting into setup error
In ProcessPayment, the no-template branch now errors after the WHT entry is built. For the reported payment scenario, this means posting still fails instead of adding the WHT G/L line that balances the payment. Treat a missing Purchases template as "not the current template" and insert the WHT posting buffer, or use another condition that keeps the payment posting balanced.

S2 - Add regression test for payment path
This change affects WHT payment posting and G/L balance, so it needs a test. Add a test in the existing Withholding Tax test app for the US WHT payment scenario with Round Payment Amount for Withholding Tax enabled and a partial payment. Assert that the payment posts with the expected WHT entries and G/L amount.

Risk assessment and necessity

Risk: This is financial posting code. If the condition is wrong, WHT amounts can stay unposted or users can get a new setup error for a valid payment journal instead of a balanced posting. No BaseApp event publisher is involved.

Necessity: The bug is valid and important because it blocks or unbalances WHT vendor payment posting. The scope is small, but it must fix the posting buffer condition rather than replace the imbalance with a new error.


[AI-PR-REVIEW] version=1 promptVersion=2 system=github pr=10545 round=1 by=alexei-dobriansky at=2026-08-24T07:10:40Z lastSha=ba3cb0d916741532dd72255fecf31335e35faf31 reviewKey=1c5b700a609260874493299492a7fa9023116d1181d697d2e9958df74a23788af179f suggestions=S1@e7353195,S2@7d72079e

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

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

Labels

ADO: Sync Creates an Azure DevOps work item if needed and indicates that one is linked AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork Team: Finance GitHub request for Finance area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants