Provide the contract reference

Error BR-DE-CVD-01 XRechnung

The element <name/> "Contract reference" (BT-12) shall be provided.

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

A non-empty ram:IssuerAssignedID is missing from ram:ContractReferencedDocument. An empty value or one containing only whitespace does not satisfy the check.

What the rule means

The contract reference links the invoice to the underlying contract. It is required as business information BT-12.

Affected fields BT-12
Please provide the contract reference

The invoice is missing the contract reference, or its identifier is empty. You can add the contract identifier to the contract reference details.

What to do
  1. Check whether ram:ContractReferencedDocument is present.
  2. Enter the contract identifier using SetContractReferencedDocument(...).
  3. Make sure ram:IssuerAssignedID contains a non-empty value.
  4. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:ContractReferencedDocument>
  <ram:IssuerAssignedID/>
</ram:ContractReferencedDocument>
✓ Correct
<ram:ContractReferencedDocument>
  <ram:IssuerAssignedID>CONTR-123</ram:IssuerAssignedID>
</ram:ContractReferencedDocument>
Check in FactoorSharp
  • FacturXInvoice.ContractReferencedDocument (Id of the contract referenced document: BT-12)
  • FacturXInvoice.SetContractReferencedDocument(contractNo, contractDate) (BT-12)
Technical details

The test checks whether ram:ContractReferencedDocument/ram:IssuerAssignedID exists and contains a non-empty value after normalization.

Where the rule applies

The rule applies in ram:ApplicableHeaderTradeAgreement to the contract reference in ram:ContractReferencedDocument.

Original message from the Schematron
Das Element <name/> "Contract reference" (BT-12) muss übermittelt werden.
Context (rule/@context)
/rsm:CrossIndustryInvoice[$isCVD]/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement
Test expression (assert/@test)
ram:ContractReferencedDocument/ram:IssuerAssignedID[boolean(normalize-space(.))]