Updated charge, Invoice improvements and other minor fixes

This commit is contained in:
Deon George
2013-09-06 15:39:56 +10:00
parent 2322a802de
commit ab3735914b
52 changed files with 748 additions and 560 deletions

View File

@@ -11,7 +11,6 @@
*/
class Controller_Admin_Service extends Controller_Service {
protected $secure_actions = array(
'ajaxlist'=>TRUE,
'ajaxjson_traffic'=>TRUE,
'adslstat'=>TRUE,
'listadslbilling'=>TRUE,
@@ -25,22 +24,6 @@ class Controller_Admin_Service extends Controller_Service {
'view'=>TRUE,
);
public function action_ajaxlist() {
$result = array();
$result += ORM::factory('Service')->list_autocomplete(
isset($_REQUEST['term']) ? $_REQUEST['term'] : '',
'id',
'id',
array('SVC %s: %s'=>array('id','service_name(TRUE)')),
isset($_REQUEST['aid']) ? array(array('account_id','=',$_REQUEST['aid'])) : array()
);
$this->auto_render = FALSE;
$this->response->headers('Content-Type','application/json');
$this->response->body(json_encode(array_values($result)));
}
public function action_ajaxjson_traffic() {
$result = array();
$svs = ORM::factory('Service')->list_bylistgroup('ADSL');
@@ -54,7 +37,6 @@ class Controller_Admin_Service extends Controller_Service {
$google->sdata(array('yr'=>'services'),array('services'=>$data['svs']));
$this->auto_render = FALSE;
$this->response->headers('Content-Type','application/json');
$this->response->body($google->json());
}
@@ -538,7 +520,7 @@ class Controller_Admin_Service extends Controller_Service {
if (is_null($bt))
$bt = $iio->date_start;
$pdata = Period::details($iio->recurring_schedule,$a ? NULL : $iio->product->price_recurr_weekday,$bt,TRUE);
$pdata = Period::details($iio->recurring_schedule,$a ? NULL : $iio->product->price_recurr_weekday,$bt,TRUE,TRUE);
switch ($iio->recurring_schedule) {
case 1: