fix variable when move customer to expired plan

This commit is contained in:
Ibnu Maksum
2024-06-23 12:01:08 +07:00
parent 4323e2b879
commit 98e3304f17
6 changed files with 25 additions and 10 deletions

View File

@ -18,9 +18,9 @@ class Radius {
function remove_customer($customer, $plan)
{
if (empty($plan['plan_expired'])) {
if (!empty($plan['plan_expired'])) {
$p = ORM::for_table("tbl_plans")->find_one($plan['plan_expired']);
$this->customerAddPlan($customer, $plan);
$this->customerAddPlan($customer, $p);
} else {
$this->customerDeactivate($customer['username'], true);
}