Misc fixes for ADSL excess traffic and strtotime() functions for last month

This commit is contained in:
Deon George
2013-12-31 17:18:49 +11:00
parent e19518c505
commit 82c51de550
11 changed files with 27 additions and 15 deletions

View File

@@ -124,7 +124,7 @@ class Controller_Admin_Adsl extends Controller_Adsl {
$a = 0;
foreach (array_reverse($traffic) as $i) {
if ($i < $so->plugin()->traffic_month(strtotime('last month'),TRUE))
if ($i < $so->plugin()->traffic_month(strtotime('first day of last month'),TRUE))
break;
$a = $i;

View File

@@ -72,7 +72,7 @@ class Controller_Reseller_Service_Adsl extends Controller_Service {
'product->plugin()->supplier_plan->speed'=>'Speed',
'product->plugin()->allowance(array(),TRUE,TRUE,TRUE)'=>'Allowance',
'plugin()->traffic_month(strtotime("yesterday"),TRUE,TRUE)'=>'This Month',
'plugin()->traffic_month(strtotime("last month"),TRUE,TRUE)'=>'Last Month',
'plugin()->traffic_month(strtotime("first day of last month"),TRUE,TRUE)'=>'Last Month',
'recur_schedule'=>'Billing',
'price(TRUE,TRUE)'=>'Price',
'account->accnum()'=>'Cust ID',