InvoiceKonform

How to use InvoiceKonform

For Magento Open Source and Adobe Commerce 2.4.7, 2.4.8 and 2.4.9 on PHP 8.2 to 8.5. Version 1.0.0.

Install

Buy InvoiceKonform on the Adobe Commerce Marketplace, then in your Magento folder:

composer require tenhatch/module-invoicekonform
bin/magento module:enable Tenhatch_InvoiceKonform
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

In production mode, also run bin/magento setup:static-content:deploy. The install adds one table (tenhatch_invoicekonform_document) and one customer field, “Leitweg-ID”.

Settings

Stores, Configuration, Sales, InvoiceKonform (E-Invoices). Every setting can differ per website and store view.

The settings, group by group
Group What to set
E-Invoices On or off; the format (XRechnung or ZUGFeRD); whether to attach the file to the invoice and credit memo emails; the language of the PDF and of texts in the e-invoice (German or English).
Business Customers The customer groups that are business customers; whether every customer with a VAT ID is one; the billing countries that count (Germany by default; empty means every country).
Seller Your legal name, address, VAT ID and/or tax number, trade register number, further legal information, contact person, phone and email. Empty fields use Stores, Configuration, General, Store Information and the Sales Representative email. XRechnung needs a contact person, phone and email, and a VAT ID or tax number.
Payment Your IBAN, BIC and account holder; the days until payment is due; your payment terms text (or XRechnung’s early-payment format, such as #SKONTO#TAGE=7#PROZENT=2.00#); and which payment means code each Magento payment method is, one per line, such as banktransfer=58.
VAT and Units What 0 % VAT for a buyer in your own country is (exempt, zero rated or reverse charge) and its reason; what 0 % for an EU business buyer abroad is (intra-EU supply of goods, or reverse charge for services); and an optional product attribute holding the unit code (such as KGM or MTR; without it every item is “C62”, one piece).

Public-sector buyers: enter their Leitweg-ID on the customer (Customers, All Customers, the customer, Account Information). It becomes the buyer reference of their XRechnung. Without one, the buyer’s purchase order number is used, else the order number.

VAT categories

InvoiceKonform reads each line’s VAT from Magento:

Discounts become allowances and shipping a charge, each at the VAT rate it was charged at. The VAT of each rate is the VAT Magento charged, so the e-invoice’s totals are your invoice’s totals.

Day to day

When an e-invoice is not valid

Each message names the rule and what is missing, for example “BR-DE-23-a: Payment by credit transfer (code 58) needs the bank account (BG-17): add the IBAN in the settings.” Fix the setting, then press Create E-Invoice. Some documents cannot be made at all, and the section says why: invoices in a currency other than euro, items with a fixed product tax (WEEE), and credit memos with an adjustment refund or fee (Magento puts no VAT on those).

The command line

bin/magento invoicekonform:create --invoice=100000012
bin/magento invoicekonform:create --creditmemo=100000003
bin/magento invoicekonform:create --order=000000123

Each makes a new version and prints its result. It ends with code 1 when one is not valid, so it can run in scripts. Use it for invoices made before you installed InvoiceKonform.

Remove

bin/magento module:disable Tenhatch_InvoiceKonform
composer remove tenhatch/module-invoicekonform
bin/magento setup:upgrade

The stored e-invoices stay in their table: they are invoices you may have to keep. Delete the table yourself once you no longer need them.