#9772 [PA][Pioneer]: Numeric line fields mis-extracted (discount, quantity, unit of measure)
E-Document importer now preserves zero quantities instead of forcing them to 1, derives quantity from total and price only when valid, never fabricates discounts, and carries unresolved unit codes through to the unit of measure field.
- 4files
- 3AL files
- 3objects
Pull request · merged into main (BC30) on 2026-08-03 by Explorer986 · 4 files (+60 -20), 3 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Zero quantity lines are preserved instead of being forced to 1
- Quantity is only derived from total divided by price when mathematically sensible
- Phantom discounts are no longer invented when line total matches price times quantity
- Unresolved unit codes like HUR now appear in the BC unit of measure field instead of blank
- Fixes incorrect line extraction for scanned invoices with missing or zero quantities
- Behaviour changes for users or extensions.
AL objects touched
- Codeunit 6121 “EDocument Json Helper”, EDocument: modified
- Codeunit 6232 “E-Doc. MLLM Schema Helper”, EDocument: modified
- Codeunit 6174 “E-Document ADI Handler”, EDocument: modified
Context
- Work items: AB#642334
- Labels: AL: Apps (W1), Team: Integrations
- Systems: integration
- From the description: “Now we keep a genuine zero quantity, only derive quantity from total over price when it makes sense, and never fabricate a discount.”
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).