Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.22k stars 2.72k forks source link

Implement FacturX/XRechnung/ZUGFeRD for upcoming obligation to issue and receive electronic invoices #30078

Open bastolino opened 2 months ago

bastolino commented 2 months ago

Feature Request

As already asked by https://github.com/Dolibarr/dolibarr/issues/8836 FacturX/XRechnung is a european standard (EU-Richtlinie 2014/55/EU / EN 16931) and being enforced between companies from 2025 on, it is growing a basic feature that'd rule out the usage of Dolibarr in Germany from 2027 on. It is expectable that it is going to be mandatory for other european countries aswell.

It should be possible to import invoices from FacturX aswell as import format for supplier invoices.

Use case

all companies in germany need this from 2027 on.

Suggested implementation

some hints have already been made regarding libraries.

Suggested steps

xml embedded in pdf for export, xml aswell as pdf w/ embedded xml for import

rycks commented 2 months ago

@bastolino and all others, please note that there is a module for that : https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html

i'm a the official developer of that module and i explain that this module will become free (gratuit / gratis / 0€) when that format will be mandatory (please read that for example: https://www.dolibarr.fr/forum/t/est-ce-que-dolibarr-pourra-lire-les-facture-x-en-2024/43169/9 in french but please use online translators if you can't read french).

All users who pay for that module make a direct sponsoring action because it's a hard job to make that sort of module (please note i do 6 "major" release and near that 100 intermediate releases).

So don't waste your time and let me know if you want to contribute to that module (source code is GNU/GPL).

Basti-Fantasti commented 1 month ago

@rycks Thanks for your response. This is great news that you will make this module freely available

As it will be mandatory for all companies in the EU it would be good, if this could be added as an inbuilt / default module in dolibarr.

rycks commented 1 month ago

@Basti-Fantasti maybe you have an information i don't but for me FacturX/XRechnung is only for Germany and France, not the others countries in europe: they use PeppolXML files / UBL

And even if that file format was for all european people i think it's a bad idea to put it into main dolibarr code because of all the rest of the world don't care about that specific file format.

For example do we have to put into dolibarr main code specific file format for each country / region ? We are working on a separate repository with external modules with community support which seems to be more flexible (and modules could be more "up to date" / "updates released faster" than the core).

Basti-Fantasti commented 1 month ago

@rycks oh I see. I thought that all European countries would need to have the FacturX/XRechnung implemented.

You are also right that it would not make much sense to add it to the default dolibarr installation from that point of view. But how would the implementation then work? Would everyone need to download the module from dolistore or would there be another way of distributing this module?

bastolino commented 1 month ago

Correct me but isn't this all very similiar with some changes to suit each countries flavour? FacturX/XRechnung is basically planned to be used within Peppol (Pan-European Public Procurement Online) Network for delivery. As far as I understand it, Peppol is the data exchange platform and FacturX/XRechnung is the format.

There is a (german) technology blog by SAP which brings all that into context: https://community.sap.com/t5/technology-blogs-by-sap/xrechnung-zugferd-und-peppol-alles-was-sie-%C3%BCber-die-elektronische-rechnung/ba-p/13427891

RetroYogi commented 1 month ago

I often read in Dolibarr forums that electronic invoicing will become mandatory in 2026/27. This is the date for France! Other EU countries have different deadlines. In Luxembourg, where I am, many types of companies (not all yet) are already obliged to use the Peppol network to send and receive invoices since March 2023. Therefore, please keep in mind that there are Dolibarr users for whom the e-invoicing obligation, and the obligation to use Peppol are already in place.

@bastolino, you're correct: Peppol is the network, and Factur-X is an e-invoice format. The used formats vary by country. For example, France accepts Factur-X and UBL (among others). In Luxembourg, we use XML, UBL, or something called CII, I think. The Peppol access points convert the sent and received information (invoices and other documnets) from one format to another. Peppol access points communicate using "messages" in a common format.

bastolino commented 1 month ago

Yes. In Germany, being able to receive electronic invoices is mandatory from January 1st 2025 on for each and every company. The need to be able to send electronic invoices is mandatory depending on company size.

The big point is that - for Germany - from 2025 on the XML part of the invoice is the leading one if there are differences between the (human readable) PDF and the XML part. While there is already a (buyable) Module for exporting FacturX, I don't see the possibility of parsing the XML part of it.

So is it possible to create an import tool to parse the FacturX and simply use the XML part of it to create a supplier invoice?

rycks commented 1 month ago

@bastolino import invoices is the job of ScanInvoices (see on dolistore) :-) and in case of factur-x import is done full automatic :-)

yes dolibarr is ready (and some of us are doing with that) !

bastolino commented 1 month ago

@rycks yes, but to use that you need an abo with your company and each and every invoice is sent to your webservers. importing pdfs with xmls shouldn't make OCR necessary, especially not sending them to any cloud service hosted by a different company.