Hello,
I am creating custom print format for Salary Slip, In which I am printing Loan Table as below.
Now I want to add a row with Totals.
May I know if any easy way is there.
Hello,
I am creating custom print format for Salary Slip, In which I am printing Loan Table as below.
Now I want to add a row with Totals.
May I know if any easy way is there.
{% set total_loans=[0]%}
{% for l in doc.loans %}
{% if total_loans.append(total_loans.pop()+l.principal_amount) -%}{% endif %}
{% endfor %}
{{total_loans}}