Moved GB/MB configuration for ADSL into database

This commit is contained in:
Deon George
2013-11-18 15:18:50 +11:00
parent a711e70b60
commit 89deb9c97b
7 changed files with 49 additions and 23 deletions

View File

@@ -91,7 +91,7 @@ class Controller_Admin_Adsl extends Controller_Adsl {
if (isset($_POST['test'])) {
$charge = isset($_POST['test']['charge']) ? $_POST['test']['charge'] : FALSE;
$test_result = $apo->allowance($_POST['test'],FALSE,$charge,1000);
$test_result = $apo->allowance($_POST['test'],FALSE,$charge,TRUE);
}
}
@@ -125,7 +125,7 @@ class Controller_Admin_Adsl extends Controller_Adsl {
*/
public function action_stat() {
// @todo This needs to be configurable.
$traffic = array(1000,2000,5000,10000,25000,50000,75000,100000);
$traffic = array(1,2,5,10,25,50,75,100,150,200);
$svs = ORM::factory('Service')->list_bylistgroup('ADSL');
$stats = array();

View File

@@ -43,6 +43,7 @@ class Controller_Reseller_Service_Adsl extends Controller_Service {
public function action_list() {
$highchart = HighChart::factory('Combo');
$highchart->title(sprintf('Monthly DSL traffic usage as at %s',date('Y-m-d',strtotime('yesterday'))));
$highchart->xmetric('MB');
$c = 0;
foreach ($this->consoltraffic(time()) as $k => $details) {
@@ -69,9 +70,9 @@ class Controller_Reseller_Service_Adsl extends Controller_Service {
'name()'=>'Service',
'plugin()->ipaddress()'=>'IP Address',
'product->plugin()->supplier_plan->speed'=>'Speed',
'product->plugin()->allowance(array(),TRUE,TRUE,1000)'=>'Allowance',
'plugin()->traffic_month(strtotime("yesterday"),TRUE,1000)'=>'This Month',
'plugin()->traffic_month(strtotime("last month"),TRUE,1000)'=>'Last Month',
'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',
'recur_schedule'=>'Billing',
'price(TRUE,TRUE)'=>'Price',
'account->accnum()'=>'Cust ID',