From 3d3c38b0a0a84b2569579040b22f20adf7e42af3 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 25 Jul 2016 15:47:18 +1000 Subject: [PATCH] Fixed charge display and updates --- .../classes/Controller/Reseller/Charge.php | 11 ++--- .../charge/views/charge/reseller/add_edit.php | 40 +++++++++++-------- modules/highchart | 2 +- 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/modules/charge/classes/Controller/Reseller/Charge.php b/modules/charge/classes/Controller/Reseller/Charge.php index 30938148..c98a461b 100644 --- a/modules/charge/classes/Controller/Reseller/Charge.php +++ b/modules/charge/classes/Controller/Reseller/Charge.php @@ -22,7 +22,7 @@ class Controller_Reseller_Charge extends Controller_Charge { Block::factory() ->type('form-horizontal') ->title('Add/View Charge') - ->title_icon('icon-wrench') + ->title_icon('fa fa-wrench') ->body($this->add_edit()); } @@ -59,11 +59,11 @@ class Controller_Reseller_Charge extends Controller_Charge { Script::factory() ->type('file') - ->data('media/theme/bootstrap/vendor/datepicker/js/bootstrap-datepicker.js'); + ->data('media/theme/bootstrap/js/bootstrap.datepicker.js'); Style::factory() ->type('file') - ->data('media/theme/bootstrap/vendor/datepicker/css/datepicker.css'); + ->data('media/theme/bootstrap/css/bootstrap.datepicker.css'); Script::factory() ->type('stdin') @@ -72,6 +72,7 @@ $(document).ready(function() { $("#date_charge_label").datepicker({ autoclose : true, endDate : new Date(), + todayHighlight: true, format : "dd-M-yyyy", todayBtn : true, }).on("hide",function(ev) { @@ -126,7 +127,7 @@ $(document).ready(function() { Block::factory() ->type('form-horizontal') ->title(sprintf('%s: %s',_('View Charges'),$id)) - ->title_icon('icon-wrench') + ->title_icon('fa fa-wrench') ->body($this->add_edit($id,$output)); } @@ -136,7 +137,7 @@ $(document).ready(function() { public function action_list() { Block::factory() ->title('Customer Charges') - ->title_icon('icon-th-list') + ->title_icon('fa fa-list') ->body(Table::factory() ->page_items(50) ->data(ORM::factory('Charge')->where_authorised($this->ao)->where('void','is',NULL)->order_by('id','DESC')->find_all()) diff --git a/modules/charge/views/charge/reseller/add_edit.php b/modules/charge/views/charge/reseller/add_edit.php index 0a5a7a19..6382299d 100644 --- a/modules/charge/views/charge/reseller/add_edit.php +++ b/modules/charge/views/charge/reseller/add_edit.php @@ -1,33 +1,39 @@ -
+
Charge Details -
- display('date_charge'),array('class'=>'span2','label'=>'Date of Charge','add-on'=>'','disabled')); ?> + +
+ +
- date_charge); ?> - account->name(),array('class'=>'span5','label'=>'Account','placeholder'=>'Account','data-provide'=>'typeahead','required')); ?> + + account->name(),array('label'=>'Account','placeholder'=>'Account','data-provide'=>'typeahead')); ?> account_id); ?> - account_id ? $o->account->service->list_select() : array(),$o->service_id,array('class'=>'span5','label'=>'Service')); ?> + + account_id ? $o->account->service->list_select() : array(),$o->service_id,array('label'=>'Service')); ?> + sweep_type) ? 6 : $o->sweep_type,FALSE,array('label'=>'Sweep')); ?> type) ? 6 : $o->type,FALSE,array('label'=>'Item Type')); ?> - quantity,array('class'=>'span1','label'=>'Quantity','placeholder'=>'Quantity')); ?> - amount,array('class'=>'span1','label'=>'Amount','placeholder'=>'Total',)); ?> - taxable) ? TRUE : $o->taxable,FALSE,array('label'=>'Taxable','class'=>'span1')); ?> - description,array('class'=>'span5','label'=>'Description','placeholder'=>'Any notes about this charge?')); ?> + quantity,array('label'=>'Quantity','placeholder'=>'Quantity')); ?> + amount,array('label'=>'Amount','placeholder'=>'Total',)); ?> + taxable) ? TRUE : $o->taxable,FALSE,array('label'=>'Taxable')); ?> + description,array('label'=>'Description','placeholder'=>'Any notes about this charge?')); ?> - attributes[$i]) ? $o->attributes[$i] : "",array('class'=>'span5','label'=>'Attributes')); + attributes as $key => $value) : + echo Form::input("attributes[$key]",$value,array('label'=>$key)); + $i++; + endforeach ?> + attributes[$i]) ? $o->attributes[$i] : '',array('label'=>'Attributes')); endfor ?>
-
- - -
+ +
-
+
diff --git a/modules/highchart b/modules/highchart index 4bd8d1ff..9e387481 160000 --- a/modules/highchart +++ b/modules/highchart @@ -1 +1 @@ -Subproject commit 4bd8d1ffae3d89ee85de63e1a80a3d7aeb7b0fa5 +Subproject commit 9e3874819ef6d7382131da579775f6e13f6abac5