Taxable amount for each rate in category S

Error BR-S-08 EN 16931

For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "Standard rated", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "Standard rated" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119).

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

For at least one VAT rate, the ram:BasisAmount in the VAT breakdown for category S does not equal the sum of the net amounts of the related invoice lines, plus matching document-level charges and minus matching document-level allowances. The related lines and charges or allowances must have category S and the same VAT rate.

What the rule means

For each VAT rate in the VAT breakdown, the taxable amount must derive from invoice lines and charges and allowances with exactly the same category and rate. This prevents different VAT rates from being combined in one taxable amount.

Please reconcile the taxable amount for each rate in category `S`

For at least one VAT rate, the amount in the VAT breakdown for S does not match the related invoice lines and document-level allowances or charges. You can reconcile the amounts for each rate.

What to do
  1. Check TradeLineItem.TaxCategoryCode and TradeLineItem.TaxPercent for the affected invoice lines.
  2. Compare the TradeLineItem.LineTotalAmount amounts for each VAT rate with the corresponding ram:BasisAmount.
  3. Include the matching allowances and charges using AbstractTradeAllowanceCharge.ActualAmount and check their category and rate using TaxCategoryCodes.
  4. Generate the invoice again and validate it once more.
Check in FactoorSharp
  • TaxCategoryCodes (BT-151; BT-95; BT-102; BT-118)
  • AbstractTradeAllowanceCharge.ActualAmount (Document level allowance: BT-92; Document level charge: BT-99)
  • TradeLineItem.LineTotalAmount (BT-131)
  • TradeLineItem.TaxCategoryCode (BT-151)
  • TradeLineItem.TaxPercent (BT-152)
Technical details

The test iterates over the values of ram:RateApplicablePercent and, for each value, compares ram:BasisAmount with the sum of the matching ram:LineTotalAmount amounts plus categorized document-level charges and minus allowances.

Where the rule applies

The rule applies to each VAT breakdown ram:ApplicableTradeTax with ram:CategoryCode S in ram:ApplicableHeaderTradeSettlement.

Context (rule/@context)
//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCode[.='S']
Test expression (assert/@test)
every $rate in ../ram:RateApplicablePercent/xs:decimal(.) satisfies (../ram:BasisAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ ram:ApplicableTradeTax/ram:CategoryCode = 'S' and ram:ApplicableTradeTax/xs:decimal(ram:RateApplicablePercent) =$rate ]/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount)) * 10 * 10) div 100 + round(sum(/ rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='S' and ram:CategoryTradeTax/xs:decimal(ram:RateApplicablePercent)=$rate ]/xs:decimal(ram:ActualAmount)) * 10 * 10) div 100 - round(sum(/rsm:CrossIndustryInvoice/ rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='S' and ram:CategoryTradeTax/xs:decimal(ram:RateApplicablePercent)=$rate ]/xs:decimal(ram:ActualAmount)) * 10 * 10) div 100))