Update
This commit is contained in:
parent
4b5192bcc3
commit
7ce1a81caa
1 changed files with 10 additions and 4 deletions
14
tab
14
tab
|
@ -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([
|
||||
|
|
Loading…
Reference in a new issue