What does BR-CO-4 mean?
Every invoice line must be assigned to a VAT category. That way its amount lands in the right VAT breakdown.
Common causes of BR-CO-4
- The 'ram:CategoryCode' (BT-151) is missing from the line's tax block.
- The line's tax block 'ram:ApplicableTradeTax' is missing altogether.
- Only TypeCode 'VAT' was set, but the category code was forgotten.
How to fix BR-CO-4
- Find the faulty spot in the XML. Open the XML of the invoice and go to field BT-151 along this XPath:
//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCode - Apply the fix. Every Invoice line (BG-25) must be assigned to a VAT category. In the line, under 'ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax', add the element 'ram:CategoryCode' (BT-151), for example 'S' for standard rate, 'Z' for zero rate or 'AE' for reverse charge.
- Validate again. Save the file and validate it again to check that BR-CO-4 is no longer reported.
Every Invoice line (BG-25) must be assigned to a VAT category. In the line, under 'ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax', add the element 'ram:CategoryCode' (BT-151), for example 'S' for standard rate, 'Z' for zero rate or 'AE' for reverse charge.
//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCodeBefore / after: the XML example
This is the spot in question before and after the fix (Cross Industry Invoice, ZUGFeRD/Factur-X).
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
</ram:ApplicableTradeTax>
</ram:SpecifiedLineTradeSettlement>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>19</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
</ram:SpecifiedLineTradeSettlement>
Frequent questions about BR-CO-4
Which values are allowed for BT-151?
Does the VAT rate belong in the line as well?
Related error codes
Check BR-CO-4 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.