Finance Tracker

{% for r in DISP %}
{% for el in r %}
{% if el.display=="select" %} {% elif el.display=="date" %} {% else %} {% if el.display== "readonly" %} {% set bg="bg-light" %} {% set bd="" %} {% else %} {% set bg="" %} {% set bd="border-1 border-primary" %} {% endif %} {% endif %}
{% endfor %}
{% endfor %}
Fortnighthly Savings data: {% if COMP %} {# get comparison date so we can use it below in loop to know when to print it out #} {% set comp_yr=COMP['date'][:4] %} {% set comp_mon=COMP['date'][5:7] %} {% set comp_day=COMP['date'][8:10 ] %} {% set comp_done=namespace( val=0 ) %} {% else %} {# we dont need to do a comparison, so consider it done before we begin #} {% set comp_done=namespace( val=1 ) %} {% endif %}
2025
{% set first_yr=2025 %} {% for date, dollars in savings %} {% set yr=date[:4] %} {% set mon=date[5:7] %} {% set day=date[8:10 ] %} {% if yr|int > first_yr|int and mon == '01' and day|int <= 14 %}
{{yr}}
{% endif %} {{ date }}:  {{ '$%0.2f' % dollars|float }}
{% if comp_done.val == 0 and yr == comp_yr and mon == comp_mon and day|int >= comp_day|int %} {{ COMP['date'] }}:  {{ '$%0.2f' % COMP['amount']|float }}
{% set comp_done.val=1 %} {% endif %} {% endfor %} {% if depletion_date %}
Run out of $'s:
{{depletion_date}}
{% else %}
Super kicks in!!!
{% endif %} {% if COMP %}
Note: value in blue
above is value we
should have been
at when comparing
to saved values
{% endif %}
SUMMARY/BUDGET
{% for label, value in BUDGET %}
{{label}} {{value}}
{% endfor %}