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

#12816 [29.x]- Project Planning Lines are created in reverse order when purchase line descriptions are copied

Fixed project planning lines being created in reverse order when posting purchase invoices with multiple G/L account lines assigned to the same project, by sorting invoice posting buffer entries in ascending order by source line number.

Pull request · merged into releases/29.x (BC29) on 2026-10-16 by DhavalMore88 (community contribution) · 10 files (+583 -60), 8 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Project planning lines now maintain the original purchase line sequence when ‘Copy Line Descr. to G/L Entry’ is enabled
  • Buffer processing loop in PurchPostInvoice codeunit modified to iterate groups in ascending order by source line number
  • G/L Entry, VAT Entry, and Job Ledger Entry posting behavior remains unaffected
  • Bug reproduced in job consumption purchase tests with multiple lines assigned to same project task
  • 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 BC29 snapshot
  • src/Layers/RU/BaseApp/Purchases/Posting/PurchPostInvoice.Codeunit.al: modified, not in the BC29 snapshot

Context

  • Work items: AB#651069
  • 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).