Improvements to invoice display and other misc items
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
* Column Definitions:
|
||||
* + price_type: 0=One Time, 1=Recurring, 2=Trial
|
||||
*/
|
||||
class Model_Product extends ORM_OSB {
|
||||
class Model_Product extends ORM_OSB implements Invoicable {
|
||||
protected $_has_many = array(
|
||||
'invoice'=>array('through'=>'invoice_item'),
|
||||
'service'=>array('far_key'=>'id'),
|
||||
@@ -48,6 +48,24 @@ class Model_Product extends ORM_OSB {
|
||||
|
||||
protected $_save_message = TRUE;
|
||||
|
||||
// Our required Interface Methods
|
||||
|
||||
public function invoice_item($item_type) {
|
||||
switch ($item_type) {
|
||||
case 0:
|
||||
case 7:
|
||||
return 'Service';
|
||||
default:
|
||||
return 'Product Charge';
|
||||
}
|
||||
}
|
||||
|
||||
public function invoice_title() {
|
||||
return $this->title();
|
||||
}
|
||||
|
||||
// Our local methods
|
||||
|
||||
// Our database index for pricing values
|
||||
private $_price_options = array(
|
||||
'base'=>'price_base',
|
||||
|
Reference in New Issue
Block a user