From d830ba4e0645ebbccc7349493256a6c28f1b2ae9 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Thu, 8 Aug 2024 14:44:42 +0700 Subject: [PATCH] removePpoeActive based pppoe_username --- system/devices/MikrotikPppoe.php | 4 +++- system/lan/english.json | 3 ++- ui/ui/invoice-customer.tpl | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/system/devices/MikrotikPppoe.php b/system/devices/MikrotikPppoe.php index 79a46f0f..04f12c8d 100644 --- a/system/devices/MikrotikPppoe.php +++ b/system/devices/MikrotikPppoe.php @@ -60,11 +60,13 @@ class MikrotikPppoe //disconnect then if(isset($isChangePlan) && $isChangePlan){ $this->removePpoeActive($client, $customer['username']); + if (!empty($customer['pppoe_username'])) { + $this->removePpoeActive($client, $customer['pppoe_username']); + } } } } - function remove_customer($customer, $plan) { $mikrotik = $this->info($plan['routers']); diff --git a/system/lan/english.json b/system/lan/english.json index af4be094..6d79ab7b 100644 --- a/system/lan/english.json +++ b/system/lan/english.json @@ -697,5 +697,6 @@ "PPPoE_Username_already_used_by_another_customer": "PPPoE Username already used by another customer", "just_now": "just now", "Not_Working_for_freeradius": "Not Working for freeradius", - "User_Cannot_change_this__only_admin__if_it_Empty_it_will_use_Customer_Credentials": "User Cannot change this, only admin. if it Empty it will use Customer Credentials" + "User_Cannot_change_this__only_admin__if_it_Empty_it_will_use_Customer_Credentials": "User Cannot change this, only admin. if it Empty it will use Customer Credentials", + "Failed_to_buy_package": "Failed to buy package" } \ No newline at end of file diff --git a/ui/ui/invoice-customer.tpl b/ui/ui/invoice-customer.tpl index 30e8e371..8b369d06 100644 --- a/ui/ui/invoice-customer.tpl +++ b/ui/ui/invoice-customer.tpl @@ -1,7 +1,7 @@ {include file="sections/user-header.tpl"}
-
+
{$in['invoice']}