VRBL-INV-AE-1p0-145
Basic Info
| Rule | When Invoice type code is '381' or '81', the preceding invoice reference Billing Reference Group MUST be provided, EXCEPT when the Credit note reason code is 'VD' (in which case it MUST NOT be provided). |
| Context |
/ubl:Invoice
|
| Pattern | vrbl-invoice-AE-1p0 |
| Severity | fatal |
Implementation
not(cbc:InvoiceTypeCode = '381' or cbc:InvoiceTypeCode = '81')
or
(boolean(cac:BillingReference) = not(cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:InvoiceExtension/vrbl:DocumentReasonCode = 'VRBL:AE:VD'))