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
- The reason code (BT-140) means a different type of allowance than the reason text (BT-139).
- A standard code was set, but the free text was carried over from an old line.
- Allowance codes (UNTDID 5189) were mixed up with charge codes (UNTDID 7161).
How to fix BR-CO-7
- 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 - 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.
- Validate again. Save the file and validate it again to check that BR-CO-7 is no longer reported.
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.
//ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceChargeBefore / 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:ReasonCode>95</ram:ReasonCode>
<ram:Reason>Verpackung</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
<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?
Which codes are allowed for BT-140?
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.