Replace status with active in tables
This commit is contained in:
@@ -48,6 +48,9 @@ class Model_Service extends ORM {
|
||||
* Filters used to format the display of values into friendlier values
|
||||
*/
|
||||
protected $_display_filters = array(
|
||||
'active'=>array(
|
||||
array('StaticList_YesNo::get',array(':value',TRUE)),
|
||||
),
|
||||
'date_start'=>array(
|
||||
array('Site::Date',array(':value')),
|
||||
),
|
||||
@@ -72,9 +75,6 @@ class Model_Service extends ORM {
|
||||
'suspend_billing'=>array(
|
||||
array('StaticList_YesNo::get',array(':value',TRUE)),
|
||||
),
|
||||
'status'=>array(
|
||||
array('StaticList_YesNo::get',array(':value',TRUE)),
|
||||
),
|
||||
);
|
||||
|
||||
protected $_nullifempty = array(
|
||||
@@ -128,7 +128,7 @@ class Model_Service extends ORM {
|
||||
->or_where('processed','=',FALSE)
|
||||
->where_close();
|
||||
|
||||
return $x->and_where('void','IS',NULL)->find_all();
|
||||
return $x->where_active()->find_all();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -209,10 +209,10 @@ class Model_Service extends ORM {
|
||||
return ORM::factory('Invoice_Item')
|
||||
->where('item_type','IN',array(0,7))
|
||||
->where('service_id','=',$this)
|
||||
->where('invoice_item.void','IS',NULL)
|
||||
->where('invoice_item.active','=',1)
|
||||
->join('invoice')
|
||||
->on('invoice.id','=','invoice_item.invoice_id')
|
||||
->on('invoice.status','=',1)
|
||||
->on('invoice.active','=',1)
|
||||
->order_by('date_stop','DESC');
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ class Model_Service extends ORM {
|
||||
->join('product')
|
||||
->on($this->table_name().'.product_id','=','product.id')
|
||||
->where('prod_plugin_file','=',$plugin)
|
||||
->and_where('service.status','=',TRUE)
|
||||
->and_where('service.active','=',TRUE)
|
||||
->find_all();
|
||||
}
|
||||
|
||||
@@ -391,7 +391,7 @@ class Model_Service extends ORM {
|
||||
* @param $days int Additional number of days to add to the query, above the module config.
|
||||
*/
|
||||
public function list_invoicesoon($days=0) {
|
||||
return $this->_where_active()
|
||||
return $this->where_active()
|
||||
->where_open()
|
||||
->where('suspend_billing','IS',NULL)
|
||||
->or_where('suspend_billing','=','0')
|
||||
|
@@ -42,7 +42,7 @@ abstract class Model_Service_Plugin extends ORM {
|
||||
*/
|
||||
protected function manage() {
|
||||
// Dont show the manage button for expired or inactive services
|
||||
if (! $this->service->status OR $this->service->expiring())
|
||||
if (! $this->service->active OR $this->service->expiring())
|
||||
return FALSE;
|
||||
|
||||
static $x = '';
|
||||
|
Reference in New Issue
Block a user