Fix edit customer plan

This commit is contained in:
Ibnu Maksum
2024-06-20 14:02:36 +07:00
parent b9ff4399a4
commit 29ad9dec73
8 changed files with 77 additions and 67 deletions

View File

@ -20,19 +20,13 @@ class Radius {
{
if (empty($plan['plan_expired'])) {
$p = ORM::for_table("tbl_plans")->find_one($plan['plan_expired']);
$this->customerDeactivate($customer['username']);
$this->customerAddPlan($customer, $p);
$this->customerAddPlan($customer, $plan);
} else {
$this->upsertCustomerAttr($customer['username'], 'Framed-Pool', $plan['pool_expired'], ':=');
$this->disconnectCustomer($customer['username']);
}
}
function change_customer($customer, $plan)
{
$this->customerUpsert($customer, $plan);
}
function add_plan($plan)
{
$bw = ORM::for_table("tbl_bandwidth")->find_one($plan['id_bw']);
@ -92,6 +86,7 @@ class Radius {
function disconnect_customer($customer, $router_name)
{
$this->disconnectCustomer($customer['username']);
}
public function getTableNas()