mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-28 05:54:42 +02:00
Zero datausage if expired
This commit is contained in:
parent
3f5ea7251e
commit
85ede07d77
2 changed files with 10 additions and 1 deletions
|
@ -25,6 +25,15 @@ class RadiusRest {
|
||||||
// Remove Customer to Mikrotik/Device
|
// Remove Customer to Mikrotik/Device
|
||||||
function remove_customer($customer, $plan)
|
function remove_customer($customer, $plan)
|
||||||
{
|
{
|
||||||
|
// set zero data usage
|
||||||
|
if ($plan['typebp'] == "Limited" && ($plan['limit_type'] == "Data_Limit" || $plan['limit_type'] == "Both_Limit")) {
|
||||||
|
$cs = ORM::for_table("rad_acct")->where('username', $customer['username'])->findMany();
|
||||||
|
foreach ($cs as $c) {
|
||||||
|
$c->acctOutputOctets = 0;
|
||||||
|
$c->acctInputOctets = 0;
|
||||||
|
$c->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// customer change username
|
// customer change username
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"version": "2024.8.8"
|
"version": "2024.8.9"
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue