home · contact · privacy
Improve "sink missing" error display.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 24 Jan 2026 11:32:24 +0000 (12:32 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 24 Jan 2026 11:32:24 +0000 (12:32 +0100)
src/ledgplom/ledger.py
src/tests/full.balance
src/tests/full.balance.4 [new file with mode: 0644]
src/tests/full.dat
src/tests/full.edit_raw.4
src/tests/full.edit_structured.4
src/tests/full.edit_structured.5 [new file with mode: 0644]
src/tests/full.ledger_raw
src/tests/full.ledger_structured

index 3217582cf62badc9d0fefe8de0b84231838e2a25..75e58f9703d537449cba08b2f53eb4669ea51644 100644 (file)
@@ -53,11 +53,6 @@ class _Wealth():
     def __sub__(self, other: Self) -> Self:
         return self._add(other, add=False)
 
-    @property
-    def sink_empty(self) -> bool:
-        'Return if all evens out to zero.'
-        return not bool(self.as_sink.moneys)
-
     @property
     def as_sink(self) -> '_Wealth':
         'Drop zero amounts, invert non-zero ones.'
@@ -392,8 +387,10 @@ class _Booking(_LinesBlock[_BookingLine]):
             diffs += diff
         if sink_account:
             self.diffs_targeted[sink_account] += diffs.as_sink
-        elif not diffs.sink_empty:
-            self.sink_error = 'needed sink missing'
+        elif diffs.as_sink.moneys:
+            self.sink_error = 'needed sink missing for: '\
+                    + ', '.join(f'{amt} {cur}'
+                                for cur, amt in diffs.as_sink.moneys.items())
 
     @property
     def diffs_inheriting(self) -> dict[str, _Wealth]:
index 2ae2b44f2321a37e563710210d25a66b4655f070..4c70e1efad77b819e91a6da4e4ae5c157e471aec 100644 (file)
@@ -78,10 +78,10 @@ span.indent {
     </form>
 </div>
 <p>
-    <a href="/balance/3">prev</a>
+    <a href="/balance/4">prev</a>
     <del>next</del>
     |
-    balance after <a href="/blocks/4">booking 4 (2001-01-01: test)</a>
+    balance after <a href="/blocks/5">booking 5 (2001-01-03: test)</a>
 </p>
 <table class="alternating critical">
 <tbody>
@@ -92,7 +92,7 @@ span.indent {
                     <table>
                     <tbody>
                         <tr>
-                            <td class="balance amount">-9</td>
+                            <td class="balance amount">-18</td>
                             <td class="balance currency">€</td>
                         </tr>
                     </tbody>
@@ -101,7 +101,7 @@ span.indent {
                 <table>
                 <tbody>
                     <tr>
-                        <td class="balance amount">-1</td>
+                        <td class="balance amount">-2</td>
                         <td class="balance currency">USD</td>
                     </tr>
                 </tbody>
@@ -118,7 +118,7 @@ span.indent {
             <table>
             <tbody>
                 <tr>
-                    <td class="balance amount">-10</td>
+                    <td class="balance amount">-19</td>
                     <td class="balance currency">€</td>
                 </tr>
             </tbody>
@@ -134,7 +134,7 @@ span.indent {
             <table>
             <tbody>
                 <tr>
-                    <td class="balance amount">-10</td>
+                    <td class="balance amount">-19</td>
                     <td class="balance currency">€</td>
                 </tr>
             </tbody>
@@ -150,7 +150,7 @@ span.indent {
             <table>
             <tbody>
                 <tr>
-                    <td class="balance amount">-1</td>
+                    <td class="balance amount">-2</td>
                     <td class="balance currency">USD</td>
                 </tr>
             </tbody>
@@ -184,7 +184,7 @@ span.indent {
                     <table>
                     <tbody>
                         <tr>
-                            <td class="balance amount">20</td>
+                            <td class="balance amount">30</td>
                             <td class="balance currency">€</td>
                         </tr>
                     </tbody>
@@ -193,7 +193,7 @@ span.indent {
                 <table>
                 <tbody>
                     <tr>
-                        <td class="balance amount">1</td>
+                        <td class="balance amount">4</td>
                         <td class="balance currency">USD</td>
                     </tr>
                 </tbody>
@@ -212,7 +212,7 @@ span.indent {
                     <table>
                     <tbody>
                         <tr>
-                            <td class="balance amount">10</td>
+                            <td class="balance amount">20</td>
                             <td class="balance currency">€</td>
                         </tr>
                     </tbody>
@@ -221,7 +221,7 @@ span.indent {
                 <table>
                 <tbody>
                     <tr>
-                        <td class="balance amount">1</td>
+                        <td class="balance amount">4</td>
                         <td class="balance currency">USD</td>
                     </tr>
                 </tbody>
diff --git a/src/tests/full.balance.4 b/src/tests/full.balance.4
new file mode 100644 (file)
index 0000000..c48034a
--- /dev/null
@@ -0,0 +1,239 @@
+<!DOCTYPE html><html><head>
+<meta charset="UTF-8">
+<style>
+html {
+    scroll-padding-top: 2em;
+}
+body {
+    background: #ffffff;
+    font-family: sans-serif;
+    text-align: left;
+    margin: 0;
+    padding: 0;
+}
+#header {
+    background: #ffffff;
+    position: sticky;
+    top: 0;
+    padding-left: 0.5em;
+    padding-bottom: 0.25em;
+    border-bottom: 1px solid black;
+}
+table.alternating > tbody > tr:nth-child(odd) {
+    background-color: #dcdcdc;
+}
+table.alternating > tbody > tr:nth-child(even) {
+    background: #ffffff;
+}
+td {
+    vertical-align: top;
+}
+.critical {
+    background: #ff6666 !important;
+}
+td.amount {
+    text-align: right;
+}
+td.amount,
+td.currency {
+    font-family: monospace;
+    font-size: 1.25em;
+}
+table.alternating.critical > tbody > tr:nth-child(even) {
+    background-color: #ff8a8a;
+}
+td.balance.amount {
+    width: 10em;
+}
+td.balance.currency {
+    width: 3em;
+}
+td.money table {
+    float: left;
+}
+summary::marker {
+    font-family: monospace;
+    font-size: 1.25em;
+}
+summary {
+    list-style-type: "[…]";
+}
+details[open] > summary {
+    list-style-type: "[^]";
+}
+span.indent {
+    letter-spacing: 3em;
+}
+</style>
+</head>
+<body>
+<div id="header">
+    <form action="/balance/4" method="POST">
+        <span class="disable_on_taint">
+            ledger <a href="/ledger_structured">structured</a>
+            / <a href="/ledger_raw">raw</a>
+            · <a href="/balance">balance</a>
+            · <input type="submit" name="file_load" value="reload">
+        </span>
+    </form>
+</div>
+<p>
+    <a href="/balance/3">prev</a>
+    <a href="/balance/5">next</a>
+    |
+    balance after <a href="/blocks/4">booking 4 (2001-01-03: test)</a>
+</p>
+<table class="alternating critical">
+<tbody>
+    <tr>
+        <td class="money">
+            <details>
+                <summary>
+                    <table>
+                    <tbody>
+                        <tr>
+                            <td class="balance amount">-9</td>
+                            <td class="balance currency">€</td>
+                        </tr>
+                    </tbody>
+                    </table>
+                </summary>
+                <table>
+                <tbody>
+                    <tr>
+                        <td class="balance amount">-1</td>
+                        <td class="balance currency">USD</td>
+                    </tr>
+                </tbody>
+                </table>
+            </details>
+        </td>
+        <td>
+            <span class="indent"></span>bar:
+        </td>
+        <td></td>
+    </tr>
+    <tr>
+        <td class="money">
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-10</td>
+                    <td class="balance currency">€</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <span class="indent">&nbsp;</span>:x:
+        </td>
+        <td>bla bla bla</td>
+    </tr>
+    <tr>
+        <td class="money">
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-10</td>
+                    <td class="balance currency">€</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <span class="indent">&nbsp;&nbsp;</span>:y
+        </td>
+        <td></td>
+    </tr>
+    <tr>
+        <td class="money">
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-1</td>
+                    <td class="balance currency">USD</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <span class="indent">&nbsp;</span>:z
+        </td>
+        <td></td>
+    </tr>
+    <tr>
+        <td class="money">
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-10</td>
+                    <td class="balance currency">€</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <span class="indent"></span>baz
+        </td>
+        <td></td>
+    </tr>
+    <tr>
+        <td class="money">
+            <details>
+                <summary>
+                    <table>
+                    <tbody>
+                        <tr>
+                            <td class="balance amount">20</td>
+                            <td class="balance currency">€</td>
+                        </tr>
+                    </tbody>
+                    </table>
+                </summary>
+                <table>
+                <tbody>
+                    <tr>
+                        <td class="balance amount">1</td>
+                        <td class="balance currency">USD</td>
+                    </tr>
+                </tbody>
+                </table>
+            </details>
+        </td>
+        <td>
+            <span class="indent"></span>foo:
+        </td>
+        <td></td>
+    </tr>
+    <tr>
+        <td class="money">
+            <details>
+                <summary>
+                    <table>
+                    <tbody>
+                        <tr>
+                            <td class="balance amount">10</td>
+                            <td class="balance currency">€</td>
+                        </tr>
+                    </tbody>
+                    </table>
+                </summary>
+                <table>
+                <tbody>
+                    <tr>
+                        <td class="balance amount">1</td>
+                        <td class="balance currency">USD</td>
+                    </tr>
+                </tbody>
+                </table>
+            </details>
+        </td>
+        <td>
+            <span class="indent">&nbsp;</span>:x
+        </td>
+        <td></td>
+    </tr>
+</tbody>
+</table>
+
+</body></html>
index 28b6b04743439c2692801cfa7cc47dd64ef79317..2bb5747e7db6fd17b267c6e9b7199679f034dfab 100644 (file)
     bar     1 €
     baz   -20 €  ; baz
 
-2001-01-01 test
+2001-01-03 test
     foo:x    10 €
     foo:x    1 USD
     bar:x:y   -10 €
     bar:z   -1 USD
+
+2001-01-03 test
+    foo:x    10 €
+    foo:x    3 USD
+    bar:x:y   -9 €
+    bar:z   -1 USD
index aaca7c0410704166853ea7b8bb173d5f4edb91b4..c49bb9431bfd1f3229b528165fc50864ab36a836 100644 (file)
@@ -69,7 +69,7 @@ td.direct_target {
 <form action="/edit_raw/4" method="POST">
 <span class="disable_on_taint">
 <a href="/blocks/3">prev</a>
-<del>next</del>
+<a href="/blocks/5">next</a>
 </span>
 <input class="enable_on_taint" type="submit" name="apply" value="apply" disabled="">
 <input class="enable_on_taint" type="submit" name="revert" value="revert" disabled="">
@@ -81,14 +81,8 @@ td.direct_target {
 <a href="/ledger_raw/#block_4">in ledger</a>
 </span>
 <hr>
-<div class="critical">
-    block-wide errors:
-    date &lt; previous date
-    – and:
-</div>
-<hr>
 
-<textarea name="raw_lines" class="tainter" cols="100" rows="7">2001-01-01 test
+<textarea name="raw_lines" class="tainter" cols="100" rows="7">2001-01-03 test
   foo:x  10 €
   foo:x  1 USD
   bar:x:y  -10 €
index 9df28c9fea9b3fbb8e2b758194f8f3a76502981d..2445a52e3287d140998c34b4f9827936aa9eb590 100644 (file)
@@ -78,7 +78,7 @@ input.amount {
 <form action="/edit_structured/4" method="POST">
 <span class="disable_on_taint">
 <a href="/blocks/3">prev</a>
-<del>next</del>
+<a href="/blocks/5">next</a>
 </span>
 <input class="enable_on_taint" type="submit" name="apply" value="apply" disabled="">
 <input class="enable_on_taint" type="submit" name="revert" value="revert" disabled="">
@@ -90,12 +90,6 @@ input.amount {
 <a href="/ledger_structured/#block_4">in ledger</a>
 </span>
 <hr>
-<div class="critical">
-    block-wide errors:
-    date &lt; previous date
-    – and:
-</div>
-<hr>
 
 <span class="disable_on_taint">
 <input id="btn_mirror" type="button" value="mirror">
diff --git a/src/tests/full.edit_structured.5 b/src/tests/full.edit_structured.5
new file mode 100644 (file)
index 0000000..e57728b
--- /dev/null
@@ -0,0 +1,475 @@
+<!DOCTYPE html><html><head>
+<meta charset="UTF-8">
+<script type="module" src="/edit_structured.js/5">
+</script>
+<style>
+html {
+    scroll-padding-top: 2em;
+}
+body {
+    background: #ffffff;
+    font-family: sans-serif;
+    text-align: left;
+    margin: 0;
+    padding: 0;
+}
+#header {
+    background: #ffffff;
+    position: sticky;
+    top: 0;
+    padding-left: 0.5em;
+    padding-bottom: 0.25em;
+    border-bottom: 1px solid black;
+}
+table.alternating > tbody > tr:nth-child(odd) {
+    background-color: #dcdcdc;
+}
+table.alternating > tbody > tr:nth-child(even) {
+    background: #ffffff;
+}
+td {
+    vertical-align: top;
+}
+.critical {
+    background: #ff6666 !important;
+}
+td.amount {
+    text-align: right;
+}
+td.amount,
+td.currency {
+    font-family: monospace;
+    font-size: 1.25em;
+}
+table.alternating.critical > tbody > tr:nth-child(even) {
+    background-color: #ff8a8a;
+}
+td.balance.amount {
+    width: 10em;
+}
+td.balance.currency {
+    width: 3em;
+}
+td.direct_target {
+    font-weight: bold;
+}
+
+input.amount {
+    text-align: right;
+    font-family: monospace;
+}
+#date_input {
+    margin-right: 0.3em;
+    font-family: monospace;
+}
+</style>
+</head>
+<body>
+<div id="header">
+    <form action="/edit_structured/5" method="POST">
+        <span class="disable_on_taint">
+            ledger <a href="/ledger_structured">structured</a>
+            / <a href="/ledger_raw">raw</a>
+            · <a href="/balance">balance</a>
+            · <input type="submit" name="file_load" value="reload">
+        </span>
+    </form>
+</div>
+<form action="/edit_structured/5" method="POST">
+<span class="disable_on_taint">
+<a href="/blocks/4">prev</a>
+<del>next</del>
+</span>
+<input class="enable_on_taint" type="submit" name="apply" value="apply" disabled="">
+<input class="enable_on_taint" type="submit" name="revert" value="revert" disabled="">
+<span class="disable_on_taint">
+<a href="/edit_raw/5">switch to raw</a>
+<a href="/balance/5">balance after</a>
+<a href="/ledger_structured/#block_5">in ledger</a>
+</span>
+<hr>
+<div class="critical">
+    block-wide errors:
+    
+    needed sink missing for: -1 €, -2 USD
+</div>
+<hr>
+
+<span class="disable_on_taint">
+<input id="btn_mirror" type="button" value="mirror">
+<input id="btn_sink" type="button" value="fill sink">
+|
+<input id="btn_replace" type="button" value="replace string">
+from
+<input id="replace_from">
+to
+<input id="replace_to">
+</span>
+<hr>
+<EXPANDED>
+<table id="booking_lines" class="alternating">
+<tr>
+<td colspan="1">
+</td>
+<td colspan="3">
+<input name="line_0_date" size="10" id="date_input">
+<input name="line_0_target" size="37">
+</td>
+<td colspan="1">
+<input name="line_0_comment" size="40">
+</td>
+<td colspan="1">
+<button type="button">add new</button>
+</td>
+</tr>
+<tr>
+<td colspan="1">
+<button type="button" disabled="">^</button>
+<button type="button">v</button>
+</td>
+<td colspan="1">
+<input name="line_1_account" size="30" list="all_accounts" autocomplete="off">
+</td>
+<td colspan="1">
+<input name="line_1_amount" size="12" pattern="^-?[0-9]+(.[0-9]+)?$" class="amount">
+</td>
+<td colspan="1">
+<input name="line_1_currency" size="3" placeholder="€">
+</td>
+<td colspan="1">
+<input name="line_1_comment" size="40">
+</td>
+<td colspan="1">
+<button type="button">add new</button>
+<button type="button">delete</button>
+</td>
+</tr>
+<tr>
+<td colspan="1">
+<button type="button">^</button>
+<button type="button">v</button>
+</td>
+<td colspan="1">
+<input name="line_2_account" size="30" list="all_accounts" autocomplete="off">
+</td>
+<td colspan="1">
+<input name="line_2_amount" size="12" pattern="^-?[0-9]+(.[0-9]+)?$" class="amount">
+</td>
+<td colspan="1">
+<input name="line_2_currency" size="3" placeholder="€">
+</td>
+<td colspan="1">
+<input name="line_2_comment" size="40">
+</td>
+<td colspan="1">
+<button type="button">add new</button>
+<button type="button">delete</button>
+</td>
+</tr>
+<tr>
+<td colspan="1">
+<button type="button">^</button>
+<button type="button">v</button>
+</td>
+<td colspan="1">
+<input name="line_3_account" size="30" list="all_accounts" autocomplete="off">
+</td>
+<td colspan="1">
+<input name="line_3_amount" size="12" pattern="^-?[0-9]+(.[0-9]+)?$" class="amount">
+</td>
+<td colspan="1">
+<input name="line_3_currency" size="3" placeholder="€">
+</td>
+<td colspan="1">
+<input name="line_3_comment" size="40">
+</td>
+<td colspan="1">
+<button type="button">add new</button>
+<button type="button">delete</button>
+</td>
+</tr>
+<tr>
+<td colspan="1">
+<button type="button">^</button>
+<button type="button">v</button>
+</td>
+<td colspan="1">
+<input name="line_4_account" size="30" list="all_accounts" autocomplete="off">
+</td>
+<td colspan="1">
+<input name="line_4_amount" size="12" pattern="^-?[0-9]+(.[0-9]+)?$" class="amount">
+</td>
+<td colspan="1">
+<input name="line_4_currency" size="3" placeholder="€">
+</td>
+<td colspan="1">
+<input name="line_4_comment" size="40">
+</td>
+<td colspan="1">
+<button type="button">add new</button>
+<button type="button">delete</button>
+</td>
+</tr>
+</table>
+</EXPANDED>
+<div>Gap:</div>
+<textarea id="gap_lines" name="raw_lines" cols="100" rows="2" class="tainter"></textarea>
+</form>
+<datalist id="all_accounts">
+<option value="bar">bar</option>
+<option value="bar:x">bar:x</option>
+<option value="bar:x:y">bar:x:y</option>
+<option value="bar:z">bar:z</option>
+<option value="baz">baz</option>
+<option value="foo">foo</option>
+<option value="foo:x">foo:x</option>
+</datalist>
+<hr>
+<table class="alternating critical">
+<tbody>
+    <tr>
+        <th>account</th>
+        <th>before</th>
+        <th>diff</th>
+        <th>after</th>
+    </tr>
+    <tr>
+        <td>bar:</td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-9</td>
+                    <td class="balance currency">€</td>
+                </tr>
+                <tr>
+                    <td class="balance amount">-1</td>
+                    <td class="balance currency">USD</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-9</td>
+                    <td class="balance currency">€</td>
+                </tr>
+                <tr>
+                    <td class="balance amount">-1</td>
+                    <td class="balance currency">USD</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-18</td>
+                    <td class="balance currency">€</td>
+                </tr>
+                <tr>
+                    <td class="balance amount">-2</td>
+                    <td class="balance currency">USD</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+    </tr>
+    <tr>
+        <td>bar:x:</td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-10</td>
+                    <td class="balance currency">€</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-9</td>
+                    <td class="balance currency">€</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-19</td>
+                    <td class="balance currency">€</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+    </tr>
+    <tr>
+        <td class="direct_target">bar:x:y</td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-10</td>
+                    <td class="balance currency">€</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-9</td>
+                    <td class="balance currency">€</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-19</td>
+                    <td class="balance currency">€</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+    </tr>
+    <tr>
+        <td class="direct_target">bar:z</td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-1</td>
+                    <td class="balance currency">USD</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-1</td>
+                    <td class="balance currency">USD</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">-2</td>
+                    <td class="balance currency">USD</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+    </tr>
+    <tr>
+        <td>foo:</td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">20</td>
+                    <td class="balance currency">€</td>
+                </tr>
+                <tr>
+                    <td class="balance amount">1</td>
+                    <td class="balance currency">USD</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">10</td>
+                    <td class="balance currency">€</td>
+                </tr>
+                <tr>
+                    <td class="balance amount">3</td>
+                    <td class="balance currency">USD</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">30</td>
+                    <td class="balance currency">€</td>
+                </tr>
+                <tr>
+                    <td class="balance amount">4</td>
+                    <td class="balance currency">USD</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+    </tr>
+    <tr>
+        <td class="direct_target">foo:x</td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">10</td>
+                    <td class="balance currency">€</td>
+                </tr>
+                <tr>
+                    <td class="balance amount">1</td>
+                    <td class="balance currency">USD</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">10</td>
+                    <td class="balance currency">€</td>
+                </tr>
+                <tr>
+                    <td class="balance amount">3</td>
+                    <td class="balance currency">USD</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+        <td>
+            <table>
+            <tbody>
+                <tr>
+                    <td class="balance amount">20</td>
+                    <td class="balance currency">€</td>
+                </tr>
+                <tr>
+                    <td class="balance amount">4</td>
+                    <td class="balance currency">USD</td>
+                </tr>
+            </tbody>
+            </table>
+        </td>
+    </tr>
+</tbody>
+</table>
+
+</body></html>
index a679990c9243eb68cd68adc90fe28f37a8b01d9e..9d2d63ab5f38f47c60a4699e1cb431f9a3ec192e 100644 (file)
@@ -134,10 +134,10 @@ Detected redundant empty lines in gaps, <input type="submit" name="remove_redund
     <tr><td>&nbsp;</td></tr>
     <tr></tr><!-- keep the background-color alternation in proper order -->
     <tr id="block_4">
-        <td rowspan="7" class="block_column critical">
+        <td rowspan="7" class="block_column">
             <input type="submit" name="ledger_moveup_4" value="^" disabled="">
             <br>
-            <input type="submit" name="ledger_movedown_4" value="v" disabled="">
+            <input type="submit" name="ledger_movedown_4" value="v">
             <br>
             <input type="submit" name="ledger_copy_4" value="C">
         </td>
@@ -147,12 +147,33 @@ Detected redundant empty lines in gaps, <input type="submit" name="remove_redund
             [<a href="/edit_raw/4">e</a>]
         </td>
     </tr>
-    <tr><td>2001-01-01 test&nbsp;</td></tr>
+    <tr><td>2001-01-03 test&nbsp;</td></tr>
     <tr><td>  foo:x  10 €&nbsp;</td></tr>
     <tr><td>  foo:x  1 USD&nbsp;</td></tr>
     <tr><td>  bar:x:y  -10 €&nbsp;</td></tr>
     <tr><td>  bar:z  -1 USD&nbsp;</td></tr>
     <tr><td>&nbsp;</td></tr>
+    <tr></tr><!-- keep the background-color alternation in proper order -->
+    <tr id="block_5">
+        <td rowspan="7" class="block_column">
+            <input type="submit" name="ledger_moveup_5" value="^">
+            <br>
+            <input type="submit" name="ledger_movedown_5" value="v" disabled="">
+            <br>
+            <input type="submit" name="ledger_copy_5" value="C">
+        </td>
+        <td rowspan="7" class="block_column critical">
+            [<a href="#block_5">#</a>]<br>
+            [<a href="/balance/5">b</a>]<br>
+            [<a href="/edit_raw/5">e</a>]
+        </td>
+    </tr>
+    <tr><td>2001-01-03 test&nbsp;</td></tr>
+    <tr><td>  foo:x  10 €&nbsp;</td></tr>
+    <tr><td>  foo:x  3 USD&nbsp;</td></tr>
+    <tr><td>  bar:x:y  -9 €&nbsp;</td></tr>
+    <tr><td>  bar:z  -1 USD&nbsp;</td></tr>
+    <tr><td>&nbsp;</td></tr>
 </tbody>
 </table>
 </form>
index a5ef5c138cc820120d82d1be33d37c53c010e7ea..457dbbe800ae28516e11a703c73923f9c6607f3c 100644 (file)
@@ -200,10 +200,10 @@ Detected redundant empty lines in gaps, <input type="submit" name="remove_redund
     </tr>
     <tr></tr><!-- keep the background-color alternation in proper order -->
     <tr id="block_4">
-        <td rowspan="7" class="block_column critical">
+        <td rowspan="7" class="block_column">
             <input type="submit" name="ledger_moveup_4" value="^" disabled="">
             <br>
-            <input type="submit" name="ledger_movedown_4" value="v" disabled="">
+            <input type="submit" name="ledger_movedown_4" value="v">
             <br>
             <input type="submit" name="ledger_copy_4" value="C">
         </td>
@@ -214,7 +214,7 @@ Detected redundant empty lines in gaps, <input type="submit" name="remove_redund
         </td>
     </tr>
     <tr>
-        <td colspan="3">2001-01-01 test</td>
+        <td colspan="3">2001-01-03 test</td>
         <td></td>
     </tr>
     <tr>
@@ -244,6 +244,52 @@ Detected redundant empty lines in gaps, <input type="submit" name="remove_redund
     <tr>
         <td colspan="4">&nbsp;</td>
     </tr>
+    <tr></tr><!-- keep the background-color alternation in proper order -->
+    <tr id="block_5">
+        <td rowspan="7" class="block_column">
+            <input type="submit" name="ledger_moveup_5" value="^">
+            <br>
+            <input type="submit" name="ledger_movedown_5" value="v" disabled="">
+            <br>
+            <input type="submit" name="ledger_copy_5" value="C">
+        </td>
+        <td rowspan="7" class="block_column critical">
+            [<a href="#block_5">#</a>]<br>
+            [<a href="/balance/5">b</a>]<br>
+            [<a href="/edit_structured/5">e</a>]
+        </td>
+    </tr>
+    <tr>
+        <td colspan="3">2001-01-03 test</td>
+        <td></td>
+    </tr>
+    <tr>
+        <td class="amount">10.00</td>
+        <td class="currency">€</td>
+        <td>foo:x</td>
+        <td></td>
+    </tr>
+    <tr>
+        <td class="amount">3.00</td>
+        <td class="currency">USD</td>
+        <td>foo:x</td>
+        <td></td>
+    </tr>
+    <tr>
+        <td class="amount">-9.00</td>
+        <td class="currency">€</td>
+        <td>bar:x:y</td>
+        <td></td>
+    </tr>
+    <tr>
+        <td class="amount">-1.00</td>
+        <td class="currency">USD</td>
+        <td>bar:z</td>
+        <td></td>
+    </tr>
+    <tr>
+        <td colspan="4">&nbsp;</td>
+    </tr>
 </tbody>
 </table>
 <input type="submit" name="add_booking" value="add booking">