salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.34k stars 2.05k forks source link

Feature Request: Zugferd / RechnungX Support #9092

Open christf opened 3 years ago

christf commented 3 years ago

Issue

The german government mandates usage of RechnungX/Zugferd type bills for all contracts with the government: https://www.ferd-net.de/ SuiteCRM does not currently create invoices embedding xml data such as required for Zugferd.

In Germany there is hardly a way around it. It would be great if SuiteCRM would support creating invoices with additional xml markup complying with the Zugferd standard.

Context

Your Environment

chris001 commented 3 years ago

Looks like one of these top 2 or 3 PHP packages would help add the XML to the invoice so that it'd be EU compliant. https://packagist.org/?query=zugferd

tsmgeek commented 3 years ago

Does government require you to support Storno as well?

@christf instead of Embed as that seems to imply "into the PDF", do you mean more like Export in Zugferd Format and download an XML version of the invoice?

christf commented 3 years ago

Zugferd says that there is a pdf file which is human readable and an artefact (xml stream) embedded into the pdf that is machine-readable. There are other electronic standards too that have just the XML and not the pdf. Since the german government explicitly requires Zugferd, the feature request for SuiteCRM would be to enhance the pdf files that are created by the existing pdf export or "send pdf via email" functions with the Zugferd XML metadata.

This means no UI changes would be required.

for other formats that are just the xml, a different Button would likely be needed in the UI.

tsmgeek commented 3 years ago

mPDF how to attach the XML to it... Unfortunately it looks only be supported in v7 and CRM is still using mPDF v5

https://mpdf.github.io/what-else-can-i-do/pdf-a3-xmp-rdf.html

So to be supported we would need the core to upgrade (which ive pushed for but has not happened yet) or just allow export of the XML separately as there would be no way to create the PDF and merge the XML with current mPDF verison.

christf commented 3 years ago

Zugferd requires a bit more than just embedding. It requires signing too. There is a bit of tooling available to do that which might be interesting: https://konik.io/

christf commented 2 years ago

There is also this: https://github.com/easybill/zugferd-php - a Zugferd php library. This might be useful. It is on the list of Chris001' search.

christf commented 2 years ago

I did play around with zugferd and pandoc / pdflatex these days and it is entirely possible to generate a pdf file with embedded zugferd xml with pdflatex. The resulting xml can be booked directly. If pdflatex actually would produce pdf/a, it would pass all validations. I wonder if maybe templating should be something outside suitecrm and suitecrm should just export some machine readable format - be it markdown or xml or whatever.... then we would not have to upgrade core to upgrade mpdf to implement zugferd in suitecrm....

meierwitt commented 11 months ago

Is there any news about this? From 1.1.2025 electronic invoicing will be mandatory in Germany.

gunnicom commented 11 months ago

Small correction for germany (AFAIK):

meierwitt commented 11 months ago

If you send invoices to business customers, they can request e-invoices as early as 1 January 2025. This is how I interpret the second point here (German): https://www.vgsd.de/umstellung-spaetestens-naechstes-jahr-angehen-das-ende-von-papier-und-pdf-rechnungen-naht/

For invoices to public clients, IMHO, this has been obligatory in part since 2020.