Skip to content

[Master]-Project consumption: partial invoicing of non-inventory items posts negative adjustment value entry to wrong Item Ledger Entry#9133

Open
neeleshsinghal wants to merge 3 commits into
microsoft:mainfrom
neeleshsinghal:bugs/Bug-640811-Project-partial-invoicing-of-non-inv-items-negative-adjustment
Open

[Master]-Project consumption: partial invoicing of non-inventory items posts negative adjustment value entry to wrong Item Ledger Entry#9133
neeleshsinghal wants to merge 3 commits into
microsoft:mainfrom
neeleshsinghal:bugs/Bug-640811-Project-partial-invoicing-of-non-inv-items-negative-adjustment

Conversation

@neeleshsinghal

@neeleshsinghal neeleshsinghal commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@neeleshsinghal neeleshsinghal requested a review from a team July 6, 2026 12:18
@github-actions github-actions Bot added the From Fork Pull request is coming from a fork label Jul 6, 2026
@neeleshsinghal neeleshsinghal self-assigned this Jul 6, 2026
@github-actions github-actions Bot added the Linked Issue is linked to a Azure Boards work item label Jul 6, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Copilot PR Review

Iteration 4 · Outcome: no-knowledge

No BCQuality knowledge file in any leaf domain (performance, security, privacy, upgrade, style, ui) applies to this diff; al-upgrade-review and al-ui-review returned not-applicable because the diff touches no upgrade codeunits/table schema and no page/control-add-in files. The agent self-review pass found no cross-cutting defect clearing the precision bar: the fix (replacing an exact-zero Invoiced Quantity filter with the Completely Invoiced boolean flag, so partially invoiced Item Ledger Entries are still matched when locating the linked Negative Adjmt. entry for non-inventory job consumption) is applied identically and completely across all 10 country layers that contain the affected procedure, and a corresponding regression test was added to both test codeunits (W1, RU) that exist for this scenario.

Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630

No findings were posted for this iteration.

Orchestrator pre-filter (13 file(s) excluded)

  • layer-disabled (knowledge) : 13 file(s)

Findings produced by the Copilot CLI agent against BCQuality at 822cae1b2771ac25f665f73369f69093bd4fd630. Reply 👎 on any inline comment to flag false positives.

@neeleshsinghal neeleshsinghal requested a review from Copilot July 7, 2026 03:07
@neeleshsinghal neeleshsinghal added the SCM GitHub request for SCM area label Jul 7, 2026
@neeleshsinghal neeleshsinghal requested a review from a team July 7, 2026 03:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.-Post logic for non-inventory items to locate the relevant “Negative Adjmt.” Item Ledger Entry using Completely Invoiced = false (instead of Invoiced 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.

Comment thread src/Layers/W1/Tests/Job/JobConsumptionPurchase.Codeunit.al
Comment thread src/Layers/W1/Tests/Job/JobConsumptionPurchase.Codeunit.al
Comment thread src/Layers/RU/Tests/Job/JobConsumptionPurchase.Codeunit.al
Comment thread src/Layers/RU/Tests/Job/JobConsumptionPurchase.Codeunit.al
@v-ankitgoyal v-ankitgoyal self-assigned this Jul 7, 2026
v-ankitgoyal
v-ankitgoyal previously approved these changes Jul 7, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread src/Layers/W1/Tests/Job/JobConsumptionPurchase.Codeunit.al

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

From Fork Pull request is coming from a fork Linked Issue is linked to a Azure Boards work item SCM GitHub request for SCM area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants