From 309bbc005962365385d383a14a91415c13298051 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Wed, 13 Sep 2023 15:50:20 +0700 Subject: [PATCH] fix customer count --- system/controllers/dashboard.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system/controllers/dashboard.php b/system/controllers/dashboard.php index 471828c7..f609c719 100644 --- a/system/controllers/dashboard.php +++ b/system/controllers/dashboard.php @@ -31,23 +31,23 @@ if ($imonth == '') { $ui->assign('imonth', $imonth); $u_act = ORM::for_table('tbl_user_recharges')->where('status', 'on')->count(); -if ($u_act == '') { +if (empty($u_act)) { $u_act = '0'; } $ui->assign('u_act', $u_act); $u_all = ORM::for_table('tbl_user_recharges')->count(); -if ($u_all == '') { +if (empty($u_all)) { $u_all = '0'; } $ui->assign('u_all', $u_all); $c_all = ORM::for_table('tbl_customers')->count(); -if ($u_all == '') { +if (empty($c_all)) { $c_all = '0'; } -$ui->assign('c_all', $u_all); +$ui->assign('c_all', $c_all); //user expire $expire = ORM::for_table('tbl_user_recharges')->where('expiration', $mdate)->order_by_desc('id')->find_many();