[master]-[ES][Cartera Bills] Applying a foreign-currency payment to a bill that leads to gain-loss entry cannot be reversed#9349
Conversation
…Bug-640419--master]-ES_CarteraBills_gain_loss_notreversed
…aBills_gain_loss_notreversed
…aBills_gain_loss_notreversed
Copilot PR ReviewIteration 3 · Outcome: completed Knowledge source: https://github.com/microsoft/BCQuality@809af9708e265f110ced6752fd8f2e40f1efc820 Findings by domainFindings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).
Totals: 1 knowledge-backed · 0 agent findings. Orchestrator pre-filter (2 file(s) excluded)
Findings produced by the Copilot CLI agent against BCQuality at |
Agentic PR Review - Round 1Recommendation: Request ChangesWhat this PR doesThis PR changes ES The main idea matches the root cause: the bill receivable entry must use the reserved G/L entry number so reversal can find the expected link. But the implementation is not complete. SuggestionsS1 - Consume saved entry number in all branches S2 - Strengthen the reversal regression test Risk assessment and necessityRisk: This is high-risk financial posting code. A wrong Necessity: The bug is important. The linked ADO bug is a live-site, high-risk ES Cartera scenario where an FCY payment with realized exchange gain/loss cannot be reversed. A targeted fix and a regression test are warranted, but the current implementation still leaves a reachable entry-number mismatch.
|
In the rewritten PostReceivableDocs, the var block declares GLEntry: Record "G/L Entry" after the primitive DocAmountAddCurr and GLAccNo declarations.CodeCop AA0021 requires complex types (Record) to appear before primitive types (Decimal, Code, Boolean) in a var block. Suggested fix (apply manually — could not be anchored as a one-click suggestion): GLEntry: Record "G/L Entry";
DocAmountAddCurr: Decimal;
GLAccNo: Code[20];
NeedsSaveEntryNoFix: Boolean;Knowledge: Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
Agentic PR Review - Round 2Recommendation: AcceptWhat this PR doesThe new commit narrows This addresses the round-1 correctness concern. The Status of previous suggestions
New observations (commits since round 1)None - changes only addressed prior suggestions. Risk assessment and necessityRisk: This remains high-risk financial posting code because wrong G/L entry numbers can break unapply and reversal. The round-2 change is narrow: it limits the new saved-entry-number behavior to the branch that actually uses Necessity: The linked ADO bug is an active high-risk live-site ES Cartera scenario. A targeted posting fix and a regression test are needed, and the round-2 changes now match that scope.
|
Bug 642151: [master][All-E][ES][Cartera Bills] Applying a foreign-currency payment to a bill that leads to gain-loss entry cannot be reversed
Fixes AB#642151