An EPC-QRCode generator in ERPNext.
EPC-QRCodes (European Payments Council Quick Response Codes) are used to initiate SEPA credit transfers. They encode all necessary data (IBAN, amount, recipient) and may be placed on invoices to eliminate the error-prone typing of payment Information.
From the frappe-bench folder, execute
$ bench get-app https://github.com/bytegrasp/epcqrcode.git
$ bench --site YOUR_SITE install-app epcqrcode
where YOUR_SITE
is e.g. erp.example.com
After installing the custom app, an HTTP endpoint for generating EPC-QRCodes as PNG images will be available in your ERPNext instance under /api/method/epcqrcode.generator.get_code
.
The endpoint directly serves PNG images and takes the following query parameters to generate the QRCode
- name: the recipients name
- iban: the recipients International Bank Account Number (IBAN)
- bic: the recipients Bank Identifier Code (BIC), optional and only required for non-EEA countries
- amount: the amount to transfer in EUR (no other currencies are supported by EPC-QRCodes)
- text: the remittance information (either text or reference required)
- reference: the remittance information (either text or reference required)
- purpose: the SEPA purpose code (optional)
- scale: the scaling factor number for sizing the generated QRCode (optional)
- border: the border size number which adds padding to the generated QRCode (optional)
You can use this endpoint as source to an image, e.g., within a custom HTML print format, to place an EPC-QRCode in your sales invoice. With this, you can also make use of Jinja template variables, e.g., to use the sales invoice number as payment reference in the QRCode.
<div style="margin-top: 10px;">
<img width="110" height="110" src="/https/github.com/api/method/epcqrcode.generator.get_code?name=Your+Company&reference={{ doc.name }}&iban=AT026000000001349870&amount={{ doc.grand_total }}&scale=4&border=0">
<p>Zahlen mit QR-Code</p>
</div>
From the frappe-bench folder, run updates with
$ bench update
The custom app is tested against ERPNext v13.26.0.
MIT License, refer to LICENSE
The copyright is owned by Bytegrasp OG and contributors. The software comes as-is without any warranty.