BR-CO-11 BR-CO-11 requires BT-107 to equal Σ BT-92, the sum of the BG-20 amounts on the document
BR-CO-11 requires BT-107 to equal Σ BT-92, the sum of the BG-20 amounts on the document. You declared 1.00 for BT-107, but the single entry in allowances sum to 10.00 — a difference of -9.00 EUR. BT-107 is a plain sum and nothing nets against it: a document level charge in the same VAT category does reduce the taxable amount of that category's breakdown group, but it never reduces BT-107, which stays a gross disclosure of everything deducted.
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-107- 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-11",
"field": "BT-107",
"severity": "fatal",
"message": "BR-CO-11 requires BT-107 to equal Σ BT-92, the sum of the BG-20 amounts on the document. You declared 1.00 for BT-107, but the single entry in allowances sum to 10.00 — a difference of -9.00 EUR. BT-107 is a plain sum and nothing nets against it: a document level charge in the same VAT category does reduce the taxable amount of that category's breakdown group, but it never reduces BT-107, which stays a gross disclosure of everything deducted.",
"fix": "Either correct the allowances array so it sums to your declared figure, or drop declaredTotals.allowanceTotalAmount and let the library compute it — generation always emits the computed value regardless of what you declare. Sum the *rounded* entry amounts, in that order: EN 16931 rounds each amount to two decimals and then adds.",
"example": "\"declaredTotals\": { \"allowanceTotalAmount\": 10.00 }",
"xpath": "/ubl:Invoice/cac:LegalMonetaryTotal/cbc:AllowanceTotalAmount",
"docsUrl": "https://attestwire.com/rules/BR-CO-11"
}
xpath locates the element in the generated UBL document,
which is where a KoSIT or Peppol validator will report the same problem.
A passing value
"declaredTotals": { "allowanceTotalAmount": 10.00 }The fix
Either correct the allowances array so it sums to your declared figure, or drop declaredTotals.allowanceTotalAmount and let the library compute it — generation always emits the computed value regardless of what you declare. Sum the *rounded* entry amounts, in that order: EN 16931 rounds each amount to two decimals and then adds.