Document level allowance total must match its allowances

Error BR-CO-11 EN 16931

Sum of allowances on document level (BT-107) = Σ Document level allowance amount (BT-92).

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

If document level allowances are present, ram:AllowanceTotalAmount does not match the sum of their ram:ActualAmount amounts. If there are no such allowances, ram:AllowanceTotalAmount must not be present.

What the rule means

ram:AllowanceTotalAmount reports the total of document level allowances. The total must equal the sum of the individual allowance amounts; if there are no allowances, no allowance total is reported.

Affected fields BT-107 BT-92
Please reconcile the total of document level allowances

The reported allowance total does not match the individual allowance amounts, or a total is present when there are no allowances. Adjust the total to match the allowances present.

What to do
  1. Check the document level allowances and their ActualAmount values.
  2. Make AllowanceTotalAmount equal to the sum of those allowance amounts.
  3. If there are no allowances, omit AllowanceTotalAmount.
  4. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>false</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:ActualAmount>10.00</ram:ActualAmount>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
  <ram:AllowanceTotalAmount>8.00</ram:AllowanceTotalAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
✓ Correct
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>false</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:ActualAmount>10.00</ram:ActualAmount>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
  <ram:AllowanceTotalAmount>10.00</ram:AllowanceTotalAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
Check in FactoorSharp
  • FacturXInvoice.AllowanceTotalAmount (BT-107)
  • AbstractTradeAllowanceCharge.ActualAmount (Document level allowance: BT-92)
Technical details

The test allows either the absence of both allowances and ram:AllowanceTotalAmount, or equality between that total and the sum of all allowance ram:ActualAmount values (ram:ChargeIndicator is false), rounded to two decimal places.

Where the rule applies

The rule applies to ram:AllowanceTotalAmount in ram:SpecifiedTradeSettlementHeaderMonetarySummation and the document level allowances in ram:SpecifiedTradeAllowanceCharge.

Context (rule/@context)
//ram:SpecifiedTradeSettlementHeaderMonetarySummation
Test expression (assert/@test)
( not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']) and not (ram:AllowanceTotalAmount) ) or ram:AllowanceTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/ udt:Indicator='false']/ram:ActualAmount)* 10 * 10 ) div 100)