Added Revenue information

This commit is contained in:
Deon George
2013-10-29 10:36:57 +11:00
parent 1407da5e01
commit 28ea1ac613
14 changed files with 150 additions and 9 deletions

View File

@@ -51,6 +51,10 @@ class Model_Product extends ORM_OSB {
return $this->avail_category;
}
public function cost($annual=FALSE) {
return $this->plugin() ? $this->plugin()->cost($annual) : 0;
}
/**
* Return the translated description for a category.
*/
@@ -134,6 +138,10 @@ class Model_Product extends ORM_OSB {
return $active ? $this->service->where_active() : $this->service;
}
public function supplier() {
return $this->plugin() ? $this->plugin()->supplier() : 'other';
}
private function translate() {
return $this->product_translate->where('language_id','=',Config::language())->find();
}

View File

@@ -19,10 +19,17 @@ abstract class Model_Product_Plugin extends ORM_OSB {
*/
abstract public function admin_update();
/**
* The cost of this service
*/
abstract public function cost($annual=FALSE);
/**
* The feature summary should be implemented in plugins.
* It is displayed on the product overview page, as a summary of the products features.
*/
abstract public function feature_summary();
abstract public function supplier();
}
?>