Update jinja variable value in custom print format

Hi @Samsul,

Please apply it.

{% set total = [0] %}
{% for item in doc.items %}
    {% set line_total = item.price_list_rate * item.qty %}
    {% if total.append(total.pop() + line_total) %}{% endif %}
{% endfor %}

Total: {{ total.pop() }}

Then reload and check it.

Thank You!

2 Likes