Added Invoice/SSL download recording, other misc fixes

This commit is contained in:
Deon George
2013-10-11 13:08:50 +11:00
parent 6f855fb32d
commit 6e95184b0c
15 changed files with 137 additions and 12 deletions

View File

@@ -22,6 +22,7 @@ class Model_Service extends ORM_OSB {
'invoice_item'=>array('far_key'=>'id'),
'invoice'=>array('through'=>'invoice_item'),
'service_change'=>array('far_key'=>'id'),
'service_memo'=>array('far_key'=>'id'),
);
protected $_belongs_to = array(
'product'=>array(),
@@ -292,8 +293,8 @@ class Model_Service extends ORM_OSB {
public function list_byplugin($plugin) {
return $this
->join('product')
->on($this->table_name().'.site_id','=','product.site_id') // @todo This should be automatic
->on($this->table_name().'.product_id','=','product.id')
->on($this->table_name().'.site_id','=','product.site_id') // @todo This should be automatic
->on($this->table_name().'.product_id','=','product.id')
->where('prod_plugin_file','=',$plugin)
->and_where('service.status','=',TRUE)
->find_all();