HomeError code lexicon › BR-CO-23
BR-CO-23 Field BG-27 Calculation and consistency rules (BR-CO)

Fix BR-CO-23: Invoice line allowance reason (BT-139/BT-140) missing

[BR-CO-23]-Each Invoice line allowance (BG-27) shall contain an Invoice line allowance reason (BT-139) or an Invoice line allowance

BR-CO-23 in your own invoice? Upload the file and find every error in seconds.

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

How to fix BR-CO-23

  1. 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']
  2. 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).
  3. Validate again. Save the file and validate it again to check that BR-CO-23 is no longer reported.
Concrete 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).

XPath//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).

Wrong
<ram:SpecifiedLineTradeSettlement>
  <ram:SpecifiedTradeAllowanceCharge>
    <ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
    <ram:ActualAmount>5.00</ram:ActualAmount>
  </ram:SpecifiedTradeAllowanceCharge>
</ram:SpecifiedLineTradeSettlement>
Correct
<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?
BR-CO-21 concerns allowances on document level (BG-20), BR-CO-23 allowances on line level (BG-27). Both require a reason as text or as a code, only at a different place in the XML.
For a line discount, is the code alone enough?
Yes. For BR-CO-23 either the reason code (BT-140, 'ram:ReasonCode') or the free-text reason (BT-139, 'ram:Reason') is enough. One of the two must be present.

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.

Find every error automatically instead of searching by hand

Upload your ZUGFeRD, Factur-X or XRechnung file – you get every violation back with rule ID, field, fix and XPath.

Validate online for free
Check invoice