PintLint

Rules / IBR-116-AE

When Invoice transaction-type code has value XX1XXXXX (Margin scheme), then the tax category code should have 'Standard rate additional VAT'

When Invoice transaction-type code (BTAE-02) has value XX1XXXXX (Margin scheme), then the tax category code (IBT-151) should have 'Standard rate additional VAT'.

Fails

<cbc:ProfileExecutionID>00100000</cbc:ProfileExecutionID>
…
<cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID>…</cac:ClassifiedTaxCategory>

Fix

Under the margin scheme (third digit of cbc:ProfileExecutionID is 1), every VAT category ID (cac:ClassifiedTaxCategory/cbc:ID and cac:TaxCategory/cbc:ID) must be N. If it isn't a margin-scheme supply, set that digit to 0.

Schematron
Context
/ubl:Invoice | /cn:CreditNote
Test
not(matches(cbc:ProfileExecutionID, "^[01]{2}1[01]{5}$")) or not((//cac:TaxCategory/cbc:ID | //cac:ClassifiedTaxCategory/cbc:ID)[normalize-space(.) != "N"])

Official text: When Invoice transaction-type code (BTAE-02) has value XX1XXXXX (Margin scheme), then the tax category code (IBT-151) should have 'Standard rate additional VAT'.

Official · PINT AE (UAE) rules. Severity: error. Runs on UBL XML.

Check your invoice for this rule