2013-10-10 02:44:53 +00:00
|
|
|
<?php defined('SYSPATH') or die('No direct access allowed.');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This class supports ADSL Plans
|
|
|
|
*
|
|
|
|
* @package ADSL
|
|
|
|
* @category Models
|
|
|
|
* @author Deon George
|
|
|
|
* @copyright (c) 2009-2013 Open Source Billing
|
|
|
|
* @license http://dev.osbill.net/license.html
|
|
|
|
*/
|
|
|
|
class Model_ADSL_Plan extends ORM_OSB {
|
|
|
|
// Relationships
|
|
|
|
protected $_belongs_to = array(
|
|
|
|
'adsl_supplier_plan'=>array('model'=>'ADSL_Supplier_Plan'),
|
|
|
|
);
|
|
|
|
|
|
|
|
protected $_display_filters = array(
|
|
|
|
'extra_down_peak'=>array(
|
|
|
|
array('Tax::add',array(':value')),
|
|
|
|
array('Currency::display',array(':value')),
|
|
|
|
),
|
|
|
|
'extra_down_offpeak'=>array(
|
|
|
|
array('Tax::add',array(':value')),
|
|
|
|
array('Currency::display',array(':value')),
|
|
|
|
),
|
|
|
|
'extra_up_peak'=>array(
|
|
|
|
array('Tax::add',array(':value')),
|
|
|
|
array('Currency::display',array(':value')),
|
|
|
|
),
|
|
|
|
'extra_up_offpeak'=>array(
|
|
|
|
array('Tax::add',array(':value')),
|
|
|
|
array('Currency::display',array(':value')),
|
|
|
|
),
|
|
|
|
);
|
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;
|
|
|
|
}
|
2013-10-10 02:44:53 +00:00
|
|
|
}
|
|
|
|
?>
|