Rules / IBR-138-AE
Invoicing period is must, where Invoice transaction type code is XXX1XXXX (Summary invoice)
Invoicing period [IBG-14] is must, where Invoice transaction type code [BTAE-02] is XXX1XXXX (Summary invoice).
Fails
<cbc:ProfileExecutionID>00010000</cbc:ProfileExecutionID>
<!-- no cac:InvoicePeriod -->
Fix
A summary invoice (fourth digit of cbc:ProfileExecutionID is 1) needs cac:InvoicePeriod with the period it covers. If it isn't a summary invoice, set that digit to 0.
Schematron
- Context
/ubl:Invoice | /cn:CreditNote- Test
(matches(cbc:ProfileExecutionID, "^[01]{3}1[01]{4}$") and cac:InvoicePeriod) or not(matches(cbc:ProfileExecutionID, "^[01]{3}1[01]{4}$"))
Official text: Invoicing period [IBG-14] is MUST, where Invoice transaction type code [BTAE-02] is XXX1XXXX (Summary invoice).