Work on invoices, products and other minor things
This commit is contained in:
@@ -42,33 +42,6 @@ class Model_Service extends ORMOSB {
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
* The service_name should be implemented in child objects.
|
||||
* It renders the name of the service, typically used on invoice
|
||||
*/
|
||||
protected function _service_name() {
|
||||
throw new Kohana_Exception(':method not defined in child class :class',array(':method'=>__METHOD__,':class'=>get_class($this)));
|
||||
}
|
||||
|
||||
/**
|
||||
* The service_view should be implemented in child objects.
|
||||
* It renders the details of the ordered service
|
||||
*/
|
||||
protected function _service_view() {
|
||||
throw new Kohana_Exception(':method not defined in child class :class',array(':method'=>__METHOD__,':class'=>get_class($this)));
|
||||
}
|
||||
|
||||
/**
|
||||
* The _details should be implemented in child objects.
|
||||
*/
|
||||
protected function _details($type) {
|
||||
throw new Kohana_Exception(':method not defined in child class :class',array(':method'=>__METHOD__,':class'=>get_class($this)));
|
||||
}
|
||||
|
||||
protected function _admin_update() {
|
||||
throw new Kohana_Exception(':method not defined in child class :class',array(':method'=>__METHOD__,':class'=>get_class($this)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the object of the product plugin
|
||||
*/
|
||||
@@ -143,6 +116,8 @@ class Model_Service extends ORMOSB {
|
||||
return $this->price * .1;
|
||||
}
|
||||
|
||||
/** LIST FUNCTIONS **/
|
||||
|
||||
public function list_active() {
|
||||
return $this->where('active','=','1')->find_all();
|
||||
}
|
||||
@@ -171,7 +146,7 @@ class Model_Service extends ORMOSB {
|
||||
$result = array();
|
||||
|
||||
foreach ($this->list_active() as $so)
|
||||
// @todo This should be configurable
|
||||
// @todo This should be configurable (days)
|
||||
if (! $so->suspend_billing AND $so->date_next_invoice < time()+35*86400)
|
||||
array_push($result,$so);
|
||||
|
||||
|
Reference in New Issue
Block a user