In the latest version (25.6.29), there is new simpler way to generate QR codes on invoices.
It has been implemented as an extension. If your business has the country set to Saudi Arabia, the extension will be added automatically:
When viewing sales invoice, you will see extension button below the invoice:
Clicking on it will load the extension:
What this extension does:
- It will check if you have
Image Custom Field
on sales invoices created. If not, it will create it. - It will generate QR code based on invoice data
- It will insert QR code to the invoice.
Now when you view the invoice, you will see QR code on invoice:
If you edit your invoice, you will see the QR code on invoice too as an image. As you can see, this extension is merely generating QR code and then writing it into QR Code
custom field.
Once the QR code is generated, it is SVG image that is part of the invoice. This approach is compatible with theme enhancer so you can then place this image anywhere just like any custom field.
Support for ZATCA Phase 2 will hopefully be available very soon. This also shows how e-invoicing should be implemented in all countries. Not just Saudi Arabia.