code change · fixPurchasing & Payablesofficial - Microsoftreviewed - checked by Opus

#12003 [Main]- Project Planning Lines are created in reverse order when purchase line descriptions are copied

Fix project planning lines being created in reverse order when posting purchase invoices with copy line descriptions enabled.

Pull request · merged into main (BC30) on 2026-10-09 by DhavalMore88 (community contribution) · 10 files (+583 -60), 8 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Project Planning Lines now follow the original purchase line order instead of reverse order
  • Occurs when Copy Line Descr. to G/L Entry is enabled and several G/L Account lines share a project and task
  • Cause: Invoice Posting Buffer groups were processed in descending order of a key that includes the source line number
  • Purch. Post Invoice now processes buffer groups in ascending source line order across all layers
  • Intended not to change G/L, VAT or Job Ledger Entry posting; job consumption tests updated
  • Behaviour changes for users or extensions.

AL objects touched

  • Codeunit 816 “Purch. Post Invoice”, Base Application: modified
  • src/Layers/CH/BaseApp/Purchases/Posting/PurchPostInvoice.Codeunit.al: modified, not in the BC30 snapshot
  • src/Layers/RU/BaseApp/Purchases/Posting/PurchPostInvoice.Codeunit.al: modified, not in the BC30 snapshot

Context

  • Work items: AB#651522
  • Labels: ADO: Sync, From Fork, Team: SCM
  • Systems: purchasing
  • From the description: “Project Planning Lines are created in reverse order when purchase line descriptions are copied”

No source states these links: they share an object, a model read them, or a person found the same subject.

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).