Linux 软件免费装
Banner图

Jojobry E-Rechnung for WooCommerce

开发者 jojobry
更新时间 2026年11月4日 08:23
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

invoice ubl xrechnung e-rechnung en16931

下载

0.1.0

详情介绍:

Germany phases in mandatory B2B electronic invoicing in 2027 and 2028; the obligation to receive electronic invoices has been in force since 1 January 2025. This plugin turns any WooCommerce order into a structured invoice in the EN 16931 format — no external service, no account, no running costs. Everything happens on the shop's own server. The interface and the generated documents are German, because the formats this plugin implements (XRechnung, the Leitweg-ID routing identifier, the BR-DE business rules) are the German national implementation of EN 16931. What the plugin does Why valid EN 16931 XML is not yet an XRechnung EN 16931 is the European semantic core of an electronic invoice. XRechnung is the German implementation of it, and it adds a rule set of its own — BR-DE — on top of the European rules. Which of the two a validator applies is decided by a single field in the file, the specification identifier BT-24. A file carrying the plain European identifier urn:cen.eu:en16931:2017 is measured against the European rules only; the German rules are never applied to it, no matter how correct it is. That is why software can write XML a validator accepts and still not produce an XRechnung. This plugin writes the XRechnung 3.0 identifier and fills the fields the German rules then demand, among them: A file that is missing these is rejected the moment it claims to be an XRechnung — which is exactly what a German authority asks for. What the plugin deliberately does not do It does not create a PDF and does not embed anything into a PDF/A-3. A complete ZUGFeRD document is a PDF with embedded XML; this plugin delivers the XML. If you need a PDF, combine it with an invoice PDF plugin. Data and requests The plugin makes no outbound HTTP requests at all: no update check, no telemetry, no validation service, no CDN. Nothing about an order or about the shop leaves the server. The XML is built in memory; only the e-mail attachment needs a file on disk, and that one is written to the server's temporary directory with owner-only permissions and deleted again as soon as WooCommerce has handed the mail over. On a host whose temporary directory is not writable the file falls back to a locked-down subdirectory of the uploads folder — on Apache the .htaccess deny there blocks access, on nginx such a deny has no effect and the file is instead protected only by its random name for the seconds it exists. Everything the plugin stores lives in WordPress options and order meta, all prefixed wc_erechnung_, and uninstalling removes every one of them. A refund booked in WooCommerce does not change the e-invoice itself — the file keeps showing the full amount — but it gets its own credit note (BT-3 = 381) with a reference to the original invoice (BG-3), downloadable per format right next to the invoice on the order screen. A wrongly issued invoice is handled the other way round: correct the order, then tick Rechnung berichtigen on the order screen and the plugin writes a corrected invoice (BT-3 = 384) that names the superseded document in BG-3 and states that it is not to be paid. An invoice that has gone out stays reproducible. The first time an invoice is really issued — the moment its number is drawn, which is what a download and the e-mail attachment do and what the preview deliberately does not — the plugin freezes the XML of both syntaxes on the order. Every later request returns that copy byte for byte, even after the order has been corrected, and the order screen says since when. So the shop can still produce the document it actually sent, which is what an audit asks for; a changed state is a correction with a number of its own, not a rewritten invoice. Conformance The generated files are checked against the official KoSIT validator using the "Validator Configuration XRechnung 3.0.2" configuration. All bundled test cases — standard invoice, small-business exemption, reverse charge, mixed tax rates, prepayment, minimal invoice, credit note, corrected invoice — are rated ACCEPTABLE in both syntaxes. Which scenario the validator picks is part of the test, not just the verdict: every one of the 48 documents the test suite generates is matched to an XRechnung scenario — EN16931 XRechnung (UBL Invoice), EN16931 XRechnung (UBL CreditNote) or EN16931 XRechnung (CII) — and therefore measured against the BR-DE rules, not only against the European ones. A file that landed in the plain EN16931 scenario would fail the test suite even if the validator accepted it.

