Fix ticket functionality related to contact numbers #UAT

This commit is contained in:
Kendrick Chan 2018-03-11 02:44:44 +08:00
parent 5c18619e80
commit a7ffb58fc8
2 changed files with 6 additions and 9 deletions

View file

@ -208,13 +208,7 @@ class TicketController extends BaseController
// set autopopulated fields
$first_name = $customer->getFirstName();
$last_name = $customer->getLastName();
$contact_num = '';
$mobile_numbers = $customer->getMobileNumbers();
if (count($mobile_numbers) > 0) {
$contact_num = $mobile_numbers[0]->getID();
}
$contact_num = $customer->getPhoneMobile();
// get job order data
if ($job_order_id) {

View file

@ -70,8 +70,11 @@
<div class="form-group m-form__group row no-border">
<div class="col-lg-4">
<label data-field="contact_num">Contact Number</label>
<input type="text" name="contact_num" class="form-control m-input" value="{{ customer and mode == 'create' and customer.getMobileNumbers is not empty ? customer.getMobileNumbers[0].getID : obj.getContactNumber }}"{{ customer ? ' disabled' }}>
<div class="form-control-feedback hide" data-field="contact_num"></div>
<div class="input-group m-input-group">
<span class="input-group-addon">+63</span>
<input type="text" name="contact_num" class="form-control m-input" value="{{ customer and mode == 'create' and customer.getPhoneMobile is not empty ? customer.getPhoneMobile : obj.getContactNumber }}"{{ customer ? ' disabled' }}>
<div class="form-control-feedback hide" data-field="contact_num"></div>
</div>
</div>
</div>
<div class="form-group m-form__group row no-border">