Plan For Expired Customer

This commit is contained in:
Ibnu Maksum
2024-06-11 13:28:05 +07:00
parent 55b32ce0da
commit e685c5d702
13 changed files with 72 additions and 169 deletions

View File

@ -34,8 +34,9 @@ class MikrotikPppoe
}
$mikrotik = $this->info($plan['routers']);
$client = $this->getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
if (!empty($plan['pool_expired'])) {
$this->setPpoeUserPlan($client, $customer['username'], 'EXPIRED NUXBILL ' . $plan['pool_expired']);
if (!empty($plan['plan_expired'])) {
$p = ORM::for_table("tbl_plans")->select("name_plan")->find_one($plan['plan_expired']);
$this->setPpoeUserPlan($client, $customer['username'], $p['plan_expired']);
} else {
$this->removePpoeUser($client, $customer['username']);
}