-
Notifications
You must be signed in to change notification settings - Fork 778
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] Add option to generate Swiss QR Code after invoice #1023
Comments
Thank you for a great issue and, of course your PR! Here's a question: Same question, but now for the Italian standards, European standards, etc. We need some kind of way to set the QR standard on the ... Settings page (?), customer edit page (?) And we need some kind of way to add all those standards to the codebase and not overwrite the other standards, if that makes sense. |
@Verony-makesIT Yes in the majority of cases it's static text for the QR Code. The problem is rather in the format and layout of this QR Code. Switzerland for example requires that the slips be in a certain way, and if we just present a classic QR Code, the person who has to pay might think that it is not the right QR Code or not. the right way to pay, etc... We must therefore integrate the "payment zone" more widely into the different standards, rather than just the static text of the QR Code, in my opinion. |
@nielsdrost7 Thank you for your feedback! You're right, I thought about my problem, I didn't want to do too much code at first. But I thought of the same thing as you, making a system that would make it easy to add a payment standard on the code side and to easily use/activate this standard/any standard. |
As a former user of InvoicePlane and also from CH, this is only to be welcomed. I ask myself, why so complicated? If the invoice is issued with the country input, you could customize this so that the QR library from @CanardConfit is used for Switzerland. |
@CanardConfit thank you for the great questions!
Anything regarding QR codes has not come up earlier, as far as I know.
You're totally free to do what you want, live free, Yolo, you know
That's a good one! Let me get back to you on that one. Let's ask @naui95 what he thinks. |
Your absolutely right! @nielsdrost7 It's a mystery to me that this is only an issue after a year ^^. However, as has already been mentioned, the company SIX has introduced this form of QR code & layout together with the Swiss Post and banks. Although this software is good for non-technical people, but it can no longer be used in Switzerland without installing the QR library which is a no-go for non-tech savy people. And yes, I'm aware that this is a leisure project, so I fully understand that it won't be implemented immediately 😊 |
How would this be defined it via the country selection in the backend? Or an additional menu where the QR template for the country can be selected. Perhaps it would also be an idea to store this in the invoicing process if you also send international invoices, so that you don't have to fiddle around in the settings but can do so when invoicing. I can see various approaches here. |
Personally I installed InvoicePlane for the first time last week because I needed to make an invoice, I saw that there was no way to make a QR Swiss invoice, so I did it added in one night and made available, telling me that if it was well received I would do more, which is the case! x) @nielsdrost7 So I'll start working on it :D I was actually thinking of adding a field in the management of an invoice to create or not an associated "payment" (a Swiss QR Code, a classic QR code, the European standard, etc.) (because in some invoices we don't need it, in others if, ...) On the code side, a folder where there are all the standards that we would like to implement, in the form of a PHP class, with an abstract class to respect. All loaded automatically to be selectable by the user afterwards. In this way it should be flexible enough to meet all needs. |
@0n1cOn3 If I do this feature you will have to go back to InvoicePlane! (Joke) |
Welp 🥲😂 |
@CanardConfit, As a supplier, you can (in the EU) add a QR-Code to your invoice template to simplify the payment process for your customer. |
Well, you can at least be the
Just don't worry about that. We can use the help of everyone, it's up to the maintainers to ask the users at which area those users can help (with or without programming language knowledge) |
No look, I gotya. I really would come back but yeah, Swiss QR code is essential 🥲 |
Exactly!
That's 1 option ...
Explain this one, please. So, I'm your customer, I live in ... Austria. Now I'm your customer and I live in ... Geneva
Perfect. IF I want a QR code and my country is ... I don't know ... |
(@nielsdrost7 Thank you very much for making me the project developer, you have placed a lot of trust in me!) Looking at the system as it is currently done I realized that a brick was perhaps already used/created: The "payment method" area! (here: If we modify this element so that it can be associated with a specific payment method, Cash, credit card, swiss qr code, generic qr code, finnish qr code, ... It could work well! You understand me? If I take your examples, I create an invoice for my Australian customer, who must have an Australian payment method, I specify in the payment method field "QR Australian invoice" which I would have configured beforehand in the control panel. payment_methods configuration. If I come from Geneva (which is my case by the way, If my customer ultimately wants to pay by cash, I choose Cash and the invoice will not have an unnecessary/default payment method. If the company I have to invoice must have standard x but only for this particular invoice, I just have to choose the right payment method, and that's it. (Like @Verony-makesIT 's example) In this way we must be able to cover all people's cases. What do you think? |
Well, I like it, of course. So it would then be chosen on the customer card, and then used while generating the invoice. A default setting for default QR method would be nice. |
We can make a kind of general default "payment method", a default payment method for a given customer, and always with the possibility of choosing on the invoice itself. Well, tomorrow I'll get to work! :D |
I'll create an issue tomorrow with a summary of what we said here, so it will be clean :) |
I would also go this way. More in general, for the discussion, couldn't the QR bill be handled thorough the invoice template system? |
The problem with this solution is that it only applies to the PDF format, therefore for the web format or other formats in the future, if this is necessary. And moreover we would therefore have no trace of what type of invoice (Swiss QR Code, etc.) we used for such client etc... I personally find that it would be less good. I am therefore more of the opinion to stick with the idea that we built with @nielsdrost7. Honestly, there would be 10,000 ways to do it/integrate it, I choose one, we'll see what that gives, and we'll advise at that point, otherwise we'll never move forward :) |
How do I do this? And I don't think I have merge permission, so I'll let you take care of that part, but I'm still going to create an issue for that, it's too different to stay under "[Feature request] Add option to generate Swiss QR Code after invoice" |
So ... If you clone github.com/invoiceplane/invoiceplane and then checkout Work on your chosen option and enjoy yourself. |
Thank you! |
@CanardConfit @nielsdrost7 |
@CanardConfit is the fork you that you have done is it working? |
@eliassader what you can do is work on PR #1037 @CanardConfit did an amazing job and I think the PR is ready to be merged, but, for example, you can test branch |
Hi, I am happy to so, I have downloaded the code from (https://github.com/InvoicePlane/InvoicePlane/tree/feature/1023-qr-codes), it is patch, can any of you share a link to a proper compiled version i can run on the hosting. to do all the tests and come back with feedback, or any instruction to correctly build the project |
You could clone the repository and then check out the branch, then you'll have the complete project. To build:
To develop locally: |
Thank you @nielsdrost7 for your prompt reply. |
@eliassader great job on building the project, especially on IIS. As long as I have the steps to reproduce (the steps that you wanted to do before you got this error message), we'll be fine. If you want you can reply in the I'll take a look this weekend. |
Yes, perfect. |
@eliassader @nielsdrost7 The current feature/1023-qr-codes branch isn't ready yet. The aim of this branch is to incorporate a system of "QR Code types" through the existing Payment Method system. I've started to make some modifications but it's not finished, hence the error and the title of the commit: 28b2ef0 "Start to try something". If you want a working branch, you need to go back to the merge of the PR I made, i.e. to d2471b9, and then the code will work correctly. The thing to know is that on d2471b9 the QR Code is added in addition to the original QR Code, on the same principle. This had been discussed before, to be more generic and avoid the ten thousand specific parameters of each QR Code type. Unfortunately I haven't had the time to devote to it, but I still have the project in the back of my mind ;) |
Ah, understood. And if you want, you can still work on the We were just a little too eager, I guess |
No worries, I'd like to do it faster but I'm not used to working in PHP, and even less so with a framework like codeigniter. So it takes time :) |
Hello everyone! (@nielsdrost7) I just pushed some changes to this issue (b252298)! I added the way to modify the "general" settings of a payment type! This means that in the "Invoices" tab of the parameters there is a new category of parameters depending on what is implemented in the
I also deleted how Qr Code and Swiss Qr Code was done until now. All that's missing is to get the choice of payment method for the invoice, and process the payment method! (not finished yet) I'm slowly getting used to this style of PHP (which I definitely don't like, my IDE puts errors everywhere because it doesn't understand that this or that variable will be filled in runtime, in short... xD) Possibly if those who are familiar with this framework and these conventions can review my way of doing things a little, I would not be against it. To be sure that what I did didn't end up in the trash because that's not how it should have been done ;) See wou next commit! |
I understand what you mean and it's only until we get version 2 up-and-running. At some point I actually had tears in my eyes from this poor old CodeIgniter 3 framework, but it's all we have at the moment... I really appreciate your efforts and it won't end up in the trash. At the end we need something (some documentation) to accommodate someone in, let's say, a European country like Belgium, Finland, etc. |
Hey there folks, Is there any new update to this, or can I help to test this feature so we can release it to the stable version? 😊 ✌️ |
Oh, yes please! That's more than okay, that's fantastic! I'm very happy to contribute with testing! 😃 💪 |
I am Swiss and I would like to be able to generate a QR Invoice (the Swiss system for invoices in force since 2021). After generating an invoice, the system could add a page with an embedded Swiss QR code, according to the standards specified here: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/standards/qr-bill.html. The page should display the necessary information in Swiss QR Code format.
Current behavior
The system currently allows you to generate a classic QR code, but this is not useful / recognized in Switzerland, hence my proposal.
Screenshot
Possible solution
Integrate the php-swiss-qr-bill library to generate the Swiss QR Code and add it to the invoice PDF.
I've already implemented this feature, and just made a pull request for it (#1024)
Steps to reproduce
Context (Environment)
Detailed description
The proposed change involves integrating functionality from the php-swiss-qr-bill library to generate a Swiss QR code based on invoice information, the user's IBAN and the addresses of the customer and user. The generated QR Code must comply with the standards mentioned here.
Possible implementation
Pull request #1024
Failure logs
The text was updated successfully, but these errors were encountered: