Provide a reference for each supporting document

Error BR-52 EN 16931

Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122).

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

An ram:AdditionalReferencedDocument does not contain a non-empty ram:IssuerAssignedID. This value is the supporting document reference (BT-122).

What the rule means

The reference (BT-122) identifies the supporting document associated with the invoice.

Affected fields BG-24 BT-122
Please add the supporting document reference

A supporting document has a missing or empty reference. Add the reference so that the document is identified in the invoice.

What to do
  1. Find the relevant ram:AdditionalReferencedDocument.
  2. Check the AdditionalReferencedDocument entry or the call to AddAdditionalReferencedDocument(...).
  3. Fill ram:IssuerAssignedID with the supporting document reference.
  4. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:AdditionalReferencedDocument>
  <ram:IssuerAssignedID/>
</ram:AdditionalReferencedDocument>
✓ Correct
<ram:AdditionalReferencedDocument>
  <ram:IssuerAssignedID>REF-123</ram:IssuerAssignedID>
</ram:AdditionalReferencedDocument>
Check in FactoorSharp
  • AdditionalReferencedDocument (Header level: BT-122)
  • AdditionalReferencedDocument.TypeCode (BT-122-0)
  • FacturXInvoice.AddAdditionalReferencedDocument(id, typeCode, issueDateTime, name, referenceTypeCode, attachmentBinaryObject, filename, uriID) (id: BT-122)
Technical details

For each ram:AdditionalReferencedDocument in context, the expression (ram:IssuerAssignedID!='') checks whether its ram:IssuerAssignedID has a non-empty value.

Where the rule applies

The rule applies to each ram:AdditionalReferencedDocument in the invoice.

Context (rule/@context)
//ram:AdditionalReferencedDocument
Test expression (assert/@test)
(ram:IssuerAssignedID!='')