Exactly one issuer identifier for the type 130 reference document

Error FX-SCH-A-000557 Factur-X

Element 'ram:IssuerAssignedID' must occur exactly 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The reference document with ram:TypeCode 130 does not contain exactly one ram:IssuerAssignedID element. It is either missing or occurs more than once.

What the rule means

Exactly one identifier assigned by the issuer must be provided for this reference document.

Please provide exactly one issuer identifier for the type `130` reference document

The reference document with ram:TypeCode 130 is missing ram:IssuerAssignedID or contains it more than once. You can adjust the entries so that exactly one element is present.

What to do
  1. Find the ram:AdditionalReferencedDocument with ram:TypeCode 130 in ram:ApplicableHeaderTradeAgreement.
  2. Make sure this reference document contains exactly one ram:IssuerAssignedID element.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:AdditionalReferencedDocument>
  <ram:TypeCode>130</ram:TypeCode>
</ram:AdditionalReferencedDocument>
✓ Correct
<ram:AdditionalReferencedDocument>
  <ram:TypeCode>130</ram:TypeCode>
  <ram:IssuerAssignedID/>
</ram:AdditionalReferencedDocument>
Technical details

Within the ram:AdditionalReferencedDocument filtered by ram:TypeCode 130, the number of ram:IssuerAssignedID elements must equal one.

Where the rule applies

The rule applies to ram:AdditionalReferencedDocument with ram:TypeCode 130 in ram:ApplicableHeaderTradeAgreement.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:AdditionalReferencedDocument[ram:TypeCode="130"]
Test expression (assert/@test)
count(ram:IssuerAssignedID)=1