PEPPOL-EN16931-R101

The rule sets below word this rule differently; each wording is shown with its rule set.

error: the document is invalid Peppol documentation ↗

Why it fails

  • A line has a cac:DocumentReference whose cbc:DocumentTypeCode is not 130, such as a delivery note or an order reference.

How to fix it

On a line, cac:DocumentReference is only for the invoiced object identifier, with cbc:DocumentTypeCode 130. A line's order reference goes in cac:OrderLineReference/cbc:LineID.

What the rule checks

As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.

Message

Element Document reference can only be used for Invoice line object

Context
cac:InvoiceLine | cac:CreditNoteLine
Test
(not(cac:DocumentReference) or (cac:DocumentReference/cbc:DocumentTypeCode='130'))

Checked with Peppol BIS Billing 3.0 Invoice, Peppol BIS Billing 3.0 Credit Note

Message

Element Additional referenced document can only be used for Invoice line object.

Context
ram:IncludedSupplyChainTradeLineItem
Test
(not(ram:SpecifiedLineTradeSettlement/ram:AdditionalReferencedDocument) or (ram:SpecifiedLineTradeSettlement/ram:AdditionalReferencedDocument/ram:TypeCode='130'))

Checked with XRechnung 3.0 Invoice (CII)