What does BR-31 mean?
Every document level allowance must state its amount. Otherwise the sum of the allowances cannot be built.
Common causes of BR-31
- The allowance has a reason and a tax rate, but no ram:ActualAmount.
- The amount was written as a negative value into another field instead of ActualAmount.
- The export created the allowance block but left the amount empty.
How to fix BR-31
- Find the faulty spot in the XML. Open the XML of the invoice and go to field BT-92 along this XPath:
//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount - Apply the fix. Every document level allowance (BG-20) needs a document level allowance amount (BT-92). Add the element ram:ActualAmount with the amount excluding VAT to the allowance (ram:SpecifiedTradeAllowanceCharge with ChargeIndicator false), for example 10.00.
- Validate again. Save the file and validate it again to check that BR-31 is no longer reported.
Every document level allowance (BG-20) needs a document level allowance amount (BT-92). Add the element ram:ActualAmount with the amount excluding VAT to the allowance (ram:SpecifiedTradeAllowanceCharge with ChargeIndicator false), for example 10.00.
//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmountBefore / 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:Reason>Treuerabatt</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator><udt:Indicator>false</udt:Indicator></ram:ChargeIndicator>
<ram:ActualAmount>10.00</ram:ActualAmount>
<ram:Reason>Treuerabatt</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
Frequent questions about BR-31
How does the XML tell an allowance from a charge?
Must the allowance amount be positive?
Related error codes
Check BR-31 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.