Provide the number of the preceding invoice

Error BR-55 EN 16931

Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25).

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

The referenced document does not contain a non-empty IssuerAssignedID. The preceding invoice identifier (BT-25) is therefore missing.

What the rule means

The preceding invoice identifier identifies the document to which the reference relates.

Affected fields BG-3 BT-25
Please provide the number of the preceding invoice

The reference to a preceding invoice does not include an invoice number. Add the identifier so that the referenced document can be identified.

What to do
  1. Check the entries in InvoiceReferencedDocument.
  2. Provide a non-empty IssuerAssignedID for the preceding invoice.
  3. Check the entry using AddInvoiceReferencedDocument(...) or the stored values in _InvoiceReferencedDocuments.
  4. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:InvoiceReferencedDocument>
  <ram:IssuerAssignedID/>
</ram:InvoiceReferencedDocument>
✓ Correct
<ram:InvoiceReferencedDocument>
  <ram:IssuerAssignedID>INV-123</ram:IssuerAssignedID>
</ram:InvoiceReferencedDocument>
Check in FactoorSharp
  • FacturXInvoice.GetInvoiceReferencedDocuments() (BG-3; Id: BT-25)
  • FacturXInvoice._InvoiceReferencedDocuments (BG-3; Id: BT-25)
  • FacturXInvoice.AddInvoiceReferencedDocument(id, IssueDateTime, TypeCode) (BG-3)
Technical details

Within the InvoiceReferencedDocument context, the value of IssuerAssignedID must not be an empty string.

Where the rule applies

The rule applies to each referenced document in InvoiceReferencedDocument within the settlement information.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:InvoiceReferencedDocument
Test expression (assert/@test)
(ram:IssuerAssignedID!='')