Resolve "Make battery dropdown display in cvehicle incoming job order" #881
2 changed files with 16 additions and 3 deletions
|
|
@ -174,6 +174,7 @@ class JobOrderController extends BaseController
|
|||
|
||||
// get customer vehicle
|
||||
$cv = $em->getRepository(CustomerVehicle::class)->find($cvid);
|
||||
$params['vid'] = $cv->getVehicle()->getID();
|
||||
|
||||
// make sure this customer vehicle exists
|
||||
if (empty($cv))
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="m-form__seperator m-form__seperator--dashed"></div>
|
||||
<div class="m-form__section{{ mode == 'create' ? ' m-form__section--last' }}">
|
||||
<div class="m-form__section{{ mode == 'create' or mode == 'create_vehicle' ? ' m-form__section--last' }}">
|
||||
<div class="m-form__heading">
|
||||
<h3 class="m-form__heading-title">
|
||||
Invoice
|
||||
|
|
@ -401,7 +401,7 @@
|
|||
<div class="form-group m-form__group row">
|
||||
<div class="col-lg-6">
|
||||
<label>Discount Type</label>
|
||||
{% if mode == 'create' %}
|
||||
{% if mode == 'create' or mode == 'create_vehicle' %}
|
||||
<select class="form-control m-input" id="invoice-promo" name="invoice_promo">
|
||||
<option value="">None</option>
|
||||
{% for promo in promos %}
|
||||
|
|
@ -469,7 +469,7 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% if mode == 'create' %}
|
||||
{% if mode == 'create' or mode == 'create_vehicle' %}
|
||||
<div class="form-group m-form__group row">
|
||||
<div class="col-lg-2 hide">
|
||||
<label for="invoice-bmfg">Manufacturer</label>
|
||||
|
|
@ -1108,6 +1108,13 @@ $(function() {
|
|||
|
||||
// update battery list when changing manufacturer
|
||||
$("#invoice-bmfg").change(function() {
|
||||
{% if mode == 'create_vehicle' %}
|
||||
vdata = {
|
||||
'vehicle': {
|
||||
'id': {{ vid }}
|
||||
}
|
||||
};
|
||||
{% endif %}
|
||||
// must have a selected vehicle
|
||||
if (!vdata)
|
||||
return;
|
||||
|
|
@ -1147,6 +1154,11 @@ $(function() {
|
|||
});
|
||||
});
|
||||
|
||||
// populate battery dropdown for create from vehicle mode
|
||||
{% if mode == 'create_vehicle' %}
|
||||
$("#invoice-bmfg").change();
|
||||
{% endif %}
|
||||
|
||||
// mask quantity field
|
||||
$("#invoice-quantity").inputmask("mask", {
|
||||
mask: "9999999",
|
||||
|
|
|
|||
Loading…
Reference in a new issue