Merge branch '150-jo-bug-fixing' into 'master'
Resolve "JO bug fixing" Closes #150 See merge request jankstudio/resq!151
This commit is contained in:
commit
128dd352d9
2 changed files with 10 additions and 4 deletions
|
|
@ -276,7 +276,8 @@ class JobOrderController extends BaseController
|
||||||
|
|
||||||
// did they change invoice?
|
// did they change invoice?
|
||||||
$invoice_items = $req->request->get('invoice_items');
|
$invoice_items = $req->request->get('invoice_items');
|
||||||
if (!empty($invoice_items))
|
$invoice_change = $req->request->get('invoice_change', 0);
|
||||||
|
if ($invoice_change)
|
||||||
{
|
{
|
||||||
// instantiate invoice criteria
|
// instantiate invoice criteria
|
||||||
$criteria = new InvoiceCriteria();
|
$criteria = new InvoiceCriteria();
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form id="row-form" class="m-form m-form--fit m-form--label-align-right" method="post" action="{{ submit_url }}">
|
<form id="row-form" class="m-form m-form--fit m-form--label-align-right" method="post" action="{{ submit_url }}">
|
||||||
|
<input type="hidden" id="invoice-change" name="invoice_change" value="0">
|
||||||
<div class="m-portlet__body">
|
<div class="m-portlet__body">
|
||||||
|
|
||||||
{% if ftags.vehicle_dropdown %}
|
{% if ftags.vehicle_dropdown %}
|
||||||
|
|
@ -72,8 +73,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% elseif cvid|default(false) %}
|
{% else %}
|
||||||
<input type="hidden" name="customer_vehicle" value="{{ cvid }}">
|
<input type="hidden" id="customer-vehicle" name="customer_vehicle" value="{{ obj.getCustomerVehicle.getID|default('0') }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if obj.getReferenceJO %}
|
{% if obj.getReferenceJO %}
|
||||||
<div class="m-form__section m-form__section--first">
|
<div class="m-form__section m-form__section--first">
|
||||||
|
|
@ -383,7 +384,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-form__seperator m-form__seperator--dashed"></div>
|
<div class="m-form__seperator m-form__seperator--dashed"></div>
|
||||||
<div class="m-form__section{{ ftags.invoice_edit ? ' m-form__section--last' }}">
|
<div class="m-form__section{{ ftags.invoice_edit ? ' m-form__section--last' }}">>
|
||||||
<div class="m-form__heading">
|
<div class="m-form__heading">
|
||||||
<h3 class="m-form__heading-title">
|
<h3 class="m-form__heading-title">
|
||||||
Invoice
|
Invoice
|
||||||
|
|
@ -994,6 +995,7 @@ $(function() {
|
||||||
// store selected vehicle data
|
// store selected vehicle data
|
||||||
var vdata = false;
|
var vdata = false;
|
||||||
|
|
||||||
|
{% if ftags.vehicle_dropdown %}
|
||||||
// vehicle selector
|
// vehicle selector
|
||||||
$('#customer-vehicle').select2({
|
$('#customer-vehicle').select2({
|
||||||
ajax: {
|
ajax: {
|
||||||
|
|
@ -1054,6 +1056,7 @@ $(function() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).focus();
|
}).focus();
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if ftags.vehicle_dropdown %}
|
{% if ftags.vehicle_dropdown %}
|
||||||
// reference job order selector
|
// reference job order selector
|
||||||
|
|
@ -1259,6 +1262,8 @@ $(function() {
|
||||||
'cvid': cvid
|
'cvid': cvid
|
||||||
}
|
}
|
||||||
}).done(function(response) {
|
}).done(function(response) {
|
||||||
|
// mark as invoice changed
|
||||||
|
$("#invoice-change").val(1);
|
||||||
var invoice = response.invoice;
|
var invoice = response.invoice;
|
||||||
|
|
||||||
// populate totals
|
// populate totals
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue