diff --git a/app/Controllers/EmpDataServiceController.php b/app/Controllers/EmpDataServiceController.php index c144fb0f..1c9fac18 100755 --- a/app/Controllers/EmpDataServiceController.php +++ b/app/Controllers/EmpDataServiceController.php @@ -2020,7 +2020,16 @@ class EmpDataServiceController extends BaseController // dd($emp_endorsement_table_data, $enrollment_file_id, $no_of_insured, $no_of_dependent); //update the employee policy data (TPAID or UHID) - $return = $this->employeePolicyModel->bulkUpdate($emp_details); + if(!empty($emp_details)){ + $return = $this->employeePolicyModel->bulkUpdate($emp_details); + }else{ + $this->batchFileModel->update($file_id, [ + 'count' => 0, + 'status' => "failed-6", + 'amount' => 0, + ]); + return ['status' => 'error', 'message' => 'There is no data to update']; // Return error code + } if(in_array($file['event_type'], ['addition', 'dependent_addition']) && !empty($emp_endorsement_table_data)){ $this->employeePolicyModel->updateEmpEndorsementAddition($emp_endorsement_table_data); @@ -2048,7 +2057,6 @@ class EmpDataServiceController extends BaseController $this->storeEndorsementNumber($file_id, $endorsement_id, $enrollment_file_id); } - $this->myLogger->logme('error', 'Inception Update TPA and UHID -- set cashDepositCalculationForInception and sendMailForDownloadingECard in JOB QUEUE'); $policy_name = $this->getPolicyNameUsingClientPolicyId($client_policy_id); diff --git a/app/Views/batch_list.php b/app/Views/batch_list.php index 163b33cb..d5897722 100755 --- a/app/Views/batch_list.php +++ b/app/Views/batch_list.php @@ -128,7 +128,12 @@ failed + data-placement="top" title="Wrong File Uploaded"> + + + + failed