Balance {{ account_name }}

to
{% set balance_sum = 0 %} {% for month in months %} {% set balance = month.earned - month.spent %} {% if balance >= 0 %} {% else %} {% endif %} {% set_global balance_sum = balance_sum + balance %} {% endfor %} {% if balance_sum >= 0 %} {% else %} {% endif %}
Month Earned Spend Balance
{{ month.name }} {{ month.earned | round(method="common", precision=2) }} {{ month.spent | round(method="common", precision=2) }}{{ balance | round(method="common", precision=2) }}{{ balance | round(method="common", precision=2) }}
{{ balance_sum| round(method="common", precision=2) }}{{ balance_sum | round(method="common", precision=2) }}