06/03 Optimize code

This commit is contained in:
2026-06-03 09:37:16 -04:00
parent 249300b871
commit 896147bd28
2 changed files with 12 additions and 1 deletions
+10
View File
@@ -197,7 +197,17 @@
<div style="font-size:11px;color:var(--muted);">{{ acct.account_type | replace('_',' ') | title }}</div>
</div>
</div>
{% if acct.account_type == 'credit_card' %}
{% set cc_owed = [0, -acct.balance] | max %}
<div class="text-end">
<span class="mono {% if cc_owed > 0 %}text-expense{% else %}text-income{% endif %}" style="font-size:13px;font-weight:600;">
{% if cc_owed > 0 %}-{% endif %}{{ cc_owed | currency }}
</span>
<div style="font-size:10px;color:var(--muted);">owed</div>
</div>
{% else %}
<span class="mono {% if acct.balance >= 0 %}text-income{% else %}text-expense{% endif %}" style="font-size:13px;font-weight:600;">{{ acct.balance | currency }}</span>
{% endif %}
</div>
{% endfor %}
<div class="mt-3 pt-1" style="font-size:12px;color:var(--muted);">