Hi Team,
I created a custom Script Report for VAT / Tax Summary.
The report is working fine in ERPNext and data is coming correctly with Python code.
But the issue is with Print/PDF format:
I added a custom
HTML/Jinja template (example below).
When I click Print, the output is not showing as expected.
Tax Report
{{ frappe.utils.formatdate(filters.from_date) }} - {{ frappe.utils.formatdate(filters.to_date) }}
{% for row in data %}
{% if row.bold == 2 %}
{% elif row.bold == 1 %}
{% else %}
{% endif %}
{% endfor %}
{{ frappe.utils.formatdate(filters.from_date) }} - {{ frappe.utils.formatdate(filters.to_date) }}
| Date | Reference | Source Type | Exclusive | Tax Amount | Inclusive |
|---|---|---|---|---|---|
| {{ row.date }} | |||||
| {{ row.date }} | {{ row.exclusive }} | {{ row.tax_amount }} | {{ row.inclusive }} | ||
| {{ row.date }} | {{ row.reference }} | {{ row.source_type }} | {{ row.exclusive }} | {{ row.tax_amount }} | {{ row.inclusive }} |
My Questions:
Is there a recommended way to design Script Report output in HTML + Jinja?
Environment:
- ERPNext v14 (Frappe v14)