What does BR-CO-23 mean?
Every invoice line allowance must carry a reason as text or as a code. That explains the deduction.
Common causes of BR-CO-23
- The line allowance was stated with an amount only, without a reason or reason code.
- The reason code (BT-140) was written into the wrong element.
- The allowance reason was lost when single lines were imported.
How to fix BR-CO-23
- Find the faulty spot in the XML. Open the XML of the invoice and go to field BG-27 along this XPath:
//ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'] - Apply the fix. Every invoice line allowance (BG-27) must contain a reason as text (BT-139, 'ram:Reason') or as a code (BT-140, 'ram:ReasonCode'). Add at least one of the two elements in the affected 'ram:SpecifiedTradeAllowanceCharge' of the line (with 'ram:ChargeIndicator' = false).
- Validate again. Save the file and validate it again to check that BR-CO-23 is no longer reported.
Every invoice line allowance (BG-27) must contain a reason as text (BT-139, 'ram:Reason') or as a code (BT-140, 'ram:ReasonCode'). Add at least one of the two elements in the affected 'ram:SpecifiedTradeAllowanceCharge' of the line (with 'ram:ChargeIndicator' = false).
//ram:SpecifiedLineTradeSettlement/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:SpecifiedLineTradeSettlement>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
<ram:ActualAmount>5.00</ram:ActualAmount>
</ram:SpecifiedTradeAllowanceCharge>
</ram:SpecifiedLineTradeSettlement>
<ram:SpecifiedLineTradeSettlement>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
<ram:ActualAmount>5.00</ram:ActualAmount>
<ram:ReasonCode>95</ram:ReasonCode>
<ram:Reason>Positionsrabatt</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
</ram:SpecifiedLineTradeSettlement>
Frequent questions about BR-CO-23
How does BR-CO-23 differ from BR-CO-21?
For a line discount, is the code alone enough?
Related error codes
Check BR-CO-23 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.