Fixed charge display and updates
This commit is contained in:
parent
21d204f605
commit
3d3c38b0a0
@ -22,7 +22,7 @@ class Controller_Reseller_Charge extends Controller_Charge {
|
|||||||
Block::factory()
|
Block::factory()
|
||||||
->type('form-horizontal')
|
->type('form-horizontal')
|
||||||
->title('Add/View Charge')
|
->title('Add/View Charge')
|
||||||
->title_icon('icon-wrench')
|
->title_icon('fa fa-wrench')
|
||||||
->body($this->add_edit());
|
->body($this->add_edit());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,11 +59,11 @@ class Controller_Reseller_Charge extends Controller_Charge {
|
|||||||
|
|
||||||
Script::factory()
|
Script::factory()
|
||||||
->type('file')
|
->type('file')
|
||||||
->data('media/theme/bootstrap/vendor/datepicker/js/bootstrap-datepicker.js');
|
->data('media/theme/bootstrap/js/bootstrap.datepicker.js');
|
||||||
|
|
||||||
Style::factory()
|
Style::factory()
|
||||||
->type('file')
|
->type('file')
|
||||||
->data('media/theme/bootstrap/vendor/datepicker/css/datepicker.css');
|
->data('media/theme/bootstrap/css/bootstrap.datepicker.css');
|
||||||
|
|
||||||
Script::factory()
|
Script::factory()
|
||||||
->type('stdin')
|
->type('stdin')
|
||||||
@ -72,6 +72,7 @@ $(document).ready(function() {
|
|||||||
$("#date_charge_label").datepicker({
|
$("#date_charge_label").datepicker({
|
||||||
autoclose : true,
|
autoclose : true,
|
||||||
endDate : new Date(),
|
endDate : new Date(),
|
||||||
|
todayHighlight: true,
|
||||||
format : "dd-M-yyyy",
|
format : "dd-M-yyyy",
|
||||||
todayBtn : true,
|
todayBtn : true,
|
||||||
}).on("hide",function(ev) {
|
}).on("hide",function(ev) {
|
||||||
@ -126,7 +127,7 @@ $(document).ready(function() {
|
|||||||
Block::factory()
|
Block::factory()
|
||||||
->type('form-horizontal')
|
->type('form-horizontal')
|
||||||
->title(sprintf('%s: %s',_('View Charges'),$id))
|
->title(sprintf('%s: %s',_('View Charges'),$id))
|
||||||
->title_icon('icon-wrench')
|
->title_icon('fa fa-wrench')
|
||||||
->body($this->add_edit($id,$output));
|
->body($this->add_edit($id,$output));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +137,7 @@ $(document).ready(function() {
|
|||||||
public function action_list() {
|
public function action_list() {
|
||||||
Block::factory()
|
Block::factory()
|
||||||
->title('Customer Charges')
|
->title('Customer Charges')
|
||||||
->title_icon('icon-th-list')
|
->title_icon('fa fa-list')
|
||||||
->body(Table::factory()
|
->body(Table::factory()
|
||||||
->page_items(50)
|
->page_items(50)
|
||||||
->data(ORM::factory('Charge')->where_authorised($this->ao)->where('void','is',NULL)->order_by('id','DESC')->find_all())
|
->data(ORM::factory('Charge')->where_authorised($this->ao)->where('void','is',NULL)->order_by('id','DESC')->find_all())
|
||||||
|
@ -1,33 +1,39 @@
|
|||||||
<div class="span11">
|
<div class="col-md-11">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Charge Details</legend>
|
<legend>Charge Details</legend>
|
||||||
|
|
||||||
<div class="input-append date" id="date_charge_label">
|
<label for="date_charge_label">Date Charge</label>
|
||||||
<?php echo Form::input('date_charge_label',$o->display('date_charge'),array('class'=>'span2','label'=>'Date of Charge','add-on'=>'<i class="icon-calendar"></i>','disabled')); ?>
|
<div class="input-group col-md-3">
|
||||||
|
<input type="text" id="date_charge_label" value="<?php echo $o->display('date_charge'); ?>" class="form-control" placeholder="Date Charge">
|
||||||
|
<span class="input-group-addon" id="basic-addon1"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php echo Form::hidden('date_charge',$o->date_charge); ?>
|
<?php echo Form::hidden('date_charge',$o->date_charge); ?>
|
||||||
<?php echo Form::input('account_id_label',$o->account->name(),array('class'=>'span5','label'=>'Account','placeholder'=>'Account','data-provide'=>'typeahead','required')); ?>
|
|
||||||
|
<?php echo Form::input('account_id_label',$o->account->name(),array('label'=>'Account','placeholder'=>'Account','data-provide'=>'typeahead')); ?>
|
||||||
<?php echo Form::hidden('account_id',$o->account_id); ?>
|
<?php echo Form::hidden('account_id',$o->account_id); ?>
|
||||||
<?php echo Form::select('service_id',$o->account_id ? $o->account->service->list_select() : array(),$o->service_id,array('class'=>'span5','label'=>'Service')); ?>
|
|
||||||
|
<?php echo Form::select('service_id',$o->account_id ? $o->account->service->list_select() : array(),$o->service_id,array('label'=>'Service')); ?>
|
||||||
|
|
||||||
<?php echo StaticList_SweepType::form('sweep_type',is_null($o->sweep_type) ? 6 : $o->sweep_type,FALSE,array('label'=>'Sweep')); ?>
|
<?php echo StaticList_SweepType::form('sweep_type',is_null($o->sweep_type) ? 6 : $o->sweep_type,FALSE,array('label'=>'Sweep')); ?>
|
||||||
<?php echo StaticList_ItemType::form('type',is_null($o->type) ? 6 : $o->type,FALSE,array('label'=>'Item Type')); ?>
|
<?php echo StaticList_ItemType::form('type',is_null($o->type) ? 6 : $o->type,FALSE,array('label'=>'Item Type')); ?>
|
||||||
|
|
||||||
<?php echo Form::input('quantity',$o->quantity,array('class'=>'span1','label'=>'Quantity','placeholder'=>'Quantity')); ?>
|
<?php echo Form::input('quantity',$o->quantity,array('label'=>'Quantity','placeholder'=>'Quantity')); ?>
|
||||||
<?php echo Form::input('amount',$o->amount,array('class'=>'span1','label'=>'Amount','placeholder'=>'Total',)); ?>
|
<?php echo Form::input('amount',$o->amount,array('label'=>'Amount','placeholder'=>'Total',)); ?>
|
||||||
<?php echo StaticList_YesNo::form('taxable',is_null($o->taxable) ? TRUE : $o->taxable,FALSE,array('label'=>'Taxable','class'=>'span1')); ?>
|
<?php echo StaticList_YesNo::form('taxable',is_null($o->taxable) ? TRUE : $o->taxable,FALSE,array('label'=>'Taxable')); ?>
|
||||||
<?php echo Form::input('description',$o->description,array('class'=>'span5','label'=>'Description','placeholder'=>'Any notes about this charge?')); ?>
|
<?php echo Form::input('description',$o->description,array('label'=>'Description','placeholder'=>'Any notes about this charge?')); ?>
|
||||||
|
|
||||||
<!-- @todo Use JS to dynamically add more lines as required -->
|
<!-- @todo Use JS to dynamically add more lines as required -->
|
||||||
<?php for ($i=0;$i<10;$i++) :
|
<?php $i=0; foreach ($o->attributes as $key => $value) :
|
||||||
echo Form::input("attributes[$i]",isset($o->attributes[$i]) ? $o->attributes[$i] : "",array('class'=>'span5','label'=>'Attributes'));
|
echo Form::input("attributes[$key]",$value,array('label'=>$key));
|
||||||
|
$i++;
|
||||||
|
endforeach ?>
|
||||||
|
<?php for ($i=$i;$i<10;$i++) :
|
||||||
|
echo Form::input("attributes[$i]",isset($o->attributes[$i]) ? $o->attributes[$i] : '',array('label'=>'Attributes'));
|
||||||
endfor ?>
|
endfor ?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="offset2">
|
|
||||||
<button type="submit" class="btn btn-primary">Save changes</button>
|
<button type="submit" class="btn btn-primary">Save changes</button>
|
||||||
<button type="button" class="btn">Cancel</button>
|
<button type="button" class="btn">Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> <!-- /col-md-11 -->
|
||||||
</div> <!-- /span -->
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 4bd8d1ffae3d89ee85de63e1a80a3d7aeb7b0fa5
|
Subproject commit 9e3874819ef6d7382131da579775f6e13f6abac5
|
Reference in New Issue
Block a user