Misc fixes and new function service_change

This commit is contained in:
Deon George
2013-01-23 22:17:22 +11:00
parent 47fa9993be
commit 1b7aa6b1a7
8 changed files with 79 additions and 7 deletions

View File

@@ -27,6 +27,9 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
'service_connect_date'=>array(
array('Config::date',array(':value')),
),
'service_contract_date'=>array(
array('Config::date',array(':value')),
),
);
// Required abstract functions
@@ -76,11 +79,11 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
}
public function contract_date_start() {
return Config::date($this->service_connect_date);
return Config::date($this->service_contract_date);
}
public function contract_date_end() {
return Config::date(strtotime(sprintf('+%s months',$this->contract_term),$this->service_connect_date));
return Config::date(strtotime(sprintf('+%s months',$this->contract_term),$this->service_contract_date));
}
public function hasOffpeak() {