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).
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.
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.
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.
- Check
TradeLineItem.TaxCategoryCodeandTradeLineItem.TaxPercentfor the affected invoice lines. - Compare the
TradeLineItem.LineTotalAmountamounts for each VAT rate with the correspondingram:BasisAmount. - Include the matching allowances and charges using
AbstractTradeAllowanceCharge.ActualAmountand check their category and rate usingTaxCategoryCodes. - Generate the invoice again and validate it once more.
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.
The rule applies to each VAT breakdown ram:ApplicableTradeTax with ram:CategoryCode S in ram:ApplicableHeaderTradeSettlement.
rule/@context)assert/@test)