From: Christian Heller Date: Thu, 13 Feb 2025 02:45:12 +0000 (+0100) Subject: Minor variable name change for better semantical precision. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/static/%7B%7Bdb.prefix%7D%7D/new_day?a=commitdiff_plain;h=f00ed536bde94f705163c2f13e46d42e12848b14;p=ledgplom Minor variable name change for better semantical precision. --- diff --git a/src/run.py b/src/run.py index 351e1fa..e27a438 100755 --- a/src/run.py +++ b/src/run.py @@ -469,21 +469,21 @@ class Handler(PlomHttpHandler): continue wealth_before = accounts_before[path].wealth wealth_after = accounts_after[path].wealth - directly_set = full_name == path + direct_target = full_name == path diff = { c: a for c, a in (wealth_after - wealth_before ).moneys.items() if a != 0 - or (directly_set + or (direct_target and c in booking.account_changes[full_name].moneys)} - if diff or directly_set: + if diff or direct_target: displayed_currencies = set(diff.keys()) for wealth in wealth_before, wealth_after: wealth.ensure_currencies(displayed_currencies) wealth.purge_currencies_except(displayed_currencies) node: dict[str, Any] = { 'name': path, - 'directly_set': directly_set, + 'direct_target': direct_target, 'wealth_before': wealth_before.moneys, 'wealth_diff': diff, 'wealth_after': wealth_after.moneys, diff --git a/src/templates/_macros.tmpl b/src/templates/_macros.tmpl index 85f3b14..bc98cc1 100644 --- a/src/templates/_macros.tmpl +++ b/src/templates/_macros.tmpl @@ -123,7 +123,7 @@ function taint() { {% macro booking_balance_account_with_children(node) %} -{{node.name}}{% if node.children %}:{% endif %} +{{node.name}}{% if node.children %}:{% endif %} {% for curr, amt in node.wealth_before.items() %} diff --git a/src/templates/edit_structured.tmpl b/src/templates/edit_structured.tmpl index 43a1858..ad7450e 100644 --- a/src/templates/edit_structured.tmpl +++ b/src/templates/edit_structured.tmpl @@ -8,7 +8,7 @@ input.date_input, input.number_input { font-family: monospace; } input.number_input { text-align: right; } input.date_input { margin-right: 0.1em; } -td.directly_set { font-weight: bold; } +td.direct_target { font-weight: bold; } {% endblock %}