BR-CO-16 BR-CO-16 requires the amount due for payment (BT-115) to equal BT-112 − paid amount (BT-113) + rounding amount (BT-114)
BR-CO-16 requires the amount due for payment (BT-115) to equal BT-112 − paid amount (BT-113) + rounding amount (BT-114). You declared 1.00 for BT-115, but the invoice lines compute to 1785.00 — a difference of -1784.00 EUR. This version of the library does not yet model prepaid or rounding amounts, so BT-115 must equal BT-112.
This rule is implemented and its error payload below is real, but the long-form write-up — normative text, worked example, divergence note — is not written yet. Everything the library knows about this rule is on this page. Ask and we will prioritise it.
- Business term
BT-115- Severity
fatal
What the library returns
The exact object in result.errors when this rule fires.
Generated by running @attestwire/en16931, not transcribed:
{
"rule": "BR-CO-16",
"field": "BT-115",
"severity": "fatal",
"message": "BR-CO-16 requires the amount due for payment (BT-115) to equal BT-112 − paid amount (BT-113) + rounding amount (BT-114). You declared 1.00 for BT-115, but the invoice lines compute to 1785.00 — a difference of -1784.00 EUR. This version of the library does not yet model prepaid or rounding amounts, so BT-115 must equal BT-112.",
"fix": "Either correct the line data so it sums to your declared figure, or drop declaredTotals.payableAmount and let the library compute it. Note that EN 16931 sums *rounded* line amounts: round each line to 2 decimals first, then add — rounding only the final sum drifts by a cent or two on long invoices.",
"example": "\"declaredTotals\": { \"payableAmount\": 1785.00 }",
"docsUrl": "https://attestwire.com/rules/BR-CO-16"
}A passing value
"declaredTotals": { "payableAmount": 1785.00 }The fix
Either correct the line data so it sums to your declared figure, or drop declaredTotals.payableAmount and let the library compute it. Note that EN 16931 sums *rounded* line amounts: round each line to 2 decimals first, then add — rounding only the final sum drifts by a cent or two on long invoices.