Revamping invoice PDF rendering and standardisation work
This commit is contained in:
@@ -34,17 +34,20 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
|
||||
|
||||
protected $_save_message = TRUE;
|
||||
|
||||
// Required abstract functions
|
||||
/** REQUIRED ABSTRACT METHODS **/
|
||||
|
||||
public function attributes($variable=NULL) {
|
||||
return array(
|
||||
'Service Address'=>$this->service_address ? $this->display('service_address') : 'UNKNOWN',
|
||||
'Contract Until'=>$this->contract_date_end(TRUE),
|
||||
);
|
||||
}
|
||||
|
||||
public function expire() {
|
||||
// We'll leave it to the Service record to determine when this service expires
|
||||
return NULL;
|
||||
}
|
||||
|
||||
public function name($variable=NULL) {
|
||||
return $this->service_number;
|
||||
}
|
||||
|
||||
public function password() {
|
||||
return $this->service_password;
|
||||
}
|
||||
@@ -53,7 +56,7 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
|
||||
return $this->service_username;
|
||||
}
|
||||
|
||||
// Local functions
|
||||
/** LOCAL METHODS **/
|
||||
|
||||
/**
|
||||
* If we override the plan that the customers gets (from what the supplier provides).
|
||||
@@ -200,6 +203,14 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
|
||||
return $this->ipaddress ? $this->ipaddress : _('Dynamic');
|
||||
}
|
||||
|
||||
public function name($variable=NULL) {
|
||||
return $this->service_number;
|
||||
}
|
||||
|
||||
public function namesub($variable=NULL) {
|
||||
return $this->display('service_address');
|
||||
}
|
||||
|
||||
/**
|
||||
* If we override the plan that the customers gets (from what the supplier provides).
|
||||
* @todo This needs to get the plan that was invoiced, not the current plan..
|
||||
@@ -453,25 +464,5 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
|
||||
|
||||
return parent::list_autocomplete($term,$index,$value,$label,$limit,$options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get specific service details for use in other modules
|
||||
* For Example: Invoice
|
||||
*
|
||||
* @todo Make the rendered items configurable
|
||||
* @todo Change this method name, now that it is public
|
||||
*/
|
||||
public function _details($type) {
|
||||
switch ($type) {
|
||||
case 'invoice_detail_items':
|
||||
return array(
|
||||
_('Service Address')=>$this->service_address ? $this->display('service_address') : '>NotSet<',
|
||||
_('Contract Until')=>$this->contract_date_end(TRUE),
|
||||
);
|
||||
break;
|
||||
default:
|
||||
return parent::$_details($type);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user