#12855 [E-Documents] Add support for credit memos, recognised from the PDF and applied to the original invoice
E-Documents now recognize vendor credit notes in PDFs and create purchase credit memos instead of invoices. A credit memo is applied to the invoice printed on the document only when exactly one open posted invoice of the pay-to vendor matches in an applicable currency; otherwise it stays unapplied with a warning.
- 20files
- 12AL files
- 12objects
Pull request · merged into main (BC30) on 2026-10-21 by Explorer986 · 20 files (+1797 -31), 12 AL · feature · tier official · reviewed (checked by Opus)
What changed
- Extraction returns the EN 16931 document type code and billing reference; code maps 381 to a credit memo and anything else to an invoice
- Credit memos are applied only to the stated invoice when exactly one open posted invoice of the pay-to vendor matches in an applicable currency
- Otherwise the credit memo is left unapplied with a warning, and finalizing re-checks the match
- Draft gets an editable Applies-to Vendor Inv. No. field and a read-only outcome field
- Amount signs are normalized from the lines first, then the header totals
- Behaviour changes for users or extensions.
AL objects touched
- Codeunit 6103 “E-Document Subscribers”, EDocument: modified
- Codeunit 6404 “E-Doc. Create Purch. Cr. Memo”, EDocument: modified
- Codeunit 6402 “E-Doc. Purch. Doc. Helper”, EDocument: modified
- Codeunit 6403 “EDoc Prepare Cr. Memo Draft”, EDocument: modified
- Page 6183 “E-Doc. Purchase Draft Subform”, EDocument: modified
- Page 6182 “E-Doc. Readable Purchase Doc.”, EDocument: modified
- Page 6181 “E-Document Purchase Draft”, EDocument: modified
- Table 6100 “E-Document Purchase Header”, EDocument: modified
- Codeunit 6232 “E-Doc. MLLM Schema Helper”, EDocument: modified
- Codeunit 6231 “E-Document MLLM Handler”, EDocument: modified
- Table 6103 “E-Document Service”, EDocument: modified
- Codeunit 6168 “E-Document Upgrade”, EDocument: modified
Also merged into
- #13142 into
releases/29.xon 2026-10-23
Context
- Work items: AB#650500
- Labels: AL: Apps (W1), Team: Finance
- Systems: integration
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Extending the e-documents functionality — possibly related: touches Table 6103 “E-Document Service”
- Use E-Documents in the purchase process — possibly related: touches Page 6181 “E-Document Purchase Draft”
- Create invoices or credit memos for services — possibly related: E-document credit memo creation and application relates to service invoice and credit memo documentation. (model-linked)
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).