Add checking for nulls when creating the data for backup. #762
This commit is contained in:
parent
22d4201097
commit
c318c471ff
1 changed files with 69 additions and 20 deletions
|
|
@ -311,34 +311,83 @@ class GetJobOrderArchiveDataCommand extends Command
|
|||
$fac_type = $row['facilitated_type'];
|
||||
|
||||
$coord_long = $row['coord_long'];
|
||||
$coord_lat = $row['coord_lat'];
|
||||
$priority = $row['priority'];
|
||||
$meta = $row['meta'];
|
||||
$status_autoassign = $row['status_autoassign'];
|
||||
|
||||
$status_autoassign = '\N';
|
||||
if ($row['status_autoassign'] != NULL)
|
||||
$status_autoassign = $row['status_autoassign'];
|
||||
|
||||
$first_name = $row['first_name'];
|
||||
$last_name = $row['last_name'];
|
||||
$plate_number = $row['plate_number'];
|
||||
$phone_mobile = $row['phone_mobile'];
|
||||
$no_trade_in_reason = $row[' no_trade_in_reason'];
|
||||
|
||||
$no_trade_in_reason = '\N';
|
||||
if ($row['no_trade_in_reason'] != NULL)
|
||||
$no_trade_in_reason = $row[' no_trade_in_reason'];
|
||||
|
||||
$will_wait = $row['will_wait'];
|
||||
$reason_not_waiting = $row['reason_not_waiting'];
|
||||
$not_waiting_notes = $row['not_waiting_notes'];
|
||||
$del_status = $row['delivery_status'];
|
||||
$emergency_type_id = $row['emergency_type_id'];
|
||||
$owner_type_id = $row['ownership_type_id'];
|
||||
$cust_location_id = $row['cust_location_id'];
|
||||
$source_of_awareness = $row['source_of_awareness'];
|
||||
$remarks = $row['remarks'];
|
||||
$initial_concern = $row['initial_concern'];
|
||||
$initial_concern_notes = $row['initial_concern_notes'];
|
||||
$gender = $row['gender'];
|
||||
$caller_class = $row['caller_classification'];
|
||||
|
||||
$reason_not_waiting = '\N';
|
||||
if ($row['reason_not_waiting'] != NULL)
|
||||
$reason_not_waiting = $row['reason_not_waiting'];
|
||||
|
||||
$not_waiting_notes = '\N';
|
||||
if ($row['not_waiting_notes'] != NULL)
|
||||
$not_waiting_notes = $row['not_waiting_notes'];
|
||||
|
||||
$del_status = '\N';
|
||||
if ($row['delivery_status'] != NULL)
|
||||
$del_status = $row['delivery_status'];
|
||||
|
||||
$emergency_type_id = '\N';
|
||||
if ($row['emergency_type_id'] != NULL)
|
||||
$emergency_type_id = $row['emergency_type_id'];
|
||||
|
||||
$owner_type_id = '\N';
|
||||
if ($row['ownership_type_id'] != NULL)
|
||||
$owner_type_id = $row['ownership_type_id'];
|
||||
|
||||
$cust_location_id = '\N';
|
||||
if ($row['cust_location_id'] != NULL)
|
||||
$cust_location_id = $row['cust_location_id'];
|
||||
|
||||
$source_of_awareness = '\N';
|
||||
if ($row['source_of_awareness'] != NULL)
|
||||
$source_of_awareness = $row['source_of_awareness'];
|
||||
|
||||
$remarks = '\N';
|
||||
if ($row['remarks'] != NULL)
|
||||
$remarks = $row['remarks'];
|
||||
|
||||
$initial_concern = '\N';
|
||||
if ($row['initial_concern'] != NULL)
|
||||
$initial_concern = $row['initial_concern'];
|
||||
|
||||
$initial_concern_notes = '\N';
|
||||
if ($row['initial_concern_notes'] != NULL)
|
||||
$initial_concern_notes = $row['initial_concern_notes'];
|
||||
|
||||
$gender = '\N';
|
||||
if ($row['gender'] != NULL)
|
||||
$gender = $row['gender'];
|
||||
|
||||
$caller_class = '\N';
|
||||
if ($row['caller_classification'] != NULL)
|
||||
$caller_class = $row['caller_classification'];
|
||||
|
||||
$inv_count = $row['inventory_count'];
|
||||
|
||||
// check for nulls. check the ff fields since these can be null: date_fulfill, date_cancel, date_assign, create_user_id,
|
||||
// assign_user_id, proces_user_id, hub_id, rider_id, cancel_reason, ref_jo_id, or_num, trade_in_type,
|
||||
// flag_rider_rating, facilitated_type, facilitated_hub_id, status_autoassign, reason_not_waiting,
|
||||
// not_waiting_notes, no_trade_in_reason, delivery_status, source_of_awareness, remarks, initial_concern,
|
||||
// initial_concern_notes, gender, caller_classifications, emergency_type_id, ownership_type_id, cust_location_id
|
||||
// create the array for the file
|
||||
$data = [
|
||||
$id,
|
||||
$cust_id,
|
||||
// TODO: finish writing to array
|
||||
];
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
// TODO: write the load data file function
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue