Rules / IBR-151-AE
When Invoice type code is 'Commercial invoice' or 'Credit note', Invoiced item VAT category code should not only contain 'Exempt from VAT' and/or 'Not subject to VAT'
When Invoice type code (IBT-003) is 'Commercial invoice' or 'Credit note', Invoiced item VAT category code (IBT-151) should not only contain 'Exempt from VAT' and/or 'Not subject to VAT'.
Fails
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
…
<!-- every line's cac:ClassifiedTaxCategory/cbc:ID is E or O -->
Fix
A commercial invoice (380) or credit note (381) needs at least one line whose cac:ClassifiedTaxCategory/cbc:ID isn't E or O. If the whole document is outside VAT, use type 480 (or 81 for its credit note).
Schematron
- Context
/ubl:Invoice | /cn:CreditNote- Test
not(((cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode) = "380") or ((cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode) = "381")) or exists((cac:InvoiceLine | cac:CreditNoteLine)/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:ID) != "E" and normalize-space(cbc:ID) != "O"])
Official text: When Invoice type code (IBT-003) is 'Commercial invoice' or 'Credit note', Invoiced item VAT category code (IBT-151) should not only contain 'Exempt from VAT' and/or 'Not subject to VAT'.