[Master] -Revert Changes- 'Greater Than' Withholding Tax Calculation Rule is not applied correctly in Withholding Tax Posting Setup.#9650
Conversation
|
Could not find linked issues in the pull request description. Please make sure the pull request description contains a line that contains 'Fixes #' followed by the issue number being fixed. Use that pattern for every issue you want to link. |
|
The public (non-local) procedure ShouldCreateWithholdingTax(InvoiceAmount: Decimal; WithholdingPostingSetup: Record "Withholding Tax Posting Setup"): Boolean is deleted outright from codeunit 6785 "Withholding Tax Mgmt." instead of being marked [Obsolete(...)] and forwarded. This codeunit and procedure were introduced and shipped in a prior release (PR #9515, already merged to main before this revert), so if that version has been released to customers, external extensions calling ShouldCreateWithholdingTax will fail to compile with no deprecation warning. Per BCQuality guidance, a superseded published procedure should be kept in place with an [Obsolete] tag naming the replacement and only deleted after the deprecation window elapses, rather than deleted in the same change that stops using it internally. If this codeunit/procedure has not yet been released in a shipped version (i.e. no released baseline includes PR #9515), this does not apply per microsoft/knowledge/breaking-changes/unreleased-symbol-change-is-not-a-breaking-change.md — verify release status before acting on this finding. Knowledge:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.12.4 |
|
GreaterThanRuleBelowThresholdCreatesWHTEntryOnPurchaseInvoice and GreaterThanRuleAboveThresholdDoesNotCreateWHTEntryOnPurchaseInvoice, along with their shared helper CreateWHTPostingSetupWithCalcRule, VerifyWHTEntryExists, VerifyWHTEntryDoesNotExist, and UpdateWHTCertificateNosOnPurchSetup, are deleted from ERMWithholdingTaxTestsI.Codeunit.al. These tests were added specifically to cover AB#642326 ('Greater Than' Withholding Tax Calculation Rule not applied correctly) and are the only tests exercising the 'Greater than' calculation rule end-to-end. Removing them alongside the production-code revert eliminates the regression guard that would otherwise fail and flag this exact reintroduction of the bug. Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.12.4 |
AB#642326
Revert changes of PR #9515