mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-03 01:34:53 +02:00
intval acctInputOctets
This commit is contained in:
parent
6666fd0ed4
commit
2b104d2ed7
1 changed files with 1 additions and 1 deletions
|
@ -294,7 +294,7 @@ function process_radiust_rest($tur, $code)
|
|||
if ($plan['typebp'] == "Limited") {
|
||||
if ($plan['limit_type'] == "Data_Limit" || $plan['limit_type'] == "Both_Limit") {
|
||||
$raddact = ORM::for_table('rad_acct')->where('username', $tur['username'])->where('acctstatustype', 'Start')->find_one();
|
||||
$totalUsage = $raddact['acctOutputOctets'] + $raddact['acctInputOctets'];
|
||||
$totalUsage = intval($raddact['acctOutputOctets']) + intval($raddact['acctInputOctets']);
|
||||
$attrs['reply:Mikrotik-Total-Limit'] = Text::convertDataUnit($plan['data_limit'], $plan['data_unit']) - $totalUsage;
|
||||
if ($attrs['reply:Mikrotik-Total-Limit'] < 0) {
|
||||
$attrs['reply:Mikrotik-Total-Limit'] = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue