Invoice total excluding VAT

Error BR-CO-13 EN 16931

Invoice total amount without VAT (BT-109) = Σ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108).

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

TaxBasisTotalAmount does not equal LineTotalAmount minus AllowanceTotalAmount plus ChargeTotalAmount. If either the allowance or charge total is absent, the invoice total excluding VAT must match the amounts that are present.

What the rule means

The amount excluding VAT combines the net amounts of invoice lines with document-level allowances and charges. The check ensures that these components calculate to the same invoice amount.

Affected fields BT-109 BT-131 BT-107 BT-108
Please reconcile the invoice total excluding VAT

The amount excluding VAT does not match the invoice line net amounts and the allowances and charges. You can adjust the totals so that the invoice calculation balances.

What to do
  1. Compare TaxBasisTotalAmount with LineTotalAmount minus AllowanceTotalAmount plus ChargeTotalAmount.
  2. Include only the total elements that are present in the invoice.
  3. Check the TaxBasisAmount, LineTotalAmount, AllowanceTotalAmount and ChargeTotalAmount properties.
  4. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
  <ram:LineTotalAmount>100.00</ram:LineTotalAmount>
  <ram:AllowanceTotalAmount>10.00</ram:AllowanceTotalAmount>
  <ram:ChargeTotalAmount>5.00</ram:ChargeTotalAmount>
  <ram:TaxBasisTotalAmount>96.00</ram:TaxBasisTotalAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
✓ Correct
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
  <ram:LineTotalAmount>100.00</ram:LineTotalAmount>
  <ram:AllowanceTotalAmount>10.00</ram:AllowanceTotalAmount>
  <ram:ChargeTotalAmount>5.00</ram:ChargeTotalAmount>
  <ram:TaxBasisTotalAmount>95.00</ram:TaxBasisTotalAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
Check in FactoorSharp
  • FacturXInvoice.AllowanceTotalAmount (BT-107)
  • FacturXInvoice.ChargeTotalAmount (BT-108)
  • FacturXInvoice.TaxBasisAmount (BT-109)
  • TradeLineItem.LineTotalAmount (BT-131)
Technical details

The XPath check compares TaxBasisTotalAmount with the available totals and allows AllowanceTotalAmount or ChargeTotalAmount to be absent and omitted from the calculation. The comparison is rounded to two decimal places.

Where the rule applies

The rule applies to the amounts in SpecifiedTradeSettlementHeaderMonetarySummation: TaxBasisTotalAmount is checked against LineTotalAmount, AllowanceTotalAmount and ChargeTotalAmount.

Context (rule/@context)
//ram:SpecifiedTradeSettlementHeaderMonetarySummation
Test expression (assert/@test)
(xs:decimal(ram:TaxBasisTotalAmount[1]) = round((xs:decimal(ram:LineTotalAmount[1]) - xs:decimal(ram:AllowanceTotalAmount[1]) + xs:decimal(ram:ChargeTotalAmount[1])) * 10 * 10) div 100) or ( (xs:decimal(ram:TaxBasisTotalAmount[1]) = round((xs:decimal(ram:LineTotalAmount[1]) - xs:decimal(ram:AllowanceTotalAmount[1])) * 10 * 10) div 100) and not(ram:ChargeTotalAmount) ) or ( (xs:decimal(ram:TaxBasisTotalAmount[1]) = round((xs:decimal(ram:LineTotalAmount[1]) + xs:decimal(ram:ChargeTotalAmount[1])) * 10 * 10) div 100) and not(ram:AllowanceTotalAmount) ) or ( (xs:decimal(ram:TaxBasisTotalAmount[1]) = round((xs:decimal(ram:LineTotalAmount[1])) * 10 * 10) div 100) and not(ram:ChargeTotalAmount) and not(ram:AllowanceTotalAmount) )