HomeError code lexicon › BR-CO-7
BR-CO-7 Field BT-140 Calculation and consistency rules (BR-CO)

Fix BR-CO-7: Invoice line allowance reason and code contradict each other (BT-139/BT-140)

[BR-CO-7]-Invoice line allowance reason code (BT-140) and Invoice line allowance reason (BT-139) shall indicate the same type of a

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

What does BR-CO-7 mean?

The reason text and the reason code of an allowance on line level must name the same type. Otherwise the entry is ambiguous.

Common causes of BR-CO-7

How to fix BR-CO-7

  1. Find the faulty spot in the XML. Open the XML of the invoice and go to field BT-140 along this XPath://ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge
  2. Apply the fix. The reason code (BT-140) and the reason text (BT-139) of an invoice line allowance must name the same type of allowance. In the line's 'ram:SpecifiedTradeAllowanceCharge' (ChargeIndicator=false), make sure that 'ram:ReasonCode' (BT-140, UNTDID 5189) and 'ram:Reason' (BT-139) match in meaning.
  3. Validate again. Save the file and validate it again to check that BR-CO-7 is no longer reported.
Concrete fix

The reason code (BT-140) and the reason text (BT-139) of an invoice line allowance must name the same type of allowance. In the line's 'ram:SpecifiedTradeAllowanceCharge' (ChargeIndicator=false), make sure that 'ram:ReasonCode' (BT-140, UNTDID 5189) and 'ram:Reason' (BT-139) match in meaning.

XPath//ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge

Before / after: the XML example

This is the spot in question before and after the fix (Cross Industry Invoice, ZUGFeRD/Factur-X).

Wrong
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
  <ram:ReasonCode>95</ram:ReasonCode>
  <ram:Reason>Verpackung</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
Correct
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
  <ram:ReasonCode>95</ram:ReasonCode>
  <ram:Reason>Rabatt</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>

Frequent questions about BR-CO-7

Does this rule apply per line?
Yes, it checks every allowance inside an invoice line on its own. The code (BT-140) and the text (BT-139) of each line allowance must mean the same type.
Which codes are allowed for BT-140?
The allowance codes from UNTDID 5189, for example '95' for discount or '100' for special rebate.

Related error codes

Check BR-CO-7 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