FIX_BUGS : RV
This commit is contained in:
parent
14605542f4
commit
1eee77f1b8
@ -3902,7 +3902,9 @@ class EmployeeRestController extends AdminController
|
|||||||
$filePath = $uploadPath . $record[0]['file_name'];
|
$filePath = $uploadPath . $record[0]['file_name'];
|
||||||
|
|
||||||
if (!file_exists($filePath)) {
|
if (!file_exists($filePath)) {
|
||||||
return $this->failNotFound("File not found on server");
|
// return $this->failNotFound("File not found on server");
|
||||||
|
$data['message'] = 'The Physical File Not Found';
|
||||||
|
return view('errors/404', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force file download
|
// Force file download
|
||||||
|
|||||||
@ -248,12 +248,14 @@ class PolicyTransactionController extends BaseController
|
|||||||
|
|
||||||
// policy Transaction Create function start
|
// policy Transaction Create function start
|
||||||
public function createInceptionPolicy()
|
public function createInceptionPolicy()
|
||||||
{
|
{
|
||||||
// print_r($this->request->getPost()); die;
|
$post_data = $this->request->getPost() ?? [];
|
||||||
|
$this->myLogger->logme('error', 'Policy Trancaction form data : '. json_encode($post_data));
|
||||||
|
|
||||||
$id = $this->request->getPost('id');
|
$id = $this->request->getPost('id');
|
||||||
$data = $this->preparePolicyData();
|
$data = $this->preparePolicyData();
|
||||||
$data['cd_ac_pk'] = $this->request->getPost('cd_ac_no');
|
$data['cd_ac_pk'] = $this->request->getPost('cd_ac_no');
|
||||||
// print_r($this->request->getPost()); die;
|
$this->myLogger->logme('error', 'Policy Trancaction modified form data ( insert data ) : '. json_encode($data));
|
||||||
|
|
||||||
|
|
||||||
if (!$id) {
|
if (!$id) {
|
||||||
|
|||||||
@ -976,11 +976,12 @@ class TicketServiceController extends BaseController
|
|||||||
$columns_to_check = $excel_data_and_headers['claim_dump_excel_columns'];
|
$columns_to_check = $excel_data_and_headers['claim_dump_excel_columns'];
|
||||||
// dd($columns_to_check);
|
// dd($columns_to_check);
|
||||||
|
|
||||||
$client_data = $this->clientModel->where('is_active', 1)->where('client_type', 1)->findAll();
|
//if upload the unwanted file upload handle
|
||||||
$insurer_data = $this->insurerModel->where('is_active', 1)->findAll();
|
if(count($columns_to_check) == 0){
|
||||||
$tpa_data = $this->TPAModel->where('is_active', 1)->findAll();
|
$message = "Wrong file was uploaded";
|
||||||
$claim_status_data = $this->ticketClaimStatusModel->select('id, claim_status')->where('is_active', 1)->orderBy('id', 'asc')->groupBy('claim_status')->findAll();
|
$this->claimDumpFileModel->where('id', $file_id)->set(['status' => 'failed', 'reason' => json_encode(['error_summary' => array_count_values([5]), 'error_data' => $message])])->update();
|
||||||
|
return array('error_summary' => [5], 'error_data' => $message);
|
||||||
|
}
|
||||||
|
|
||||||
//Store the error data by this structure
|
//Store the error data by this structure
|
||||||
$result = ['error_type' => 1, 'error_summary' => [], 'error_data' => []];
|
$result = ['error_type' => 1, 'error_summary' => [], 'error_data' => []];
|
||||||
@ -988,6 +989,7 @@ class TicketServiceController extends BaseController
|
|||||||
//excel data is empty than through the error
|
//excel data is empty than through the error
|
||||||
if(count($excel_data ?? []) <= 1){
|
if(count($excel_data ?? []) <= 1){
|
||||||
$message = "Uploaded file is empty";
|
$message = "Uploaded file is empty";
|
||||||
|
$this->claimDumpFileModel->where('id', $file_id)->set(['status' => 'failed', 'reason' => json_encode(['error_summary' => array_count_values([5]), 'error_data' => $message])])->update();
|
||||||
return array('error_summary' => [5], 'error_data' => $message);
|
return array('error_summary' => [5], 'error_data' => $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1007,6 +1009,11 @@ class TicketServiceController extends BaseController
|
|||||||
return array('error_summary' => [6], 'error_data' => $message);
|
return array('error_summary' => [6], 'error_data' => $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$client_data = $this->clientModel->where('is_active', 1)->where('client_type', 1)->findAll();
|
||||||
|
$insurer_data = $this->insurerModel->where('is_active', 1)->findAll();
|
||||||
|
$tpa_data = $this->TPAModel->where('is_active', 1)->findAll();
|
||||||
|
$claim_status_data = $this->ticketClaimStatusModel->select('id, claim_status')->where('is_active', 1)->orderBy('id', 'asc')->groupBy('claim_status')->findAll();
|
||||||
|
|
||||||
//remove header
|
//remove header
|
||||||
unset($excel_data[0]);
|
unset($excel_data[0]);
|
||||||
|
|
||||||
@ -1213,9 +1220,15 @@ class TicketServiceController extends BaseController
|
|||||||
|
|
||||||
//seperate the Account Manager Name and Mobile No
|
//seperate the Account Manager Name and Mobile No
|
||||||
if (!empty($excel_acm_data)) {
|
if (!empty($excel_acm_data)) {
|
||||||
|
$excel_acm_data = str_replace(['–', '—'], '-', $excel_acm_data);
|
||||||
$parts = array_map('trim', explode('-', $excel_acm_data, 2));
|
$parts = array_map('trim', explode('-', $excel_acm_data, 2));
|
||||||
$acm_name = $parts[0] ?? null;
|
$acm_name = $parts[0] ?? null;
|
||||||
$acm_mobile = $parts[1] ?? null;
|
$acm_mobile = $parts[1] ?? null;
|
||||||
|
|
||||||
|
// ensure mobile number is digits only
|
||||||
|
if ($acm_mobile !== null) {
|
||||||
|
$acm_mobile = preg_replace('/\D/', '', $acm_mobile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// dd($acm_name, $acm_mobile);
|
// dd($acm_name, $acm_mobile);
|
||||||
@ -1648,13 +1661,13 @@ class TicketServiceController extends BaseController
|
|||||||
'claim_status_id' => $claim_status_id ?? null,
|
'claim_status_id' => $claim_status_id ?? null,
|
||||||
'acm_id' => $acm_data['id'] ?? null,
|
'acm_id' => $acm_data['id'] ?? null,
|
||||||
'insurer_id' => $db_data['insurer_id'] ?? null,
|
'insurer_id' => $db_data['insurer_id'] ?? null,
|
||||||
'tpa_id' => $excel_tpa_id_data ?? $db_data['tpa_id'] ?? null,
|
'tpa_id' => $db_data['tpa_id'] ?? null,
|
||||||
'client_id' => $db_data['client_id'] ?? null,
|
'client_id' => $db_data['client_id'] ?? null,
|
||||||
'emp_id' => $db_data['emp_id'] ?? null,
|
'emp_id' => $db_data['emp_id'] ?? null,
|
||||||
'client_policy_id' => $db_data['client_policy_id'] ?? null,
|
'client_policy_id' => $db_data['client_policy_id'] ?? null,
|
||||||
'policy_no' => $db_data['policy_no'] ?? null,
|
'policy_no' => $db_data['policy_no'] ?? null,
|
||||||
'emp_code' => $db_data['emp_code'] ?? null,
|
'emp_code' => $db_data['emp_code'] ?? null,
|
||||||
'tpa_no' => $db_data['tpa_no'] ?? null,
|
'tpa_no' => $excel_tpa_id_data ?? $db_data['tpa_no'] ?? null,
|
||||||
'emp_name' => $db_data['emp_name'] ?? null,
|
'emp_name' => $db_data['emp_name'] ?? null,
|
||||||
'relationship' => $excel_relationship_data ?? null,
|
'relationship' => $excel_relationship_data ?? null,
|
||||||
'emp_mobile' => $excel_emp_mobile_data ?? $db_data['emp_mobile'] ?? null,
|
'emp_mobile' => $excel_emp_mobile_data ?? $db_data['emp_mobile'] ?? null,
|
||||||
|
|||||||
@ -3975,14 +3975,6 @@ $('#policy_no').change(function(){
|
|||||||
toastr.warning(res.message,'WARNING');
|
toastr.warning(res.message,'WARNING');
|
||||||
$('#policy_no').val("");
|
$('#policy_no').val("");
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if(res.status == true){
|
|
||||||
$('#ct_type').val(1);
|
|
||||||
$('#client_policy_id').val(res.data.id);
|
|
||||||
$('#policy_start_date').val(res.data.policy_start_date);
|
|
||||||
$('#policy_end_date').val(res.data.policy_end_date);
|
|
||||||
$('#tpa').val(res.data.tpa_branch_id+'-'+res.data.tpa_id).select2();
|
|
||||||
}else{
|
}else{
|
||||||
$('#ct_type').val(2);
|
$('#ct_type').val(2);
|
||||||
$('#client_policy_id').val('');
|
$('#client_policy_id').val('');
|
||||||
@ -3991,6 +3983,14 @@ $('#policy_no').change(function(){
|
|||||||
$('#tpa').val('').select2();
|
$('#tpa').val('').select2();
|
||||||
console.log(res.message, 'warning');
|
console.log(res.message, 'warning');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if(res.status == true){
|
||||||
|
// $('#ct_type').val(1);
|
||||||
|
// $('#client_policy_id').val(res.data.id);
|
||||||
|
// $('#policy_start_date').val(res.data.policy_start_date);
|
||||||
|
// $('#policy_end_date').val(res.data.policy_end_date);
|
||||||
|
// $('#tpa').val(res.data.tpa_branch_id+'-'+res.data.tpa_id).select2();
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
error: function (xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
console.error(xhr.responseText);
|
console.error(xhr.responseText);
|
||||||
@ -3999,12 +3999,12 @@ $('#policy_no').change(function(){
|
|||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
$('#ct_type').val(2)
|
$('#ct_type').val(2);
|
||||||
$('#client_policy_id').val();
|
$('#client_policy_id').val();
|
||||||
$('#policy_start_date').val();
|
$('#policy_start_date').val();
|
||||||
$('#policy_end_date').val();
|
$('#policy_end_date').val();
|
||||||
$('#tpa').val('').select2();
|
$('#tpa').val('').select2();
|
||||||
console.log("Could not get policy data")
|
console.log("This is new policy Could not get policy data")
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user