安装:

  1. Install and activate the plugin. WooCommerce has to be active.
  2. Open WooCommerce → Settings → E-Rechnung.
  3. Fill in the seller details under Stammdaten (master data). The top of the page permanently lists the mandatory fields that are still missing.
  4. Under Ausgabe & Versand (output and delivery) choose the format and decide whether the XML file is attached to the invoice e-mail.
  5. Place a test order and download the file from the E-Rechnung box on the order screen.

屏幕截图:

  • Output format and delivery options.
  • The E-Rechnung box on the order screen, with Leitweg-ID and download.

升级注意事项:

0.1.4 Invoices that have been issued are frozen from now on and stay downloadable unchanged after a correction. Invoices issued before this version have no frozen copy — their next download still renders the order as it stands today, and the order screen says so. 0.1.3 Wrongly issued invoices can be corrected now: a corrected invoice (BT-3 = 384) with a reference to the superseded document, downloadable per format. 0.1.2 Refunds get a downloadable credit note (BT-3 = 381) now instead of just a notice that the invoice stays unchanged. 0.1.1 Makes the refund limit visible: orders with a refund now say on the order screen that the e-invoice keeps the full amount. 0.1.0 First release.

常见问题:

My invoice plugin already writes EN 16931 XML. Do I need this one?

Check the specification identifier (BT-24) of a file it produced. If it reads urn:cen.eu:en16931:2017, the file is a European invoice and the German BR-DE rules were never applied to it — a recipient who asks for an XRechnung will reject it, and setting the identifier by hand does not fix it, because the fields those rules require are then missing: Leitweg-ID (BT-10), seller contact point and telephone (BT-41, BT-42), delivery date (BT-72), business process (BT-23), electronic addresses (BT-34, BT-49). This plugin writes urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0 and fills those fields. If all you need is a European EN 16931 file, you do not need this plugin.

Do I need a VAT identification number?

No. A tax number (BT-32) is enough. Businesses using the German small-business exemption enter their tax number and leave the VAT identification number empty.

What is the Leitweg-ID and do I need it?

The Leitweg-ID addresses an invoice at a German public authority, for example 04011000-1234512345-06. Authorities hand it out. For invoices to ordinary business customers the field is not needed — the plugin puts the order number in as the buyer reference instead.

Why can't I generate an invoice for an order?

Then a mandatory field is missing. The E-Rechnung box on the order screen names every missing entry together with its rule number, and links straight to the settings when the problem is in the master data.

I refunded an order. Does the e-invoice change?

The invoice itself stays unchanged and keeps showing the original amount — that's correct, EN 16931 corrects a refund with a separate document, not by editing the invoice. The E-Rechnung box on the order screen shows the refunded amount and a download button per format for the credit note (BT-3 = 381) that belongs to it.

I issued an invoice with wrong data. What now?

Correct the order first — address, company name, items — and then tick Rechnung berichtigen in the E-Rechnung box and save. The plugin writes a corrected invoice (BT-3 = 384) that carries the corrected state, names the superseded invoice in BG-3 and says in the payment terms that the superseded invoice is not to be paid. Correct again and the second correction supersedes the first, so there is always exactly one document that is valid. The original invoice is not touched by any of this: it was frozen when it went out and keeps returning the wrong data on purpose, because that is what the customer received.

Can I still download the invoice I actually sent?

Yes. An invoice is frozen the first time it is really issued, in both syntaxes at once, and every later download returns that copy unchanged — the order screen names the date and time it was frozen. Correcting the order afterwards does not rewrite it; that is what the corrected invoice (BT-3 = 384) is for. One limit: invoices issued before version 0.1.4 have no frozen copy, so for those the download still renders today's state of the order. The order screen says so, per order.

Does this work with the block checkout?

Yes. The Leitweg-ID and the VAT identification number are registered for both the classic and the block checkout, and end up on the same order.

Is HPOS supported?

Yes, the WooCommerce order tables (High-Performance Order Storage) are supported.

更新日志:

0.1.4 0.1.3 0.1.2 0.1.1 0.1.0