BR-CIUS-PT-18
In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Exempt from VAT" shall have a VAT exemption reason code (BT-160) or VAT exemption reason text (BT-160).
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
cac:InvoiceLine/cac:Item | cac:CreditNoteLine/cac:Item
((cac:ClassifiedTaxCategory/cbc:ID) = 'E' or (cac:ClassifiedTaxCategory/cbc:ID) = 'ISE') and not(cac:AdditionalItemProperty)
Checked with Portugal CIUS-PT Invoice (UBL), Portugal CIUS-PT Credit Note (UBL)