Swiss QR Generator

Hello

its possible to implement a swiss QR Code Generator in the invoice template?
it looks like this here:

It should appear on the last page of the invoice in any case, unless it has no space or the invoice has several pages.

Best regards
dashmir

Yes of course it is, feel free to implement it and then create a PR so we can test and merge it.

In any case, I will share all my findings with you all. I was hoping for some support since I don’t have experience with such an implementation.

But I have already added the QR code in the template. Now I need to import the other information in this QR Code template.
These are the variables for the invoice recipient information:
$invoice->client_vat_id;
$invoice->client_address_1;
$invoice->client_zip;
$invoice->client_city;
$invoice->client_country;

But I cannot include these in the code (see Pic).
image

Then I get this message:

An uncaught Exception was encountered

Type: ParseError
Message: syntax error, unexpected ‘;’, expecting ‘)’
Filename: /var/www/vhosts/one-hosting.ch/httpdocs/account/qr/example/example.php
Line Number: 49

how can i pass the variables from invoiceplane to the qr-code generator (instance)?

As you can see on the picture, I managed to integrate the QR code into the PDF.
For privacy reasons I have to blur it.

I have added it as a function.

Had to add the base URL because the logo was not displayed when generating the PDF.

I have created another folder for the generated PDFs.
grafik

the invoiceplane is very well made, also looks visually very nice.

What I am missing is the necessary support here in the community. A project like this can only improve if everyone tries to help.

I have adjusted the “Client Form”, “Client View” and InvoicePlane.php and added the Company field, but I had to take the “client_name” for “company name” and “client_surname” for the name of the client. And adjusted in the code like this:

2 Likes

Hey @Dashmir_Kasa,

A while ago I created an FAQ that actually gives the same result as what you did in a simple way (and by using mPDF).
You can read about it in the Faq section. This tutorial allows you to add a QR code in your pdf template file.
https://community2.invoiceplane.com/t/topic/9877

Hey @VeRony

The provided Forum link seems to be dead nowadays.

On the other hand, there is a progress going on @Dashmir_Kasa

That broken forum link, this is the correct one: EPC/SEPA QRCode we had problems with the server back then, so created that ‘community2’.