Skip to content

[Docs D-29] Troubleshooting — Credit notes and corrective invoices #94

Description

@nielsdrost7

Wiki section: Troubleshooting
Tier: 4 — Troubleshooting
Publish when: InvoicePlane v1.8.0 is released


How InvoicePlane signals a credit note

InvoicePlane sets invoice_sign = 0 on credit note records. The generators detect this and switch to the appropriate credit note document type.


CII credit notes (Factur-X, ZUGFeRD, XRechnung CII)

In CII, a credit note uses TypeCode 381 instead of the invoice TypeCode 380:

  381  
  ...

All amounts remain positive — the TypeCode itself signals that the amounts reduce the buyer's liability.


UBL credit notes (UBL CIUS variants)

In UBL, credit notes use a separate root element:

  381
  ...

The generator switches from ubl:Invoice to ubl:CreditNote automatically when invoice_sign = 0.


Format support summary

Format Credit note supported? Notes
Factur-X (all profiles) ✅ Yes TypeCode 381
ZUGFeRD 2.3 (all profiles) ✅ Yes TypeCode 381
XRechnung CII ✅ Yes TypeCode 381
XRechnung UBL ✅ Yes ubl:CreditNote
UBL.BE ✅ Yes ubl:CreditNote, DocumentType = CreditNote (rule ubl-BE-02)
SI-UBL NL ✅ Yes ubl:CreditNote
CIUS-RO ✅ Yes ubl:CreditNote
CIUS-PT ✅ Yes ubl:CreditNote
KSeF (Poland) ❌ No Corrective invoices require a separate FA-3 corrective document type not yet implemented
FatturaPA (Italy) ⚠️ Partial Experimental — verify against SdI rules
Facturae (Spain) ⚠️ Partial Experimental

KSeF corrective invoices

The KSeF v2.0 generator does not support corrective invoices (Polish: faktura korygująca). The FA-3 format has a dedicated structure for corrections that differs significantly from a standard invoice. This is a known limitation — see the KSeF country guide for the full list of unsupported invoice types.


Referencing the original invoice (BT-25)

EN 16931 recommends (but does not always mandate) that a credit note reference the original invoice number. InvoicePlane stores this in creditinvoice_parent_id. Generator support for including this reference in the XML varies by format:

  • CII: ram:InvoiceReferencedDocument/ram:IssuerAssignedID
  • UBL: cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID

Check the specific generator's implementation for whether this field is currently exported.


Migrated from InvoicePlane/InvoicePlane-e-invoices#53.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions