diff --git a/system/controllers/dashboard.php b/system/controllers/dashboard.php index 1858a334..1bb592e9 100644 --- a/system/controllers/dashboard.php +++ b/system/controllers/dashboard.php @@ -55,9 +55,10 @@ if ($imonth == '') { } $ui->assign('imonth', $imonth); -$cb = ORM::for_table('tbl_customers')->whereGte('balance', 0)->sum('balance'); - -$ui->assign('cb', $cb); +if ($config['enable_balance'] == 'yes'){ + $cb = ORM::for_table('tbl_customers')->whereGte('balance', 0)->sum('balance'); + $ui->assign('cb', $cb); +} $u_act = ORM::for_table('tbl_user_recharges')->where('status', 'on')->count(); if (empty($u_act)) { diff --git a/ui/ui/dashboard.tpl b/ui/ui/dashboard.tpl index 1b9814ee..7b2abee7 100644 --- a/ui/ui/dashboard.tpl +++ b/ui/ui/dashboard.tpl @@ -53,7 +53,7 @@