BR-DE-26

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

warning: reported, still valid

Why it fails

  • The invoice is marked as corrected (type code 384) but does not say which invoice it corrects.

How to fix it

Add the number of the corrected invoice in cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID (ram:InvoiceReferencedDocument/ram:IssuerAssignedID in CII), with its issue date if you have it.

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

Wenn im Element "Invoice type code" (BT-3) der Code 384 (Corrected invoice) übergeben wird, soll PRECEDING INVOICE REFERENCE BG-3 mind. einmal vorhanden sein.

Context
/ubl:Invoice | /cn:CreditNote
Test
((not(normalize-space(cbc:InvoiceTypeCode) = '384' or normalize-space(cbc:CreditNoteTypeCode) = '384') or (cac:BillingReference/cac:InvoiceDocumentReference)))

Checked with XRechnung 3.0 Invoice (UBL), XRechnung 3.0 Credit Note (UBL)

Message

Wenn im Element Invoice type code (BT-3) der Code 384 (Corrected invoice) übergeben wird, soll PRECEDING INVOICE REFERENCE BG-3 mind. einmal vorhanden sein.

Context
/rsm:CrossIndustryInvoice
Test
not(normalize-space(rsm:ExchangedDocument/ram:TypeCode) = '384') or (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument)

Checked with XRechnung 3.0 Invoice (CII)