Work on HTML invoice and internal logic

This commit is contained in:
Deon George
2012-01-09 12:35:24 +11:00
parent a464d73f9a
commit f0c1f8800e
12 changed files with 431 additions and 115 deletions

View File

@@ -20,6 +20,7 @@ class Model_Service extends ORMOSB {
'service_billing'=>array('far_key'=>'account_billing_id','foreign_key'=>'id'),
);
protected $_has_many = array(
'invoice_item'=>array('far_key'=>'id'),
'invoice'=>array('through'=>'invoice_item'),
);
protected $_belongs_to = array(
@@ -118,6 +119,10 @@ class Model_Service extends ORMOSB {
return $plugin->admin_update();
}
public function transactions() {
return $this->invoice_item->order_by('date_start,date_stop')->find_all();
}
/** LIST FUNCTIONS **/
private function _list_active() {