BR-CO-12Sum of charges on document level (BT-108) = Σ Document level charge amount (BT-99).

Official rule text

The sum of charges at document level (BT-108) must equal the sum of the individual charge amounts (BT-99) exactly — the counterpart to BR-CO-11.

Severity
Error
Applies to
CII, UBL
Rule set
v2026-08-31
Checked on

Written and checked against the official KoSIT rule set by Dmytro Yalanskyi, NormAPI.

Why does BR-CO-12 happen?

As with BR-CO-11, on the charge side: BT-108 comes from your own invoice object while the individual charges are written through a filter. One common variant is a charge that ends up with cbc:ChargeIndicator false by mistake — it then counts as an allowance and drops out of the sum that still includes it.

What the validator checks

The expression the official KoSIT rule set evaluates — not paraphrased, but read from the Schematron file it ships. UBL and CII address different document trees, so the same rule reads differently in each.

UBL
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()]))
CII
(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()])and not (ram:ChargeTotalAmount)) or ram:ChargeTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()]/ram:ActualAmount[1])* 10 * 10 ) div 100)

Source: rule set v2026-08-31

How do you fix BR-CO-12?

Sum BT-108 from every cac:AllowanceCharge whose cbc:ChargeIndicator is true and write the result to cbc:ChargeTotalAmount in UBL, ram:ChargeTotalAmount in CII. A charge belongs either in the line or at document level, never in both.

In the XML

A UBL fragment. The CII path is named above — same change, different element names.

Fails
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
  <cbc:Amount currencyID="EUR">20.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:LegalMonetaryTotal>
  <cbc:ChargeTotalAmount currencyID="EUR">35.00</cbc:ChargeTotalAmount>
</cac:LegalMonetaryTotal>
Fixed
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
  <cbc:Amount currencyID="EUR">20.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:LegalMonetaryTotal>
  <cbc:ChargeTotalAmount currencyID="EUR">20.00</cbc:ChargeTotalAmount>
</cac:LegalMonetaryTotal>

Related rules

NormAPI provides technical validation, not tax or legal advice.