diff --git a/tab b/tab index a3450e9..cf984bc 100755 --- a/tab +++ b/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([