Rules / IBR-142-AE
In Delivery Information, Deliver to address line 1, Deliver to city, Deliver to country subdivision must be there, in case the Invoice transaction type code is XXXXXX1X (E-commerce supplies)
In Delivery Information (ibg-13), Deliver to address line 1 (IBT-075), Deliver to city (IBT-077), Deliver to country subdivision (IBT-079) must be there, in case the Invoice transaction type code [BTAE-02] is XXXXXX1X (E-commerce supplies).
Fails
<cbc:ProfileExecutionID>00000010</cbc:ProfileExecutionID>
<cac:Delivery><cac:DeliveryLocation><cac:Address>
<!-- no cbc:StreetName, cbc:CityName or cbc:CountrySubentity -->
</cac:Address></cac:DeliveryLocation></cac:Delivery>
Fix
E-commerce supplies (seventh digit of cbc:ProfileExecutionID is 1) need the delivery address: cbc:StreetName, cbc:CityName and cbc:CountrySubentity under cac:Delivery/cac:DeliveryLocation/cac:Address. If it isn't an e-commerce supply, set that digit to 0.
Schematron
- Context
/ubl:Invoice | /cn:CreditNote- Test
not(matches(cbc:ProfileExecutionID, "^[01]{6}1[01]$")) or (cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:StreetName and cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:CityName and cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:CountrySubentity)
Official text: In Delivery Information (ibg-13), Deliver to address line 1 (IBT-075), Deliver to city (IBT-077), Deliver to country subdivision (IBT-079) MUST be there, in case the Invoice transaction type code [BTAE-02] is XXXXXX1X (E-commerce supplies).