What does BR-CO-21 mean?
Every document level allowance must carry a reason as text or as a code. That keeps the deduction traceable.
Common causes of BR-CO-21
- The allowance was stated with an amount only, without a reason or reason code.
- The reason code (BT-98) was written into the wrong element.
- The reason was lost when several allowances were merged.
How to fix BR-CO-21
- Find the faulty spot in the XML. Open the XML of the invoice and go to field BG-20 along this XPath:
//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'] - Apply the fix. Every document level allowance (BG-20) must contain a reason as text (BT-97, 'ram:Reason') or as a code (BT-98, 'ram:ReasonCode'). Add at least one of the two elements in the affected 'ram:SpecifiedTradeAllowanceCharge' with 'ram:ChargeIndicator' = false.
- Validate again. Save the file and validate it again to check that BR-CO-21 is no longer reported.
Every document level allowance (BG-20) must contain a reason as text (BT-97, 'ram:Reason') or as a code (BT-98, 'ram:ReasonCode'). Add at least one of the two elements in the affected 'ram:SpecifiedTradeAllowanceCharge' with 'ram:ChargeIndicator' = false.
//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']Before / after: the XML example
This is the spot in question before and after the fix (Cross Industry Invoice, ZUGFeRD/Factur-X).
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
<ram:ActualAmount>50.00</ram:ActualAmount>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
<ram:ActualAmount>50.00</ram:ActualAmount>
<ram:ReasonCode>95</ram:ReasonCode>
<ram:Reason>Rabatt</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
Frequent questions about BR-CO-21
Is the reason text enough or do I need the code?
How do I spot an allowance in CII?
Related error codes
Check BR-CO-21 automatically
Instead of digging through the XML by hand you can validate your ZUGFeRD or XRechnung file online – upload the PDF or the XML and you get every error with rule ID, affected field, fix and XPath, as a readable report or as JSON through the API.