Fixed ADSL traffic collection, and migrated Task to Minion

This commit is contained in:
Deon George
2013-06-01 23:43:31 +10:00
parent 86afba378c
commit 2ac7389223
10 changed files with 115 additions and 126 deletions

View File

@@ -11,7 +11,6 @@
*/
class Model_ADSL_Plan extends ORM_OSB {
// Relationships
// @todo This model should probably be joined with product_plugin_adsl
protected $_belongs_to = array(
'adsl_supplier_plan'=>array('model'=>'ADSL_Supplier_Plan'),
);
@@ -34,5 +33,16 @@ class Model_ADSL_Plan extends ORM_OSB {
array('Currency::display',array(':value')),
),
);
public function products($active) {
$x = ORM::factory('Product')
->where('prod_plugin_file','=','ADSL')
->and_where('prod_plugin_data','=',$this);
if ($active)
$x->where_active();
return $x;
}
}
?>