CII-SR-476

Only one AdditionalReferencedDocument AttachmentBinaryObject BT-125 is allowed with TypeCode 916.

warning: reported, still valid

Why it fails

  • One ram:AdditionalReferencedDocument with ram:TypeCode 916 carries more than one ram:AttachmentBinaryObject.

How to fix it

Split the attachments into one ram:AdditionalReferencedDocument each.

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.

Context
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument
Test
normalize-space(ram:TypeCode) != '916' or count(ram:AttachmentBinaryObject) <= 1

Checked with EN 16931 Invoice (CII)

Context
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement
Test
count(ram:AdditionalReferencedDocument[normalize-space(ram:TypeCode) = '916']/ram:AttachmentBinaryObject) <= 1

Checked with France e-invoice (CII), XRechnung 3.0 Invoice (CII)