[Master]-Project consumption: partial invoicing of non-inventory items posts negative adjustment value entry to wrong Item Ledger Entry#9133
Conversation
Copilot PR ReviewIteration 4 · 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 |
There was a problem hiding this comment.
Pull request overview
Fixes a posting/application issue in purchase posting where partial invoicing of non-inventory items with project consumption could cause the “Negative Adjmt.” value entry to be applied/linked to the wrong Item Ledger Entry. The change adjusts how the posting logic selects the target “Negative Adjmt.” Item Ledger Entry during subsequent partial invoices and adds regression coverage.
Changes:
- Update
Purch.-Postlogic for non-inventory items to locate the relevant “Negative Adjmt.” Item Ledger Entry usingCompletely Invoiced = false(instead ofInvoiced Quantity = 0) so partially invoiced entries are still selected. - Add a regression test scenario (W1 + RU) covering two-step partial invoicing via Get Receipt Lines, validating invoiced quantities and ensuring no “Negative Adjmt.” value entry is linked to the “Purchase” ILE.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Layers/W1/Tests/Job/JobConsumptionPurchase.Codeunit.al | Adds regression scenario + helper routines for partial invoicing from receipt and verifying value entry linkage. |
| src/Layers/W1/BaseApp/Purchases/Posting/PurchPost.Codeunit.al | Changes non-inventory applied ILE selection to use Completely Invoiced = false for “Negative Adjmt.” entries. |
| src/Layers/RU/Tests/Job/JobConsumptionPurchase.Codeunit.al | RU-layer equivalent regression scenario + helper routines. |
| src/Layers/RU/BaseApp/Purchases/Posting/PurchPost.Codeunit.al | RU-layer equivalent Purch.-Post fix. |
| src/Layers/NA/BaseApp/Purchases/Posting/PurchPost.Codeunit.al | NA-layer equivalent Purch.-Post fix. |
| src/Layers/IT/BaseApp/Purchases/Posting/PurchPost.Codeunit.al | IT-layer equivalent Purch.-Post fix. |
| src/Layers/GB/BaseApp/Purchases/Posting/PurchPost.Codeunit.al | GB-layer equivalent Purch.-Post fix. |
| src/Layers/FI/BaseApp/Purchases/Posting/PurchPost.Codeunit.al | FI-layer equivalent Purch.-Post fix. |
| src/Layers/ES/BaseApp/Purchases/Posting/PurchPost.Codeunit.al | ES-layer equivalent Purch.-Post fix. |
| src/Layers/CH/BaseApp/Purchases/Posting/PurchPost.Codeunit.al | CH-layer equivalent Purch.-Post fix. |
| src/Layers/BE/BaseApp/Purchases/Posting/PurchPost.Codeunit.al | BE-layer equivalent Purch.-Post fix. |
| src/Layers/APAC/BaseApp/Purchases/Posting/PurchPost.Codeunit.al | APAC-layer equivalent Purch.-Post fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
AB#641520