Sub-cent line amounts could drift the emitted UBL by one cent: two €0.03 lines
at 21% produced a €0.02 tax subtotal instead of the compliant €0.01, violating
the EN 16931 BR-CO-17 Schematron rule. SDK 2.3.0 now computes each
cbc:TaxAmount by rounding once per tax group, and the cbc:PayableAmount
arithmetic no longer relies on raw floats — no more one-cent drift on float
dust.
What changed
amountDuematches the UBL. The amount reported on invoices is derived from the document'sPayableAmount— what your buyer's system reads is what you see.- New export
computeUblPayableAmount(input)(with theUblMonetaryInputtype) — the exact formulabuildInvoiceXmlrenders intocac:LegalMonetaryTotal, line- and document-level allowances/charges, VAT, prepaid and rounding included. Use it instead of re-deriving the amount with a parallel formula that could drift from the UBL sent to the network. - CLI 0.5.1 rebundles the fix.
getpeppr convertandgetpeppr validaterun the UBL builder locally, so they now emit the compliant output too.
No breaking change. Upgrade if you emit sub-cent line amounts or compute amounts due on your side.