PintLint

Rules / IBR-191-AE

Payment means type code must be provided except when the invoice type code is 'Credit note' or "Credit note related to goods or services", or Invoice transaction-type code is X1XXXXXX (Deemed supply)

Payment means type code (ibt-081) must be provided except when the invoice type code (ibt-003) is 'Credit note' or "Credit note related to goods or services", or Invoice transaction-type code (BTAE-002) is X1XXXXXX (Deemed supply).

Fails

<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<!-- no cac:PaymentMeans/cbc:PaymentMeansCode -->

Fix

Add cac:PaymentMeans with cbc:PaymentMeansCode, for example 30 for a credit transfer. Credit notes (381, 81, 261) and deemed supplies (second digit of cbc:ProfileExecutionID is 1) don't need it.

Schematron
Context
/ubl:Invoice | /cn:CreditNote
Test
((cbc:InvoiceTypeCode|cbc:CreditNoteTypeCode) = "81" or (cbc:InvoiceTypeCode|cbc:CreditNoteTypeCode) = "381" or (cbc:InvoiceTypeCode|cbc:CreditNoteTypeCode) = "261" or matches(cbc:ProfileExecutionID, "^[01]1[01]{6}$")) or exists(cac:PaymentMeans/cbc:PaymentMeansCode)

Official text: Payment means type code (ibt-081) must be provided except when the invoice type code (ibt-003) is 'Credit note' or "Credit note related to goods or services", or Invoice transaction-type code (BTAE-002) is X1XXXXXX (Deemed supply).

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

Check your invoice for this rule