fix inactive customer and check enable_balance

This commit is contained in:
Ibnu Maksum
2024-07-29 14:12:26 +07:00
parent a85e9ee95a
commit b3e97ecf6d
2 changed files with 8 additions and 4 deletions

View File

@ -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)) {