=== Rechnova – E-Rechnung Empfang & Archiv ===
Contributors: florianberg
Tags: e-rechnung, xrechnung, zugferd, rechnung, archiv
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Receive, read, validate and archive incoming e-invoices (XRechnung, ZUGFeRD) – locally in WordPress, no cloud.

== Description ==

Since January 1, 2025, **every German business must be able to receive and archive electronic invoices** – from freelancers to large companies. The problem: an XRechnung is a raw XML file that is practically unreadable for humans.

This plugin turns your WordPress into an **inbox and archive for incoming e-invoices**:

* **Upload**: XRechnung files (XML, both UBL and CII syntax) and ZUGFeRD/Factur-X PDFs
* **Human-readable view**: the invoice is displayed like a normal invoice – seller, buyer, line items, amounts, VAT rates, due date, bank details, routing ID (Leitweg-ID)
* **Validation**: a basic check of the EN 16931 mandatory fields with clear error messages in German, including arithmetic checks of the totals
* **Archive**: a searchable invoice list with filters for seller, date, amount, format and validation status. The original file is kept unchanged in a protected folder, and a SHA-256 checksum documents its integrity – supporting a GoBD-compliant archiving process.

= Privacy first =

Everything runs **locally in your WordPress**. No cloud, no external service, no tracking – your invoice data never leaves your server.

= Who is this for? =

Freelancers, agencies and small businesses in Germany that want to make incoming e-invoices readable and keep them organized. WooCommerce is **not** required – the plugin works in any WordPress from version 6.0.

= Legal note =

The plugin is a tool for viewing, checking and archiving e-invoices. It does **not** constitute tax or legal advice. The basic validation covers the most important EN 16931 mandatory fields, but is not a full conformity check (no Schematron/KoSIT validator).

= Deutsche Beschreibung =

Seit dem 1. Januar 2025 muss jedes deutsche Unternehmen E-Rechnungen empfangen und archivieren können – vom Freelancer bis zur GmbH. Das Problem: Eine XRechnung ist eine rohe XML-Datei und für Menschen praktisch unlesbar.

Dieses Plugin macht aus Ihrem WordPress den Posteingang und das Archiv für eingehende E-Rechnungen:

* **Hochladen**: XRechnung-Dateien (XML, UBL- und CII-Syntax) und ZUGFeRD-/Factur-X-PDFs
* **Lesbar anzeigen**: Die Rechnung wird wie eine normale Rechnung dargestellt – Aussteller, Empfänger, Positionen, Beträge, Steuersätze, Zahlungsziel, Bankverbindung, Leitweg-ID
* **Prüfen**: Basisprüfung der Pflichtfelder nach EN 16931 mit klaren deutschen Fehlermeldungen, inklusive Rechenprobe der Summen
* **Archivieren**: Durchsuchbare Rechnungsliste mit Filter nach Aussteller, Datum, Betrag, Format und Prüfstatus. Die Originaldatei wird unverändert in einem geschützten Ordner aufbewahrt, eine SHA-256-Prüfsumme dokumentiert ihre Unverändertheit – das unterstützt eine GoBD-konforme Archivierung.

Alles läuft lokal in Ihrem WordPress – keine Cloud, kein externer Dienst, kein Tracking. Das Plugin ist ein Werkzeug und stellt keine Steuer- oder Rechtsberatung dar.

== Installation ==

1. Install and activate the plugin.
2. Go to **E-Rechnungen → Rechnung hochladen** and upload your first XRechnung or ZUGFeRD file.
3. Find your archive with search and filters under **E-Rechnungen → Alle Rechnungen**.

Requires PHP 8.1 or newer.

== Frequently Asked Questions ==

= Which formats are supported? =

XRechnung as XML in both syntaxes (UBL and UN/CEFACT CII) as well as ZUGFeRD and Factur-X PDFs from version 2.x with embedded invoice XML. Plain PDF invoices without embedded XML are not e-invoices in the legal sense and are rejected with a clear error message.

= Can the plugin also create e-invoices? =

No, deliberately not. There are already many solutions for creating e-invoices. This plugin focuses on the underserved receiving side: read, validate, archive.

= Is the archiving GoBD-compliant? =

The plugin supports a GoBD-compliant archiving process: the original file is stored unchanged, a SHA-256 checksum documents its integrity, and the archive is protected against accidental deletion on uninstall by default. However, GoBD compliance also involves organizational requirements in your business – no software tool alone can guarantee compliance.

= Is any data transferred to third parties? =

No. The plugin works entirely locally, makes no external calls and contains no tracking.

= Are my invoice files protected against direct access? =

The files are stored in a subfolder of the uploads directory that is blocked via .htaccess (Apache) and uses non-guessable file names. Downloads are only possible through WordPress with a permission check. On nginx we additionally recommend blocking the folder `wp-content/uploads/erechnungen/` in the server configuration.

= In which language is the plugin? =

The plugin is aimed at businesses in Germany: the user interface and all validation messages are in German. An English translation is included.

== Screenshots ==

1. Human-readable view of an XRechnung / Menschenlesbare Ansicht einer XRechnung
2. Invoice archive with search and filters / Rechnungsarchiv mit Suche und Filtern
3. Upload page / Upload-Seite

== Changelog ==

= 0.1.0 =
* First version: upload of XRechnung (UBL/CII) and ZUGFeRD PDF, human-readable view, basic EN 16931 validation, searchable archive with protected file storage.
* Erste Version: Upload von XRechnung (UBL/CII) und ZUGFeRD-PDF, menschenlesbare Anzeige, EN-16931-Basisprüfung, durchsuchbares Archiv mit geschützter Dateiablage.

== Upgrade Notice ==

= 0.1.0 =
First version. / Erste Version.
