CII-SR-475

Only one AdditionalReferencedDocument Name BT-123 is allowed with TypeCode 916.

warning: reported, still valid

Why it fails

  • An invoiced object reference (ram:AdditionalReferencedDocument with ram:TypeCode 916) has more than one name, often from attaching several files to one reference.

How to fix it

Give every supporting document its own ram:AdditionalReferencedDocument, each with one ram:Name and one attachment (CII-SR-476).

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:Name) <= 1

Checked with EN 16931 Invoice (CII)

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

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