Commit 7fea1bb6 by Jansa Jose

Merge branch 'master' into 'dev_production'

change schedule date See merge request !188
parents d8ce9973 353996c3
...@@ -59,11 +59,15 @@ class Booking_model extends CI_Model { ...@@ -59,11 +59,15 @@ class Booking_model extends CI_Model {
$this->db->insert('customer_vehicle',$insert_array); $this->db->insert('customer_vehicle',$insert_array);
$last_id = $this->db->insert_id(); $last_id = $this->db->insert_id();
} }
$time = (!is_numeric($postData['schedule_date']['time'])?
$postData['schedule_date']['time']:
date('h:i A',($postData['schedule_date']['time'])/1000);
$book_data = array('cost' => $postData['cost'], $book_data = array('cost' => $postData['cost'],
'mileage' => $vehData['milage'], 'mileage' => $vehData['milage'],
'customer_id' => $postData['customer_id'], 'customer_id' => $postData['customer_id'],
'scheduled_date' => $postData['schedule_date']['date'], 'scheduled_date' => $postData['schedule_date']['date'],
'scheduled_time' => date('h:i A',($postData['schedule_date']['time'])/1000), 'scheduled_time' => $time,
'issues_selected' => json_encode($selected_issues), 'issues_selected' => json_encode($selected_issues),
'customer_veh_id' => $last_id, 'customer_veh_id' => $last_id,
'custom_issue_data'=> json_encode($postData['optionalData']), 'custom_issue_data'=> json_encode($postData['optionalData']),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment