CHANGE_DUP_MAIL_CHECK

This commit is contained in:
velz 2024-12-17 11:29:20 +05:30
parent 6c874beef5
commit 3f5ad1e7ac
2 changed files with 19 additions and 2 deletions

View File

@ -236,7 +236,9 @@ class EmployeeServiceController extends AdminController
'is_mandatory' => false,
'data_type' => 'str',
'format' => null,
'allowed_values' => null
'allowed_values' => null,
'custom' => 'check_dup_email',
'params' => ['row', 'existing_mobilenos']
],
'pre_existing_ailments' => [
'col_idx' => 14,
@ -2029,7 +2031,7 @@ public function getFileMetaDataByFileId($file_id, $status = 'success'){
$value['family_floater_key'] = $relation;
$policy_data['basic_cover_si'] = $row[9];
$policy_data['date_coverage'] = $row[13] != "" && $row[13] != null ? change_date_format($row[13],'d-M-Y','Y-m-d') : null;
$policy_data['date_coverage'] = $row[13] != "" && $row[13] != null ? change_date_format($row[13],null,'Y-m-d') : null;
$policy_data['client_policy_id'] = $file['policy_id'];
$employee = $this->employeeModel->checkExistingEmployee($value,$file['client_branch_id']);

View File

@ -1726,6 +1726,21 @@ if(!function_exists('check_dup_mobileno'))
}
}
if(!function_exists('check_dup_email'))
{
function check_dup_email(array $row,array $existing_mobilenos)
{
foreach($existing_mobilenos as $k => $value)
{
if ($row['13'] == $value['email_corporate']) {
return array('status' => false,'error' => "Duplicate Email");
// break;
}
}
return array('status' => true);
}
}
if(!function_exists('generate_family_relationship_array'))
{
function generate_family_relationship_array($family_structure_from_policy_terms) {