New module for Spanish electronic invoices

Hello everyone,

We’ve developed a module to generate and sign Spanish Facturae formatted files for invoices issued by the Dolibarr application. The module is currently in the testing phase, and we’re looking for people interested in participating in the testing process.

The module works by adding an extra option to the existing mass actions in the list of existing invoices. When one, or more, invoices are selected (filters can be used), a new option to export them appears in the dropdown list of mass actions. Additionally, if a certificate has been configured, the invoices will be signed. The certificate is stored on the server. It’s recommended that the exported certificate be password-protected. If so, the password will be requested each time the invoices are exported and won’t be stored anywhere.

The generated files pass the validation of the Spanish tax agency, so we can confirm that the format is correct, including the signature. Right now, the generated files are not sent to the tax agency via FACe and can be downloaded as a zip file to the user’s computer. They can be sent to FACe later by other means.

There are still some things to do, such as writing the module documentation (it’s simple but not done yet), polishing the visual aspects, identifying unmet needs, undiscovered problems, and alike.

Those who want to participate in the test are requested to send feedback to help improve of fix errors.

If anyone is interested, please reply to this message. Thanks.

Hi, I’m not a programmer and if the requirements are not too high I could help with the translation and testing of the module.

I would also like to take this opportunity to recommend taking a look at this repository, which allows the sending and receiving of invoices that comply with the electronic invoicing requirements in Spain through PHP.

Sorry for the late replay. I have been working in the module and have had not had many time left.

Yes, I am using the josemmo library. It is an excellent piece of work and has made my work possible. Without it I would never even tried to start this project.

This told I do not know if my module will be of any kind of help to you as it only make files for the Spanish electronic invoice format.

Translating should be no problem using GPT or alike. But there are still lots of strings that need to be inserted in the Spanish language file as I have not dedicated much time to filling up that file with text. I have used langs trans calls extensively but with direct strings that now need to be shortened and inserted in the file. I mean that I think it is too early to think about translating anything when a lot of text is still missing in the ES_es file.

If you still want to check the module to try to find issues or improve it or even start translating what it is right now in it, tell back to me and I’ll send you a link to download the updated version.

Thanks for your interest.

1 Like

My apologies Merill, I don’t know why I’m not receiving forum notifications by email and I just saw your reply.

I’m very happy to know that it is based on josemmo’s library, I think that it is currently the best option available for all the possibilities it includes to be able to carry out a complete electronic invoice process in Spain.

I would appreciate the possibility of trying the module and also information if you plan to market it, what price or sales model.

Regards

No need to apologize. Things like that happen.

If you want to have a peek of the module in its actual state, here you have a link to download it: module_invoicexmlexport-0.2.zip - Google Drive

Please be kind with it. There are, probably, many things that can be improved and your feedback will be appreciated like improving rights management for example (right now it looks too simple but, anyway, your testing here will be crucial here), translating (only Spanish taken into consideration for now though this is quite easy now with IA), writing the user manual, etc.

This is, still, not VeriFactu. VeriFactu will request that a QR code will be inserted in the paper invoice (already done for .ODT templates in current development but not for integrated pdf templates) and be sent to FACe. Right now we are developing that part but is still is not quite clear how that part will have to be deployed.

So, right now, with the module, you should be able to create XML/XSIG valid files stored somewhere in your server (the default location is /invoicexmlexport/facturae if you did not select a different one in the setup). Those files are generated from the invoice listing menu by selecting the ones you want to export and going to the mass actions part of that page.

Each bunch of selected invoices will make a ‘batch’ named after what you have configured for the module (this should be the first thing to do after install and enable it. The second one should be to go and give rights to the users you want to use it). Each Facturae file generated will have its data inserted in a blockchain that will guarantee that is has not been modified after issuing. Here your legal department can help by assessing that/if this is enough to fulfill the AEAT requirements for this kind of applications. Generated XSIG files will not be able to be deleted or modified from inside the module and are saved with the least of rights (read-only for the running apache process) but can be manipulated by external tools if the have access to the server.

All the files generated in a given batch are zipped and presented to the user for download after the process finish. If you do not want to download them, and the ‘Delete zip files’ switch is off in the module setup, those files will be kept in the temp area of the module. They can be later downloaded/deleted from the new menu entry that show in the left side of the financial block (if you have the user right configured).

All invoices that have been exported change their icon to a signature in the invoices listing so that you are able to identify them at a glance. A given invoice cannot be exported twice.

I am surely missing here some other details but this should be enough to start. Please do not hesitate to get back if you need something.

Thanks for your interest.

Kind regards,
Miguel.

1 Like

Hi, we are very interested. Happy to test and to provide feedback. We have real invoices to send to Spanish public entities. For now, we are kind of stuck at trying to log in at FACe.

To clarify: we are ony in search of a solution to generate invoices in the FacturaE format. As it seems that as a foreign entity we can upload invoices directly in the FACe platform without user registration or authentication, provided that they are in the FacturaE format.