From 2a9f4091a998da075a8767b292d364d1cfe53543 Mon Sep 17 00:00:00 2001 From: ai-bot Date: Mon, 16 Nov 2026 19:22:25 +0000 Subject: [PATCH] Stop writing a second leg for a cost --- app.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app.py b/app.py index 50e0967..8c1d28a 100644 --- a/app.py +++ b/app.py @@ -207,11 +207,9 @@ def _write_transaction(conn, tx_id, tx, picks): """Insert or update one row, filling in what the server derives.""" now = _now_stamp() if tx["type"] == "admin_cost": - # The cost stands on the bank and carries the same kroner back in, so the - # bank never goes negative and no other account is touched (section 3.11). + # The cost is paid from the bank and the kroner leave it (section 3.10). tx = dict(tx) tx["market_id"] = _bank_market_id(conn) - tx["leg_in_ore"] = tx["leg_out_ore"] if tx_id is None: cursor = conn.execute( "INSERT INTO transactions (date, type, market_id, taxable, note, leg_in_sats,"