BR-CO-12: Sum of charges on document level (BT-108) = Σ Document level charge amount (BT-99)
Peppol BIS Billing 3.0.21 · UBL
Original rule text
[BR-CO-12]-Sum of charges on document level (BT-108) = Σ Document level charge amount (BT-99).
xs:decimal(cbc:ChargeTotalAmount) = (round(sum(../cac:AllowanceCharge[cbc:ChargeIndicator=true()]/xs:decimal(cbc:Amount)) * 10 * 10) div 100) or (not(cbc:ChargeTotalAmount) and not(../cac:AllowanceCharge[cbc:ChargeIndicator=true()]))BR-CO-12 is a fatal rule in the business layer of Peppol BIS Billing 3.0.21 · UBL. An invoice that breaks it is rejected. It refers to BT-108, BT-99.
What this rule requires
This rule requires the document-level charge total (cbc:ChargeTotalAmount in UBL / ram:ChargeTotalAmount in CII, business term BT-108) to equal the sum of all document-level charge amounts (cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cbc:Amount in UBL / ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()]/ram:ActualAmount[1] in CII, business term BT-99), rounded to two decimal places. If neither a charge total nor any document-level charges are present, the rule is satisfied. A fatal error means the invoice fails validation when a charge total is missing while charges exist, or when the total does not match the rounded sum.
How to fix
Make the charge total consistent with the document-level charges. In UBL, set cac:LegalMonetaryTotal/cbc:ChargeTotalAmount to the sum of all cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cbc:Amount, rounded to two decimals; if there are no such charges, either omit cbc:ChargeTotalAmount or set it to 0. In CII, set ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount to the sum of ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()]/ram:ActualAmount[1], rounded to two decimals, or omit it when no charges exist. Check that only charges flagged as document-level are included.
Guidance on this rule. The original text above is authoritative.
Where to go next
No published Peppol BIS Billing UBL release comparison lists a change to BR-CO-12.
Validate an invoice against these rules · All release changes