File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -82,8 +82,8 @@ def text_handler(text, chat_id):
8282 message = "Current month outcome list:\n \n "
8383 for r in rows :
8484 message = message + str (r ).replace ("(" , "" ).replace (")" , "" ).replace ("'" , "" )+ "\n "
85- total_outcome = db .get_total_income (month )
86- message = message + "\n \n Total income : " + str (total_outcome )+ " €"
85+ total_outcome = db .get_total_outcome (month )
86+ message = message + "\n \n Total outcomecome : " + str (total_outcome )+ " €"
8787 else :
8888 message = "No income to be displayed here " + emoji ["openhands" ]
8989 elif text == "/balance" :
@@ -95,7 +95,7 @@ def text_handler(text, chat_id):
9595 if total_outcome is None :
9696 total_outcome = 0.0
9797 logging .info (total_outcome )
98- balance = total_income + total_outcome
98+ balance = total_income - total_outcome
9999 message = "Current month balance: " + str (balance )+ " €\n \n \n Total income: " + str (total_income )+ " €\n \n Total outcome: " + str (total_outcome )+ " €"
100100 handler .send_message (message , chat_id )
101101
You can’t perform that action at this time.
0 commit comments