Total of charges and logistics service fees

Error BR-FXEXT-CO-12 Factur-X

Absolute Value of (Sum of charges on document level (BT-108) - Σ Document level charge amounts (BT-99) - Σ Logistics Service fee amounts (BT-x-272))<= 0,01 * (Number of Document level charge amounts (BT-99) + Number of Logistics Service fee amounts (BT-X-272)).

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

If charges or logistics service fees are present, ram:ChargeTotalAmount differs from their sum by more than the permitted tolerance. The tolerance is 0.01 for each charge or logistics service fee.

What the rule means

The document-level charge total must reflect the individual charges and logistics service fees. A limited rounding difference is allowed.

Affected fields BT-108 BT-99 BT-X-272
Please reconcile the total charge amount

The document-level charge total does not agree sufficiently with the recorded charges and logistics service fees. You can compare and reconcile the relevant amounts.

What to do
  1. Compare FacturXInvoice.ChargeTotalAmount with the amounts of document-level charges and logistics service fees.
  2. Check the AbstractTradeAllowanceCharge.ActualAmount values for charges and the AppliedAmount values for logistics service fees.
  3. Generate the invoice again and validate it once more.
Check in FactoorSharp
  • FacturXInvoice.ChargeTotalAmount (BT-108)
  • AbstractTradeAllowanceCharge.ActualAmount (Document level charge: BT-99)
Technical details

The amounts in ram:ActualAmount for charges and in ram:AppliedAmount for logistics service fees are summed and rounded. The absolute difference is evaluated using 0.01 for each counted entry.

Where the rule applies

The rule applies to ram:SpecifiedTradeSettlementHeaderMonetarySummation and compares ram:ChargeTotalAmount with document-level charges and logistics service fees.

Context (rule/@context)
//ram:SpecifiedTradeSettlementHeaderMonetarySummation
Test expression (assert/@test)
( not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']) and not (ram:ChargeTotalAmount) ) or ( for $calculatedAmount 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)), $totalAmount in xs:decimal(ram:ChargeTotalAmount), $nbChargeItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/ udt:Indicator='true']) + count(../ram:SpecifiedLogisticsServiceCharge)), $tolerance in xs:decimal(0.01), $maxTolerance in $nbChargeItems * $tolerance, $diff in xs:decimal($totalAmount - $calculatedAmount), $abs in xs:decimal(abs($diff)) return $abs le $maxTolerance )