[Master]-]Withholding Tax Entries are not generated at payment because the Withholding Tax. Prod. Posting Group field gets not transferred to the payment line#9479
Conversation
…e the Withholding Tax. Prod. Posting Group field gets not transferred to the payment line [AB#639524](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/639524)
…iple Payment templates)
…stically in W1 and localizations
…payment application scenario
| [Test] | ||
| [Scope('OnPrem')] | ||
| [HandlerFunctions('ConfirmHandler')] | ||
| procedure WHTProdPostGroupTravelsFromJournalLine() |
There was a problem hiding this comment.
WHTProdPostGroupTravelsFromJournalLine is titled/commented as verifying that 'Withholding Tax Prod.
Post. Group travels from the applied invoice to the payment line' via the new AssignWHTPostingGroupOnCreatePayment subscriber (which only fires from the Create Payment page's OnBeforeUpdateGnlJnlLineDimensionsFromVendorPayment event). The test only creates and posts an Invoice and then asserts that the Withholding Tax Entry generated for that Invoice has the expected posting group -- it never creates a payment, never applies one to the invoice via 'Applies-to ID', and never drives the Create Payment page (or the buffer/event it publishes). The GenJournalLine array is declared as array[2] but only element [1] is ever used, which is consistent with the payment leg being missing. As written, the test would pass even if AssignWHTPostingGroupOnCreatePayment were deleted or broken, so the new production behavior in WithholdingTaxJnlSubscriber.Codeunit.al ships without regression coverage. If this impact would otherwise be judged major (an entirely untested new code path), note it here rather than escalate severity: recommend extending the test to actually apply/post a payment line (or otherwise trigger OnBeforeUpdateGnlJnlLineDimensionsFromVendorPayment with a populated TempVendorPaymentBuffer) and assert the resulting Gen. Journal Line's 'Wthldg. Tax Prod. Post. Group'.
Agent judgement — not directly backed by a BCQuality knowledge article.
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why
Copilot PR ReviewIteration 1 · Outcome: completed Knowledge source: https://github.com/microsoft/BCQuality@186d8a131465475c79244d994acb872cd5c0d4bf Findings by domainFindings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).
Totals: 0 knowledge-backed · 1 agent findings. Orchestrator pre-filter (2 file(s) excluded)
Findings produced by the AL review agent v1.7.3. Reply 👎 on any inline comment to flag false positives. |
AB#639524