2010-11-29 22:41:08 +00:00
|
|
|
<?php defined('SYSPATH') or die('No direct access allowed.');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This class supports ADSL Plans
|
|
|
|
*
|
2013-03-19 22:35:19 +00:00
|
|
|
* @package ADSL
|
2010-11-29 22:41:08 +00:00
|
|
|
* @category Models
|
|
|
|
* @author Deon George
|
2013-03-19 22:35:19 +00:00
|
|
|
* @copyright (c) 2009-2013 Open Source Billing
|
2010-11-29 22:41:08 +00:00
|
|
|
* @license http://dev.osbill.net/license.html
|
|
|
|
*/
|
2013-04-04 22:42:29 +00:00
|
|
|
class Model_ADSL_Plan extends ORM_OSB {
|
2010-11-29 22:41:08 +00:00
|
|
|
// Relationships
|
|
|
|
protected $_belongs_to = array(
|
2013-04-20 01:40:44 +00:00
|
|
|
'adsl_supplier_plan'=>array('model'=>'ADSL_Supplier_Plan'),
|
2010-11-29 22:41:08 +00:00
|
|
|
);
|
|
|
|
|
2011-09-28 06:46:22 +00:00
|
|
|
protected $_display_filters = array(
|
2010-11-29 22:41:08 +00:00
|
|
|
'extra_down_peak'=>array(
|
2011-09-28 06:46:22 +00:00
|
|
|
array('Tax::add',array(':value')),
|
|
|
|
array('Currency::display',array(':value')),
|
2010-11-29 22:41:08 +00:00
|
|
|
),
|
|
|
|
'extra_down_offpeak'=>array(
|
2011-09-28 06:46:22 +00:00
|
|
|
array('Tax::add',array(':value')),
|
|
|
|
array('Currency::display',array(':value')),
|
2010-11-29 22:41:08 +00:00
|
|
|
),
|
|
|
|
'extra_up_peak'=>array(
|
2011-09-28 06:46:22 +00:00
|
|
|
array('Tax::add',array(':value')),
|
|
|
|
array('Currency::display',array(':value')),
|
2010-11-29 22:41:08 +00:00
|
|
|
),
|
|
|
|
'extra_up_offpeak'=>array(
|
2011-09-28 06:46:22 +00:00
|
|
|
array('Tax::add',array(':value')),
|
|
|
|
array('Currency::display',array(':value')),
|
2010-11-29 22:41:08 +00:00
|
|
|
),
|
|
|
|
);
|
2013-06-01 13:43:31 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
2010-11-29 22:41:08 +00:00
|
|
|
}
|
|
|
|
?>
|