Look up the bank account
This commit is contained in:
1 parent
a844d7b421
commit
6604c24727
1 file changed
+10
@@ -152,6 +152,16 @@ def _load_markets(conn):
|
|||||||
return {row["id"]: dict(row) for row in rows}
|
return {row["id"]: dict(row) for row in rows}
|
||||||
|
|
||||||
|
|
||||||
|
def _bank_market_id(conn):
|
||||||
|
"""The account that pays the costs (docs/spec.md section 3.11)."""
|
||||||
|
row = conn.execute(
|
||||||
|
"SELECT value FROM settings WHERE key = 'bank_market_id'"
|
||||||
|
).fetchone()
|
||||||
|
if row is None:
|
||||||
|
raise ApiError(500, "Bankkontoen manglar i databasen.")
|
||||||
|
return int(row["value"])
|
||||||
|
|
||||||
|
|
||||||
def _with_price(transaction):
|
def _with_price(transaction):
|
||||||
"""Add the derived bitcoin price of docs/spec.md section 7.3."""
|
"""Add the derived bitcoin price of docs/spec.md section 7.3."""
|
||||||
transaction["btc_price_ore"] = tax.btc_price_ore(transaction)
|
transaction["btc_price_ore"] = tax.btc_price_ore(transaction)
|
||||||
|
|||||||
Reference in new issue
Block a user