Fix Bills Zero

This commit is contained in:
Ibnu Maksum 2024-03-16 20:27:00 +07:00
parent 23790d3258
commit 32943b40be
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5

View File

@ -33,6 +33,7 @@ class Package
$p = ORM::for_table('tbl_plans')->where('id', $plan_id)->find_one(); $p = ORM::for_table('tbl_plans')->where('id', $plan_id)->find_one();
$add_cost = 0; $add_cost = 0;
$bills = [];
// Zero cost recharge // Zero cost recharge
if (isset($zero) && $zero == 1) { if (isset($zero) && $zero == 1) {
$p['price'] = 0; $p['price'] = 0;
@ -568,7 +569,7 @@ class Package
"\nPrice: " . Lang::moneyFormat($p['price'])); "\nPrice: " . Lang::moneyFormat($p['price']));
} }
} }
if (count($bills) > 0) { if (is_array($bills) && count($bills) > 0) {
User::billsPaid($bills, $id_customer); User::billsPaid($bills, $id_customer);
} }
run_hook("recharge_user_finish"); run_hook("recharge_user_finish");