Epc Qrcode
Generate EPC (SEPA Credit Transfer) QR codes inside Frappe/ERPNext
- Author: david-loe
- Repository: https://github.com/david-loe/epc_qrcode
- GitHub stars: 1
- Forks: 0
- License: MIT
- Category: Other
- Maintenance: Minimally Maintained
Install Epc Qrcode
bench get-app https://github.com/david-loe/epc_qrcode
Tags
- epc-qr-code
- erpnext
- frappe
Add the Frappe Gems badge to your README
Maintain Epc Qrcode? Paste this into your README:
[](https://frappegems.com/gems/apps/david-loe/epc_qrcode)
About Epc Qrcode
# EPC QR Code
Generate EPC (SEPA Credit Transfer) QR codes inside Frappe/ERPNext, especially for invoices and other print formats.
## Requirements
- Frappe `>=15,<17`
- Python `>=3.10`
- App dependency: `segno~=1.6.1` (installed automatically with the app)
## Install On Frappe Bench
Run these commands from your bench directory:
```bash
bench get-app https://github.com/david-loe/epc_qrcode.git
bench --site install-app epc_qrcode
```
## What This App Exposes
The app adds one whitelisted and Jinja-available method:
`epc_qrcode.gen.gen_epcqrcode`
Signature:
```python
gen_epcqrcode(
name,
iban,
amount,
text=None,
reference=None,
bic=None,
purpose=None,
encoding=None,
scale=3,
dark="#000",
light="#fff",
)
```
Return value:
PNG Data URI string (for example: `data:image/png;base64,...`)
## Use `gen_epcqrcode` In Print Formats
Because the method is registered in hooks as a Jinja method, you can call it directly in HTML/Jinja print formats.
### Minimal Example
```jinja
{% set qr = gen_epcqrcode(
name="ACME GmbH",
iban="DE89370400440532013000",
amount=doc.rounded_total or doc.grand_total,
text=("Invoice " ~ doc.name)
) %}
```
## Parameter Notes
- `name`: Beneficiary name (receiver)
- `iban`: Beneficiary IBAN
- `amount`: Transfer amount (number)
- `text`: Unstructured remittance information (optional)
- `reference`: Structured creditor reference (optional)
- `bic`: Receiver BIC (optional, but recommended for compatibility)
- `purpose`: ISO purpose code (optional)
- `encoding`: EPC text encoding (optional)
- `scale`: QR image size multiplier (default `3`)
- `dark`, `light`: QR colors (defaults `#000` / `#fff`)
## Troubleshooting
- `jinja2.exceptions.UndefinedError: 'gen_epcqrcode' is undefined`
- Confirm app installation: `bench --site list-apps`
- Restart bench: `bench restart`
- Broken QR image in print
- Ensure the template uses `
` (not `{{ qr }}` directly)
- Validate IBAN and amount values passed from `doc`
## License
MIT
Related Other apps for Frappe & ERPNext
- Erpnext — Free and Open Source Enterprise Resource Planning (ERP)
- Helpdesk — Modern, Streamlined, Free and Open Source Customer Service Software
- Print Designer — Visual print designer for Frappe / ERPNext
- Ctr — CTR模型代码和学习笔记总结
- Whitelabel — Whitelabel ERPNext
- Fossunited — fossunited.org
- Helm — Helm Chart Repository for Frappe/ERPNext
- Frappe Attachments S3 — A frappe app to upload file attachments in doctypes to s3.