From ac3aff5d29185181f41b71d0ae8aac520f2354c2 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 25 Aug 2011 19:24:34 +0530 Subject: [PATCH] dashboard fixes --- home/page/dashboard/dashboard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/page/dashboard/dashboard.py b/home/page/dashboard/dashboard.py index 3ce3b0c37d..940bb50b94 100644 --- a/home/page/dashboard/dashboard.py +++ b/home/page/dashboard/dashboard.py @@ -173,9 +173,9 @@ class DashboardWidget: 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':