BR-FREXT-S-08
Num Fact : … , Code : … , rate : … , ExemptText : … , Exemptcode : … , basisAmount : … , SumBT131 : … , NBlines : … , sumAllowBT-92 : … , sumChargesBT-99 : … , NBAllowCharges : … , SumBT131ini : … , NBlinesini : … , sumAllowBT-92ini : … , sumChargesBT-99ini : … , NBAllowChargesini : … , [BR-FREXT-S-08] - Dans une ventilation TVA (BG-23), pour chaque taux de TVA (BT-119) où le code catégorie (BT-118) est "S" (Taux normal), l’écart absolu entre le montant taxable (BT-116) et la somme des montants nets ligne (BT-131) + charges (BT-99) - remises (BT-92) doit être ≤ 0,01 € * nombre total d’éléments concernés.
In English In a VAT breakdown (BG-23), for each VAT rate (BT-119) with the VAT category code (BT-118) S (standard rate), the taxable amount (BT-116) must equal the line net amounts (BT-131) plus charges (BT-99) minus allowances (BT-92), within 0.01 per item.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element
[BR-FREXT-S-08ini] Num Fact : … , Code : … , rate : … , ExemptText : … , Exemptcode : … , basisAmount : … , SumBT131 : … , NBlines : … , sumAllowBT-92 : … , sumChargesBT-99 : … , NBAllowCharges : … , SumBT131ini : … , NBlinesini : … , sumAllowBT-92ini : … , sumChargesBT-99ini : … , NBAllowChargesini : … , [BR-FREXT-S-08] - Dans une ventilation TVA (BG-23), pour chaque taux de TVA (BT-119) où le code catégorie (BT-118) est "S" (Taux normal), l’écart absolu entre le montant taxable (BT-116) et la somme des montants nets ligne (BT-131) + charges (BT-99) - remises (BT-92) doit être ≤ 0,01 € * nombre total d’éléments concernés.
/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
(abs($basisAmount - $calculatedAmountBT131 + $allowancesAmountBT92 - $chargesAmountBT99) le 0.01 * ($nbLineItems + $nbAllowancesOrCharges)) or (abs($basisAmount - $calculatedAmountBT131ini + $allowancesAmountBT92ini - $chargesAmountBT99ini) le 0.01 * ($nbLineItemsini + $nbAllowancesOrChargesini))
Checked with France EXTENDED-CTC-FR (UBL)