IBR-055-AE

When invoice type code (IBT-003) is 381 (Credit note) or 81 (Credit note related to goods or services), the Credit note reason code (BTAE-03) MUST be provided. Preceding invoice reference (IBG-03) MUST be provided when the Credit note reason code is other than 'VD' and MUST NOT be provided when it is 'VD'.

About

ID
ibr-055-ae
Flag
fatal
Context
/ubl:Invoice | /cn:CreditNote
Test
(((cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode) = "381" or (cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode) = "81") and (((cac:BillingReference) and (cac:DiscrepancyResponse/cbc:ResponseCode != "VD")) or (not(cac:BillingReference) and (cac:DiscrepancyResponse/cbc:ResponseCode = "VD")))) or not((cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode) = "381" or (cbc:InvoiceTypeCode | cbc:CreditNoteTypeCode) = "81")