Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Expose ZUGFeRD XML setting in ipconfig.php #999

Open
onny opened this issue Nov 17, 2023 · 6 comments
Open

[Feature Request] Expose ZUGFeRD XML setting in ipconfig.php #999

onny opened this issue Nov 17, 2023 · 6 comments
Assignees
Labels
Feature Request Improvement or Feature Request
Milestone

Comments

@onny
Copy link

onny commented Nov 17, 2023

I would like to enable ZUGFeRD XML via ipconfig.php by setting INCLUDE_ZUGFERD=true :)

This would help to configure InvoicePlane decleratively, for example in NixOS https://nixos.wiki/wiki/Invoiceplane

@nielsdrost7
Copy link
Contributor

nielsdrost7 commented Nov 17, 2023

At the moment it's a setting in the database:
get_setting('include_zugferd')
If you want to set this setting during install of InvoicePlane, I might know a way, but let's think about that one:

During install_database or upgrade_database (whatever those 2 functions are), check for env_bool(INCLUDE_ZUGFERD)
and if true, add this setting to the database with the correct value.

Idea?

@nielsdrost7 nielsdrost7 added this to the 1.6.2 milestone Nov 17, 2023
@onny
Copy link
Author

onny commented Nov 17, 2023

It would be nice to configure this on runtime too. This might also apply to other settings.

There might be a runtime function which checks for additional environment variables and write these settings into database?
Or a special function get_config which reads settings form environment first and if not set will take it from the database?

@onny
Copy link
Author

onny commented Nov 27, 2023

In the meantime I added a section to the NixOS wiki on how to enable electronic invoicing by hardcoding it's activation to the source code https://nixos.wiki/wiki/Invoiceplane#Electronic_invoice

@Verony-makesIT
Copy link
Contributor

Hello,
For your information, please keep in mind that this "Zugferd setting" is currently used in IP to embed an electronic invoice (as an xml file) into the pdf.
This Zugferd format is only used in Germany.
Outside of France which uses a similar format (Factur-X), the rest of Europe (and beyond...) uses the UBL format (a separate XML and PDF file).
If this global Zugferd setting is activated in IP then every PDF invoice will be sent to the customer including the embedded Zugferd file, no matter where your customer is located. This is actually not recommended.
It would be much better to modify/adapt IP so that the user can specify in the customer settings whether they want an electronic invoice and which (country-dependent) electronic invoice format they wish to receive.
My "PR - Implementing e-invoicing flow #939 #977" works that way.

@nielsdrost7
Copy link
Contributor

In onny's case we have to make it a config setting, so if env_bool(INCLUDE_ZUGFERD) is true, then we set the correct setting in the database.
This way only settings that are specifically set to true will update the database with 'Zugferd is set to on', if that makes sense

@onny
Copy link
Author

onny commented Nov 28, 2023

In onny's case we have to make it a config setting, so if env_bool(INCLUDE_ZUGFERD) is true, then we set the correct setting in the database.
This way only settings that are specifically set to true will update the database with 'Zugferd is set to on', if that makes sense

sounds good 👌

@nielsdrost7 nielsdrost7 added the Feature Request Improvement or Feature Request label Dec 17, 2023
@nielsdrost7 nielsdrost7 self-assigned this Dec 17, 2023
@nielsdrost7 nielsdrost7 changed the title [Feature request] Expose ZUGFeRD XML setting in ipconfig.php [Feature Request] Expose ZUGFeRD XML setting in ipconfig.php Mar 9, 2024
@nielsdrost7 nielsdrost7 mentioned this issue May 2, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Improvement or Feature Request
Projects
None yet
Development

No branches or pull requests

3 participants