Skip to content

Feature Request: Support for Self-Billing / Credit Notes (§ 14 para. 2 sentence 2 UStG, Invoice Type Code 389) #215

@timschneider

Description

@timschneider

Background
In many business models (e.g. platforms, agencies, agriculture, energy, logistics), self-billing is a common and legally accepted process. In this scenario, the recipient of the service issues the invoice in the form of a credit note (“Gutschrift”) in accordance with § 14 para. 2 sentence 2 of the German VAT Act (UStG).

With the increasing adoption and mandatory use of electronic invoices (EN 16931 / XRechnung / ZUGFeRD), there is a growing need to generate legally compliant self-billed e-invoices.

Currently, the ERPNext plugin eu_einvoice primarily supports generating e-invoices from Sales Invoices. However, it is not possible to create a compliant self-billed e-invoice (credit note) from a Purchase Invoice.

Requested Feature
Implementation of Self-Billed Invoice support (EN 16931 Invoice Type Code 389) in accordance with EU e-invoicing standards and German VAT law (§ 14 para. 2 sentence 2 UStG).

Specifically:

  • Creation of a Purchase Invoice in ERPNext
  • Explicit marking as Self-Billing / Credit Note
  • Export of a valid EN 16931–compliant e-invoice (XRechnung / ZUGFeRD) with:
    • InvoiceTypeCode = 389
    • Correct designation as credit note (self-billed invoice)
    • Supplier = service provider
    • Invoice issuer = service recipient
  • Full EN 16931 compliance
  • Ideally configurable via UI (e.g. checkbox “Self-Billed Invoice”)

Estimated Effort:
Based on initial discussions with the maintainers, an initial implementation is estimated at approximately 2–3 engineering days.

This would likely cover:

  • Mapping Purchase Invoice → EN 16931 credit note
  • Invoice type handling (389)
  • Basic validation and export via eu_einvoice

Value for the Community

  • Legally compliant support for self-billing processes
  • Compliance with current and upcoming e-invoicing mandates
  • Significantly broader applicability of ERPNext in EU B2B scenarios
  • Especially relevant for platform operators, agencies, agricultural businesses, energy providers, and logistics companies

Current Status
I have already discussed this with the maintainers. They are open to implementing this feature, provided that enough interested parties come together to co-fund the development.

Call to Action 🚀
👉 Who else needs Self-Billing / Credit Notes as EN 16931 e-invoices in ERPNext?

Please comment if you:

  • Require this feature
  • Are willing to contribute to funding
  • Represent a company or project affected by self-billing

Optional but helpful:

  • Estimated volume of self-billed invoices per year
  • Preferred e-invoice format (XRechnung / ZUGFeRD)
  • Interest in co-sponsoring or implementation partnership

The more feedback and commitments we gather, the sooner this feature can be implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions