dashboard fixes
diff --git a/home/page/dashboard/dashboard.py b/home/page/dashboard/dashboard.py
index 3ce3b0c..940bb50 100644
--- a/home/page/dashboard/dashboard.py
+++ b/home/page/dashboard/dashboard.py
@@ -173,9 +173,9 @@
return self.get_account_balance(acc, start)[2]
elif opts['type']=='cash':
- if type=='Credit':
+ if opts['debit_or_credit']=='Credit':
return sum([self.get_account_balance(acc, start)[1] for acc in self.cash_accounts]) or 0
- if type=='Debit':
+ elif opts['debit_or_credit']=='Debit':
return sum([self.get_account_balance(acc, start)[0] for acc in self.cash_accounts]) or 0
elif opts['type']=='creation':