Rules / ALIGNED-IBRP-O-08
In a VAT breakdown where the VAT category code is " Not subject to VAT" the VAT category taxable amount must equal the sum of Invoice line net amounts minus the sum of Document level allowance amounts plus the sum of Document level charge amounts where the VAT category codes are "Not subject to VAT"
In a VAT breakdown (ibg-23) where the VAT category code (ibt-118) is " Not subject to VAT" the VAT category taxable amount (ibt-116) must equal the sum of Invoice line net amounts (ibt-131) minus the sum of Document level allowance amounts (ibt-92) plus the sum of Document level charge amounts (ibt-99) where the VAT category codes (ibt-151, ibt-95, ibt-102) are "Not subject to VAT".
Fails
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="AED">900.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="AED">0.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>O</cbc:ID>
</cac:TaxCategory>
</cac:TaxSubtotal>
<!-- cbc:LineExtensionAmount of the O lines adds up to 1000.00 -->
Fix
Set cbc:TaxableAmount in the category O breakdown to exactly the sum of cbc:LineExtensionAmount of the O lines, plus document-level charges (cbc:Amount) in O, minus document-level allowances in O. There's no rounding tolerance here.
Schematron
- Context
/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'O'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']- Test
(exists(//cac:InvoiceLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:Amount))))) or (exists(//cac:CreditNoteLine) and (xs:decimal(../cbc:TaxableAmount) = (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='O']/xs:decimal(cbc:Amount)))))
Official text: In a VAT breakdown (ibg-23) where the VAT category code (ibt-118) is " Not subject to VAT" the VAT category taxable amount (ibt-116) MUST equal the sum of Invoice line net amounts (ibt-131) minus the sum of Document level allowance amounts (ibt-92) plus the sum of Document level charge amounts (ibt-99) where the VAT category codes (ibt-151, ibt-95, ibt-102) are "Not subject to VAT".