More Standardisation work.

This commit is contained in:
Deon George
2016-08-03 14:00:51 +10:00
parent 85f08bbb0a
commit 5f84d2c14f
38 changed files with 276 additions and 100 deletions

View File

@@ -87,7 +87,7 @@ class Model_ADSL_Supplier_Plan extends ORM_OSB {
/**
* ADSL Plan Name
*/
public function name() {
public function name($variable=NULL) {
return sprintf('%s: %s',$this->product_id,$this->product_desc);
}

View File

@@ -41,7 +41,7 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
return NULL;
}
public function name() {
public function name($variable=NULL) {
return $this->service_number;
}
@@ -435,7 +435,7 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
/**
* Search for services matching a term
*/
public function list_autocomplete($term,$index,$value,array $label,array $limit=array(),array $options=NULL) {
public function list_autocomplete($term,$index,$value,array $label,array $limit=array(),array $options=array()) {
$ao = Auth::instance()->get_user();
$options['key'] = 'id';
@@ -444,6 +444,7 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
->join('service')
->on('service.id','=',$this->_table_name.'.service_id')
->where('service.account_id','IN',$ao->RTM->customers($ao->RTM))
->and_where('service.status','=',1)
->where_open()
->and_where($this->_table_name.'.service_number','like','%'.$term.'%')
->or_where($this->_table_name.'.service_address','like','%'.$term.'%')

View File

@@ -21,7 +21,7 @@ class Task_Adsl_Trafficalert extends Minion_Task {
// @todo Pick up services that are no longer active, but were inactive < 30 days ago.
foreach (ORM::factory('Service')->list_byplugin('ADSL') as $so) {
if (Minion_CLI::options('verbose'))
echo $so->service_name()."\n";
echo $so->name()."\n";
if (! $data=$so->plugin()->traffic_report())
continue;

View File

@@ -21,7 +21,7 @@ class Task_Adsl_Trafficcharge extends Minion_Task {
// @todo Pick up services that are no longer active, but were inactive < 30 days ago.
foreach (ORM::factory('Service')->list_byplugin('ADSL') as $so) {
if (Minion_CLI::options('verbose'))
echo $so->service_name()."\n";
echo $so->name()."\n";
if ($x=$so->plugin()->traffic_excess($date)) {
$po = $so->plugin()->plan();