home · contact · privacy
In Booking balance view, highlight accounts directly targeted in Booking.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 13 Feb 2025 02:20:58 +0000 (03:20 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 13 Feb 2025 02:20:58 +0000 (03:20 +0100)
src/run.py
src/templates/_macros.tmpl
src/templates/edit_structured.tmpl

index bafb5bb8579e6c77e035f320d30e0ce9954ba124..351e1faa5bc554cf8c9de988e5117792ae678fd6 100755 (executable)
@@ -483,6 +483,7 @@ class Handler(PlomHttpHandler):
                         wealth.purge_currencies_except(displayed_currencies)
                     node: dict[str, Any] = {
                             'name': path,
+                            'directly_set': directly_set,
                             'wealth_before': wealth_before.moneys,
                             'wealth_diff': diff,
                             'wealth_after': wealth_after.moneys,
index c93ceb952b27caf335f0c522cea3926e9e57e373..f5d7943517414ddd9b481e4051c14bcf41daf433 100644 (file)
@@ -121,33 +121,33 @@ function taint() {
 {% endmacro %}
 
 
-{% macro booking_balance_account_with_children(account) %}
-<tr class="alternating">
-<td>{{account.name}}{% if account.children %}:{% endif %}</td>
+{% macro booking_balance_account_with_children(node) %}
+<tr class="alternating{% if node.directly_set %} directly_set{% endif %}">
+<td>{{node.name}}{% if node.children %}:{% endif %}</td>
 <td class="money">
 <table>
-{% for curr, amt in account.wealth_before.items() %}
+{% for curr, amt in node.wealth_before.items() %}
   {{ tr_money_balance(amt, curr) }}
 {% endfor %}
 </table>
 </td>
 <td class="money">
 <table>
-{% for curr, amt in account.wealth_diff.items() %}
+{% for curr, amt in node.wealth_diff.items() %}
   {{ tr_money_balance(amt, curr) }}
 {% endfor %}
 </table>
 </td>
 <td class="money">
 <table>
-{% for curr, amt in account.wealth_after.items() %}
+{% for curr, amt in node.wealth_after.items() %}
   {{ tr_money_balance(amt, curr) }}
 {% endfor %}
 </table>
 </td>
 <td></td>
 </tr>
-{% for child in account.children %}
+{% for child in node.children %}
   {{ booking_balance_account_with_children(child) }}
 {% endfor %}
 {% endmacro %}
index 8569deafb696d48a3e623a51288f6406ec3b2487..ba99349b34115fb7bbea54f7994243623d0f1d97 100644 (file)
@@ -8,6 +8,7 @@
 input.date_input, input.number_input { font-family: monospace; }
 input.number_input { text-align: right; }
 input.date_input { margin-right: 0.1em; }
+tr.directly_set > td { font-weight: bold; }
 {% endblock %}