Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
b833c7611b
@ -6103,7 +6103,7 @@ class ClientController extends AdminController
|
|||||||
|
|
||||||
$empServiceController = new EmployeeServiceController();
|
$empServiceController = new EmployeeServiceController();
|
||||||
// $res = $empServiceController->excelFileFormatValidation(['file_id' => '1248']);
|
// $res = $empServiceController->excelFileFormatValidation(['file_id' => '1248']);
|
||||||
// $res = $empServiceController->excelFileDataValidation(['file_id' => '1248']);
|
// $res = $empServiceController->excelFileDataValidation(['file_id' => '1252']);
|
||||||
// $res = $empServiceController->employeesOnboardPreprocess(['file_id' => 1183]);
|
// $res = $empServiceController->employeesOnboardPreprocess(['file_id' => 1183]);
|
||||||
// $res = $empServiceController->employeesOnboardPreprocess(['file_id' => 1169]);
|
// $res = $empServiceController->employeesOnboardPreprocess(['file_id' => 1169]);
|
||||||
// $res = $empServiceController->employeesOnboardProcess(['file_id' => 835]);
|
// $res = $empServiceController->employeesOnboardProcess(['file_id' => 835]);
|
||||||
|
|||||||
@ -1196,6 +1196,20 @@ class EmployeeServiceController extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check the employee code if dublicate exist
|
||||||
|
if(($file['action'] == 'inception' || $file['action'] == 'missed_inception' || $file['action'] == 'addition' || $file['action'] == 'enrollment'))
|
||||||
|
{
|
||||||
|
$res = check_emp_code_duplication($family, $file);
|
||||||
|
// dd($res);
|
||||||
|
if($res['status'])
|
||||||
|
{
|
||||||
|
foreach ($res['row_ids'] as $row_id) {
|
||||||
|
array_push($result['error_summary'],26);
|
||||||
|
$result['error_data'][ $row_id ]['emp_id']['error'][] = "Employee Code is already exist in the system";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//check self avaialbe either same policy DB level(i.e.) gMC parents
|
//check self avaialbe either same policy DB level(i.e.) gMC parents
|
||||||
if($file['action'] == 'dependent_addition' || ($policy_details['policy_type_id'] == 3 && !$is_self_available_in_policy_terms)) // 3 is GMC parents as base policy not as dep addon)
|
if($file['action'] == 'dependent_addition' || ($policy_details['policy_type_id'] == 3 && !$is_self_available_in_policy_terms)) // 3 is GMC parents as base policy not as dep addon)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -88,7 +88,7 @@ class NotificationController extends AdminController
|
|||||||
{
|
{
|
||||||
$checkboxNames = [
|
$checkboxNames = [
|
||||||
'member_welcome_mail_btn',
|
'member_welcome_mail_btn',
|
||||||
'common_mail_btn',
|
'member_common_mail_btn',
|
||||||
'member_reminder_mail_btn',
|
'member_reminder_mail_btn',
|
||||||
'member_ecard_mail_btn',
|
'member_ecard_mail_btn',
|
||||||
'member_review_and_summary_mail_btn',
|
'member_review_and_summary_mail_btn',
|
||||||
@ -232,7 +232,8 @@ class NotificationController extends AdminController
|
|||||||
$params = [
|
$params = [
|
||||||
'client_data' => $client_data,
|
'client_data' => $client_data,
|
||||||
'notification_data' => $notification_data,
|
'notification_data' => $notification_data,
|
||||||
'test_mail' => $test_mail
|
'test_mail' => $test_mail,
|
||||||
|
'test_mail_list' => ""
|
||||||
];
|
];
|
||||||
|
|
||||||
$testMailData = sendMailNotification::sendMailNotificationForTesting($notification_data['template_name'], $params);
|
$testMailData = sendMailNotification::sendMailNotificationForTesting($notification_data['template_name'], $params);
|
||||||
|
|||||||
@ -75,6 +75,9 @@ class ThzController extends BaseController
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
$text = "create";
|
$text = "create";
|
||||||
|
if(!isset($data['assign_to'])){
|
||||||
|
$data['assign_to'] = $this->getAcmIdUsingClientId($data['client_id'] ?? null);
|
||||||
|
}
|
||||||
$insertID = $this->insertTicket($data);
|
$insertID = $this->insertTicket($data);
|
||||||
$result = true;
|
$result = true;
|
||||||
$references = "";
|
$references = "";
|
||||||
@ -664,7 +667,23 @@ class ThzController extends BaseController
|
|||||||
return $old['status'] . " - " . $data['status'];
|
return $old['status'] . " - " . $data['status'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function getAcmIdUsingClientId($client_id)
|
||||||
|
{
|
||||||
|
if(!empty($client_id)){
|
||||||
|
|
||||||
|
$acm_data = $this->cientRmModel->where('is_active', 1)->where('level', 3)->where('client_id', $client_id)->orderBy('id', 'asc')->first();
|
||||||
|
if($acm_data){
|
||||||
|
return $acm_data['user_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->myLogger->logme('error', 'Account Manager data not found');
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->myLogger->logme('error', 'client id is null');
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -514,6 +514,47 @@ if (!function_exists('name_and_empid_check_in_db')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!function_exists('check_emp_code_duplication')) {
|
||||||
|
function check_emp_code_duplication($family_data, $actionArr)
|
||||||
|
{
|
||||||
|
$employeeModel = new EmployeeModel();
|
||||||
|
$row_ids = [];
|
||||||
|
$status = false;
|
||||||
|
$client_id = $actionArr['client_id'];
|
||||||
|
$policy_id = $actionArr['policy_id'];
|
||||||
|
$client_branch_id = $actionArr['client_branch_id'];
|
||||||
|
$current_action = $actionArr['action'];
|
||||||
|
|
||||||
|
foreach ($family_data as $rkey => $row) {
|
||||||
|
|
||||||
|
if ($current_action != 'dependent_addition' || (isset($row['temp']) && $row['temp']['source'] != 'db')) {
|
||||||
|
$res = $employeeModel
|
||||||
|
->join('client_policy cp', "employees.client_id = cp.client_id")
|
||||||
|
->join('employee_polices ep', "cp.id = ep.client_policy_id AND employees.id = ep.employee_id")
|
||||||
|
->where("cp.id", $policy_id)
|
||||||
|
->where("employees.client_id", $client_id)
|
||||||
|
->where("employees.client_branch_id", $client_branch_id)
|
||||||
|
->where("employees.is_active", 1)
|
||||||
|
->where("employees.emp_status", 'active')
|
||||||
|
->where("ep.is_active", 1)
|
||||||
|
->where("ep.status", 'active')
|
||||||
|
->where('TRIM(emp_code)', trim($row[1]))
|
||||||
|
->findAll();
|
||||||
|
|
||||||
|
if(count($res) > 0){
|
||||||
|
$row_ids[] = $row[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($row_ids)){
|
||||||
|
$status = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ['status' => $status, 'row_ids' => $row_ids];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!function_exists('check_dependent_conflict')) {
|
if (!function_exists('check_dependent_conflict')) {
|
||||||
function check_dependent_conflict($family_data, $policy_terms, $actionArr, $is_lgbtq)
|
function check_dependent_conflict($family_data, $policy_terms, $actionArr, $is_lgbtq)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -548,6 +548,11 @@ function fetchFileError(file_id) {
|
|||||||
"<strong>Rule conflict: Twofold relationship found within family</strong> <span class='badge badge-danger float-right'>" +
|
"<strong>Rule conflict: Twofold relationship found within family</strong> <span class='badge badge-danger float-right'>" +
|
||||||
err_count + "</span>";
|
err_count + "</span>";
|
||||||
break;
|
break;
|
||||||
|
case 26:
|
||||||
|
file_error_html +=
|
||||||
|
"<strong>Duplicate Employee code found</strong> <span class='badge badge-danger float-right'>" +
|
||||||
|
err_count + "</span>";
|
||||||
|
break;
|
||||||
case 100:
|
case 100:
|
||||||
hasError14 = true;
|
hasError14 = true;
|
||||||
error_code = 14;
|
error_code = 14;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user