Skip to content

Commit 8183d1e

Browse files
committed
fixed: limited plans counting
plans with limited quota were not counting properly if After Quota is not allowed.
1 parent 4718625 commit 8183d1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Policies/Account/AccountingPolicy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class AccountingPolicy implements AccountingPolicyInterface {
1212

1313
public function getCountableTime()
1414
{
15-
if( $this->plan->isUnlimited() || $this->plan->aq_invocked ) return FALSE;
15+
if( $this->plan->isUnlimited() ||( $this->plan->isLimited() && $this->plan->aq_invocked ) ) return FALSE;
1616

1717
if( $this->plan->haveTimeLimit() )
1818
return $this->sessionTime - $this->plan->acctsessiontime;
@@ -21,7 +21,7 @@ public function getCountableTime()
2121

2222
public function getCountableData()
2323
{
24-
if( $this->plan->isUnlimited() || $this->plan->aq_invocked ) return FALSE;
24+
if( $this->plan->isUnlimited() || ( $this->plan->isLimited() && $this->plan->aq_invocked ) ) return FALSE;
2525

2626
if( $this->plan->haveDataLimit() )
2727
return $this->sessionData - ( $this->plan->acctinputoctets + $this->plan->acctoutputoctets );

0 commit comments

Comments
 (0)