This commit is contained in:
Midgard 2021-08-31 23:08:59 +02:00
parent 4b5192bcc3
commit 7ce1a81caa
Signed by: midgard
GPG Key ID: 511C112F1331BBB4
1 changed files with 10 additions and 4 deletions

14
tab
View File

@ -55,21 +55,27 @@ def formatted_transaction(transaction, me, balance_after=None):
transaction["message"]
).strip()
header = f"{date} {message}"
assertion = balance_assertion(balance_after)
if debtor == me:
# If the issuer wasn't Tap, we assume the money we gave was for food manual change to the
# output required if it wasn't
to_account = TAP_ACCOUNT if issuer == "Tap" else FOOD_ACCOUNT
if issuer == "Tap":
to_account = TAP_ACCOUNT
message = f"Zeus WPI | {message}"
else:
to_account = FOOD_ACCOUNT
message = f"{issuer} | {message}"
to_line = f"{to_account} {amount}"
from_line = f"tab {assertion}"
else:
message = f"{debtor} | {message}"
to_line = f"tab {amount} {assertion}"
from_line = f"; {debtor}"
from_line = f";"
header = f"{date} {message}"
return "\n".join([