@php $repair = []; if (!empty($view_data['job_sheet'])) { $repair['repair_job_sheet_id'] = $view_data['job_sheet']['id']; $repair['repair_due_date'] = $view_data['job_sheet']['delivery_date']; $repair['repair_completed_on'] = null; $repair['repair_warranty_id'] = null; $repair['repair_status_id'] = $view_data['job_sheet']['status_id']; $repair['repair_brand_id'] = $view_data['job_sheet']['brand_id']; $repair['repair_device_id'] = $view_data['job_sheet']['device_id']; $repair['repair_model_id'] = $view_data['job_sheet']['device_model_id']; $repair['repair_serial_no'] = $view_data['job_sheet']['serial_no']; $repair['repair_defects'] = $view_data['job_sheet']['defects']; $repair['res_waiter_id'] = $view_data['job_sheet']['service_staff']; } elseif (!empty($transaction)) { $repair['repair_due_date'] = $transaction['repair_due_date']; $repair['repair_completed_on'] = $transaction['repair_completed_on']; $repair['repair_warranty_id'] = $transaction['repair_warranty_id']; $repair['repair_status_id'] = $transaction['repair_status_id']; $repair['repair_brand_id'] = $transaction['repair_brand_id']; $repair['repair_device_id'] = $transaction['repair_device_id']; $repair['repair_model_id'] = $transaction['repair_model_id']; $repair['repair_serial_no'] = $transaction['repair_serial_no']; $repair['repair_defects'] = $transaction['repair_defects']; } $defects = []; if(!empty($view_data['repair_settings'])) { $defects = isset($view_data['repair_settings']['problem_reported_by_customer']) ? explode(',', $view_data['repair_settings']['problem_reported_by_customer']) : []; } @endphp {!! Form::hidden('has_module_data', true); !!} @if(!empty($view_data['parts'])) @endif @if(!empty($defects)) @endif @if(!empty($view_data['job_sheet']['location_id'])) @endif {{-- override serive staff --}} @if(!empty($repair['res_waiter_id'])) @endif