Improved service display
This commit is contained in:
@@ -28,22 +28,6 @@ class ADSL {
|
||||
return new ADSL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional information used by product_view
|
||||
*/
|
||||
public function product_view($data) {
|
||||
// @todo - this test shouldnt be required
|
||||
if (preg_match('/^a:/',$data))
|
||||
throw new Kohana_Exception('Data shouldnt be a serialized array');
|
||||
|
||||
$ao = ORM::factory('adsl_plan',$data);
|
||||
|
||||
$output = View::factory('adsl/product_view')
|
||||
->set('record',$ao);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
public function contract_view($data,$price_base,$price_setup) {
|
||||
// @todo - this test shouldnt be required
|
||||
if (preg_match('/^a:/',$data))
|
||||
|
@@ -37,23 +37,5 @@ class Model_ADSL_Plan extends ORMOSB {
|
||||
'Currency::display'=>array(),
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
* Show the ADSL allowance as a peak/offpeak metric
|
||||
*/
|
||||
public function allowance($string=TRUE) {
|
||||
$output = ADSL::allowance(array(
|
||||
'base_down_peak'=>$this->base_down_peak,
|
||||
'base_down_offpeak'=>$this->base_down_offpeak,
|
||||
'base_up_peak'=>$this->base_up_peak,
|
||||
'base_up_offpeak'=>$this->base_up_offpeak,
|
||||
'extra_down_peak'=>$this->extra_down_peak,
|
||||
'extra_down_offpeak'=>$this->extra_down_offpeak,
|
||||
'extra_up_peak'=>$this->extra_up_peak,
|
||||
'extra_up_offpeak'=>$this->extra_up_offpeak,
|
||||
));
|
||||
|
||||
return $string ? implode('/',$output) : $output;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user