{% set i = 0 %}
{% set row0des = “” %}
{% set row0amt = 0.00 %}
{%- for row in doc.taxes -%}
{% if i==0 -%}
{% set row0des = row.description %}
{% set row0amt = row.get_formatted(“tax_amount”,doc) %}
{%- endif %}
{% if i==9 - %}
<tr>
<td style="width: 30%; text-align: right;">{{ row0des }}</td>
<td style="width: 20%; text-align: right;">{{ row0amt }}</td>
</tr>
And so on….
it does not recognize variable i and if condition if i==9 does not true and it does not print taxes. basically there are four columns in table. 1st two columns print description and amount of 5,6,7,8 & 9 rows of taxes and last two columns print 0,1,2,3,4 rows of taxes. It was printing till yesterday noon.
File “/home/frappe/benches/bench-2017-01-10/apps/frappe/frappe/print/doctype/print_format/print_format.py”, line 30, in validate
validate_template(self.html)
File “/home/frappe/benches/bench-2017-01-10/apps/frappe/frappe/utils/jinja.py”, line 35, in validate_template
frappe.throw(frappe._(“Syntax error in template”))
File “/home/frappe/benches/bench-2017-01-10/apps/frappe/frappe/init.py”, line 309, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/benches/bench-2017-01-10/apps/frappe/frappe/init.py”, line 302, in msgprint
_raise_exception()
File “/home/frappe/benches/bench-2017-01-10/apps/frappe/frappe/init.py”, line 275, in _raise_exception
raise raise_exception, encode(msg)
ValidationError: Syntax error in template