Invoice total without VAT

Error BR-FXEXT-CO-13 Factur-X

Absolute Value of (Invoice total amount without VAT (BT-109) - ∑ Invoice line net amounts (BT-131) + Σ Document level allowance amounts (BT-92) - Σ Document level charge amounts (BT-99)) <= 0,01 * (Number of line net amounts (BT-131) + Number of Document level allowance amounts (BT-92) + Number of Document level charge amounts (BT-99)).

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

ram:TaxBasisTotalAmount differs from the sum of invoice line net amounts minus document-level allowances plus document-level charges by more than the permitted tolerance. The tolerance is 0.01 for each included invoice line, allowance, and charge.

What the rule means

The amount without VAT represents the invoice line net amounts after document-level allowances and charges have been applied. It is the basis for the subsequent tax amounts.

Affected fields BT-109 BT-131 BT-92 BT-99
Please reconcile the invoice total without VAT

The invoice total without VAT does not agree sufficiently with the invoice line net amounts and the document-level allowances and charges. You can compare the components of the amount.

What to do
  1. Compare FacturXInvoice.TaxBasisAmount with the included TradeLineItem.LineTotalAmount values.
  2. Subtract the AbstractTradeAllowanceCharge.ActualAmount amounts for allowances and include the amounts for charges and logistics service fees.
  3. Generate the invoice again and validate it once more.
Check in FactoorSharp
  • AbstractTradeAllowanceCharge.ActualAmount (Document level allowance: BT-92; Document level charge: BT-99)
  • FacturXInvoice.TaxBasisAmount (BT-109)
  • TradeLineItem.LineTotalAmount (BT-131)
Technical details

The test compares ram:TaxBasisTotalAmount with the sum of included ram:LineTotalAmount values, minus allowance amounts and plus charge and logistics service fee amounts. Amounts are rounded to two decimal places; the tolerance scales with the number of included entries.

Where the rule applies

The rule applies to ram:SpecifiedTradeSettlementHeaderMonetarySummation and compares ram:TaxBasisTotalAmount with invoice line net amounts, document-level allowances, and document-level charges.

Context (rule/@context)
//ram:SpecifiedTradeSettlementHeaderMonetarySummation
Test expression (assert/@test)
for $BT109 in xs:decimal(ram:TaxBasisTotalAmount), $BT131Sum in xs:decimal(round(sum(../../ram:IncludedSupplyChainTradeLineItem[ not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode) or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL' ]/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ ram:LineTotalAmount) * xs:decimal(100)) div xs:decimal(100)), $BT92Sum in xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/ udt:Indicator='false']/ram:ActualAmount)* 10 * 10 ) div 100), $BT99Sum in xs:decimal(xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/ udt:Indicator='true']/ram:ActualAmount)* 100 ) div 100)+ xs:decimal(round(sum(/ rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount)* 10 * 10 ) div 100)), $nbLineItems in xs:decimal(count(../../ram:IncludedSupplyChainTradeLineItem[ not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode) or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL' ])), $nbAllowanceItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/ udt:Indicator='false'])), $nbChargeItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/ udt:Indicator='true']) + count(../ram:SpecifiedLogisticsServiceCharge)), $tolerance in xs:decimal(0.01), $maxTolerance in $tolerance * ($nbLineItems + $nbAllowanceItems + $nbChargeItems), $diff in xs:decimal($BT109 - $BT131Sum + $BT92Sum - $BT99Sum), $abs in xs:decimal(abs($diff)) return $abs le $maxTolerance