BR-CIUS-PT-30
If Additional Supporting Documents (BG-24) is used, the External document location (BT-124) or the Attached document (BT-125) shall be filled, or both.
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:AdditionalDocumentReference
exists(cac:Attachment) and (not(cac:Attachment/cbc:EmbeddedDocumentBinaryObject) and not(cac:Attachment/cac:ExternalReference/cbc:URI))
Checked with Portugal CIUS-PT Invoice (UBL), Portugal CIUS-PT Credit Note (UBL)