From f5c86f3d975afe0173273c2a90b536fc2ae3eae3 Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Sat, 8 Feb 2025 11:42:46 -0300 Subject: [PATCH] feat: account and currency cards will no longer display unneeded zeros, only for totals --- app/templates/cotton/ui/account_card.html | 19 +++++++++++++++++-- app/templates/cotton/ui/currency_card.html | 22 ++++++++++++++++++---- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/app/templates/cotton/ui/account_card.html b/app/templates/cotton/ui/account_card.html index e0e9775..c54111f 100644 --- a/app/templates/cotton/ui/account_card.html +++ b/app/templates/cotton/ui/account_card.html @@ -15,6 +15,7 @@
{% translate 'projected income' %}
+ {% if account.income_projected != 0 %}
+ {% else %} +
-
+ {% endif %} {% if account.exchanged and account.exchanged.income_projected %}
@@ -38,6 +42,7 @@
+ {% if account.expense_projected != 0 %}
+ {% else %} +
-
+ {% endif %}
{% if account.exchanged and account.exchanged.expense_projected %} @@ -86,6 +94,7 @@
{% translate 'current income' %}
+ {% if account.income_current != 0 %}
+ {% else %} +
-
+ {% endif %} {% if account.exchanged and account.exchanged.income_current %}
@@ -108,6 +120,7 @@
{% translate 'current expenses' %}
+ {% if account.expense_current != 0 %}
+ {% else %} +
-
+ {% endif %} {% if account.exchanged and account.exchanged.expense_current %}
@@ -130,8 +146,7 @@
{% translate 'current total' %}
-
+
{% translate 'projected income' %}
+ {% if currency.income_projected != 0 %}
+ {% else %} +
-
+ {% endif %} {% if currency.exchanged and currency.exchanged.income_projected %}
@@ -33,6 +37,7 @@
+ {% if currency.expense_projected != 0 %}
+ {% else %} +
-
+ {% endif %}
{% if currency.exchanged and currency.exchanged.expense_projected %} @@ -56,8 +64,7 @@
{% translate 'projected total' %}
-
+
{% translate 'current income' %}
+ {% if currency.income_current != 0 %}
+ {% else %} +
-
+ {% endif %} {% if currency.exchanged and currency.exchanged.income_current %}
@@ -103,6 +114,7 @@
{% translate 'current expenses' %}
+ {% if currency.expense_current != 0 %}
+ {% else %} +
-
+ {% endif %} {% if currency.exchanged and currency.exchanged.expense_current %}
@@ -125,8 +140,7 @@
{% translate 'current total' %}
-
+