[ALAppExtensions #30229][Event Request] table 12113 "Tmp Withholding Contribution"#9418
[ALAppExtensions #30229][Event Request] table 12113 "Tmp Withholding Contribution"#9418Explorer986 wants to merge 2 commits into
Conversation
…culateWithholdingTaxOnBeforeAssignWithholdingTaxValues event (AB#641342, ALAppExtensions #30229)
Copilot PR ReviewIteration 2 · Outcome: no-knowledge
Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630 No findings were posted for this iteration. Orchestrator pre-filter (13 file(s) excluded)
Findings produced by the Copilot CLI agent against BCQuality at |
…d shadowing the global (CI AA0198/AA0202)
Agentic PR Review - Round 1Recommendation: AcceptWhat this PR doesThis PR adds an IsHandled integration event in table 12113 "Tmp Withholding Contribution" before the withholding tax values are assigned in CalculateWithholdingTax(). It also moves the existing standard assignments into AssignWithholdingTaxValues(). The default path is behavior-preserving: WithholdCode and WithholdCodeLine are still loaded first, the same fields are assigned when IsHandled is false, the existing OnCalculateWithholdingTaxOnAfterAssignWithholdingTaxAmount event still runs after the assignment point, and the negative taxable-base validation still always runs. The new publisher uses [IntegrationEvent(false, false)], has a standard OnCalculateWithholdingTaxOnBefore... name, and passes both WithholdCodeLine and �ar Rec so subscribers can replace the calculation when needed. SuggestionsNo suggestions. Risk assessment and necessityRisk: The regression surface is small because the standard calculation path is the same unless an extension subscribes and sets IsHandled := true. The new event signature becomes public extension API, so it must be right before merge, but the parameters and timing match the requested customization point. No table schema, persisted data, posting flow, or existing event signature changes. Necessity: The request is valid for an extensibility slice. The existing after-event only exposes the temporary withholding contribution record, so subscribers cannot use WithholdCodeLine at the point where the standard values are calculated. A test is not needed for this pure publisher addition and extract-method refactor because the default product behavior is unchanged.
|
What & why
Adds
OnCalculateWithholdingTaxOnBeforeAssignWithholdingTaxValues(anIsHandledevent) to table 12113 "Tmp Withholding Contribution" and extracts the standard field assignments inCalculateWithholdingTax()into a newAssignWithholdingTaxValueslocal procedure (the reviewer-requested pattern, instead of wrapping an inline block). The negative-taxable-base check stays outside the handled block so it always runs, regardless of who computes the values.Linked work
Fixes AB#641342
How I validated this
What I tested and the outcome
AssignWithholdingTaxValues; theIsHandledevent precedes it;Error(NegativeTaxableBaseErr)remains after the guarded block. Default path is behavior-preserving.Risk & compatibility
Low.
IsHandledguards the calculation only; the negative-base validation is intentionally kept outside it so it cannot be bypassed. No existing event signatures changed, no schema/data impact.