Rules / IBR-102-AE
In a VAT Breakdown where the VAT category code is 'Standard rate additional VAT', for each different value of VAT category rate the VAT category taxable amount shall equal the sum of Invoice line net amounts where the VAT category code is 'Standard rate additional VAT' and the VAT rate equals the VAT category rate
In a VAT Breakdown (IBG-23) where the VAT category code (IBT-118) is 'Standard rate additional VAT', for each different value of VAT category rate (IBT-119) the VAT category taxable amount (IBT-116) shall equal the sum of Invoice line net amounts (IBT-131) where the VAT category code (IBT-151) is 'Standard rate additional VAT' and the VAT rate (IBT-152) equals the VAT category rate (IBT-119).
Fails
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="AED">900.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="AED">0.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>N</cbc:ID>
<cbc:Percent>5</cbc:Percent>
</cac:TaxCategory>
</cac:TaxSubtotal>
<!-- cbc:LineExtensionAmount of the N lines at 5% adds up to 1000.00 -->
Fix
Set cbc:TaxableAmount in the category N breakdown to the sum of cbc:LineExtensionAmount of the lines in category N at that rate (0.02 tolerance). Every N rate in the breakdown needs at least one line at that rate.
Schematron
- Context
/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'N'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']- Test
(cbc:Percent castable as xs:decimal) and (every $rate in xs:decimal(cbc:Percent) satisfies ((exists(//cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID) = "N"][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]) and (u:slack(../xs:decimal(cbc:TaxableAmount), sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)="N"][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)),0.02))) or (exists(//cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID) = "N"][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]) and (u:slack(../xs:decimal(cbc:TaxableAmount), sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)="N"][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) ,0.02)))))
Official text: In a VAT Breakdown (IBG-23) where the VAT category code (IBT-118) is 'Standard rate additional VAT', for each different value of VAT category rate (IBT-119) the VAT category taxable amount (IBT-116) shall equal the sum of Invoice line net amounts (IBT-131) where the VAT category code (IBT-151) is 'Standard rate additional VAT' and the VAT rate (IBT-152) equals the VAT category rate (IBT-119).