From 8cbff9e2fa7eeea1ac9cd888dff51b68bab55f48 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 15 Feb 2025 21:09:13 +1100 Subject: [PATCH] correctly show comparison data if the date is changed, not just the value for a comparison set --- templates/index.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/index.html b/templates/index.html index 862cd60..397d58a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -24,7 +24,8 @@ {% for r in DISP %}
{% for el in r %} - {% if COMP and COMP['vars'][el.varname] != finance[el.varname] %} + {% if COMP and ( COMP['vars'][el.varname] != finance[el.varname] or + (COMP['vars'][el.datevarname] is defined and COMP['vars'][el.datevarname] != finance[el.datevarname]) ) %} {% set extra=" text-primary" %} {% else %} {% set extra="" %} @@ -46,8 +47,8 @@ {% endfor %} {% elif el.display=="date" %} - {% if COMP and COMP['vars'][el.varname] != finance[el.varname] %} - data-bs-toggle="tooltip" title="Comparison was: {{COMP['vars'][el.varname]}}" + {% if COMP and (COMP['vars'][el.varname] != finance[el.varname] or COMP['vars'][el.datevarname] != finance[el.datevarname]) %} + data-bs-toggle="tooltip" title="Comparison was: {{COMP['vars'][el.varname]}} on {{COMP['vars'][el.datevarname]}}" {% endif %} class="col-form-label me-2 text-end float-end {{extra}}">{{el.label}}