Fix for issues found during testing. #567
This commit is contained in:
parent
c9e16b4774
commit
97eccf8ab8
3 changed files with 8 additions and 1 deletions
|
|
@ -460,6 +460,7 @@ class CustomerWarrantyController extends APIController
|
|||
// default date purchase to today
|
||||
// NOTE: might need to change this later
|
||||
$date_pur = new DateTime();
|
||||
$date_pur_cust = new DateTime();
|
||||
|
||||
// get date purchase specified by customer
|
||||
if (!empty($req->request->get('date_purchase')))
|
||||
|
|
|
|||
|
|
@ -100,6 +100,10 @@ class WarrantyHandler
|
|||
|
||||
// log warranty creation
|
||||
$action = 'create';
|
||||
$exp_date = '';
|
||||
if ($date_expire != null)
|
||||
$exp_date = $date_expire->format('d-M-y');
|
||||
|
||||
$log_data = [
|
||||
'serial' => $serial,
|
||||
'warranty_class' => $warranty_class,
|
||||
|
|
@ -107,7 +111,7 @@ class WarrantyHandler
|
|||
'last_name' => $last_name,
|
||||
'mobile_number' => $mobile_number,
|
||||
'date_purchase' => $date_purchase->format('d-M-y'),
|
||||
'date_expire' => $date_expire->format('d-M-y'),
|
||||
'date_expire' => $exp_date,
|
||||
'battery_model' => $bmodel_name,
|
||||
'battery_size' => $bsize_name,
|
||||
'sap_battery' => $sap_batt_id,
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@
|
|||
SAP Battery
|
||||
</label>
|
||||
<select name="sap_battery" class="form-control m-input">
|
||||
<option value=""></option>
|
||||
{% for sap_battery in sap_batts %}
|
||||
<option value="{{ sap_battery.getID }}"{{ obj.getSAPBattery.getID|default(0) == sap_battery.getID ? ' selected' }}>{{ sap_battery.getID }}</option>
|
||||
{% endfor %}
|
||||
|
|
@ -109,6 +110,7 @@
|
|||
Battery Model
|
||||
</label>
|
||||
<select name="battery_model" class="form-control m-input">
|
||||
<option value=""></option>
|
||||
{% for model in batt_models %}
|
||||
<option value="{{ model.getID }}"{{ obj.getBatteryModel.getID|default(0) == model.getID ? ' selected' }}>{{ model.getName }}</option>
|
||||
{% endfor %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue