This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/modules/service/classes/Model/Service/Change.php

49 lines
1.1 KiB
PHP
Raw Normal View History

2013-10-10 02:44:53 +00:00
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class supports Service Product Changes.
*
* @package Service
* @category Models
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Model_Service_Change extends ORM {
2013-10-10 02:44:53 +00:00
protected $_table_name = 'service_change';
// Relationships
protected $_belongs_to = array(
'product'=>array(),
'service'=>array(),
);
/**
* Filters used to format the display of values into friendlier values
*/
protected $_display_filters = array(
'date_ordered'=>array(
2014-08-25 04:41:07 +00:00
array('Site::Date',array(':value')),
2013-10-10 02:44:53 +00:00
),
'date_effective'=>array(
2014-08-25 04:41:07 +00:00
array('Site::Date',array(':value')),
2013-10-10 02:44:53 +00:00
),
);
public function list_details() {
if ($this->_db_pending) {
$output = array();
foreach ($this->find_all() as $sco) {
array_push($output,sprintf('%s %s',$sco->product->name($sco->service->account->language),$sco->display('date_effective')));
2013-10-10 02:44:53 +00:00
}
} else {
throw new Kohana_Exception('Shouldnt be here!');
}
return join('|',$output);
}
}
?>