Standardisation work, changed accnum() to refnum()
This commit is contained in:
@@ -15,9 +15,6 @@ class Model_Charge extends ORM_OSB implements Invoicable {
|
||||
'product'=>array(),
|
||||
'service'=>array(),
|
||||
);
|
||||
protected $_has_one = array(
|
||||
'invoice_item'=>array('far_key'=>'id'),
|
||||
);
|
||||
|
||||
protected $_compress_column = array(
|
||||
'attributes',
|
||||
@@ -82,6 +79,20 @@ class Model_Charge extends ORM_OSB implements Invoicable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Invoice Item object for this charge
|
||||
*/
|
||||
public function iio() {
|
||||
$iio = ORM::factory('Invoice_Item');
|
||||
if ($this->processed) {
|
||||
$iio->where('module_id','=',$this->mid())
|
||||
->where('module_ref','=',$this->id)
|
||||
->find();
|
||||
}
|
||||
|
||||
return $iio;
|
||||
}
|
||||
|
||||
public function invoice_item($item_type) {
|
||||
switch ($item_type) {
|
||||
case 5:
|
||||
|
Reference in New Issue
Block a user