Provide a reference for each additional 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

At least one ram:AdditionalReferencedDocument is missing a non-empty ram:IssuerAssignedID. This element contains the reference for the additional supporting document (BT-122).

What the rule means

The reference BT-122 identifies the additional supporting document and distinguishes it from other documents associated with the invoice.

Affected fields BG-24 BT-122
Please provide a reference for each additional supporting document

An additional supporting document is missing its reference, or the reference is empty. Add the reference so the document can be identified.

What to do
  1. Find the relevant ram:AdditionalReferencedDocument.
  2. Provide a non-empty reference using AddAdditionalReferencedDocument(...).
  3. 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>DOC-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

The XPath test requires a ram:IssuerAssignedID within the current ram:AdditionalReferencedDocument whose string value is not empty.

Where the rule applies

The rule applies to each ram:AdditionalReferencedDocument representing an additional supporting document at document level.

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