CHANGE_UI_FIX - VADIVEL J 2025-10-11
This commit is contained in:
parent
148c278564
commit
0f3aee6c54
@ -7010,7 +7010,9 @@ class ClientController extends AdminController
|
||||
foreach ($postHrs as $post) {
|
||||
$found = false;
|
||||
foreach ($preHrs as $index => $pre) {
|
||||
if ($post['hr_mobile'] === $pre['hr_mobile'] && $post['hr_mail'] === $pre['hr_mail']) {
|
||||
|
||||
if ( trim($post['hr_mobile']) == trim($pre['hr_mobile']) && trim($post['hr_mail']) == trim($pre['hr_mail']) ) {
|
||||
|
||||
$merged[] = [
|
||||
'pre_hr_id' => $pre['pre_hr_id'],
|
||||
'post_hr_id' => $post['post_hr_id'],
|
||||
@ -7043,6 +7045,13 @@ class ClientController extends AdminController
|
||||
|
||||
// Remaining preHrs (not matched)
|
||||
foreach ($preHrs as $pre) {
|
||||
|
||||
foreach ($merged as $value) {
|
||||
if ( trim($pre['hr_mobile']) == trim($value['hr_mobile']) && trim($pre['hr_mail']) == trim($value['hr_mail']) ) {
|
||||
continue 2; // Skip adding this pre_hr as it's already matched
|
||||
}
|
||||
}
|
||||
|
||||
$merged[] = [
|
||||
'pre_hr_id' => $pre['pre_hr_id'],
|
||||
'post_hr_id' => null,
|
||||
@ -7292,8 +7301,8 @@ class ClientController extends AdminController
|
||||
}
|
||||
|
||||
private function getPreBranchIdByPostBranchId($post_branch_id){
|
||||
$db2 = \Config\Database::connect();
|
||||
$pre_branch_id = $db2->table('client_branch')->where('id',$post_branch_id)->where('is_Active',1)->get()->getResultArray()[0]['pre_branch_id']??"";
|
||||
$db = \Config\Database::connect();
|
||||
$pre_branch_id = $db->table('client_branch')->where('id',$post_branch_id)->where('is_Active',1)->get()->getResultArray()[0]['pre_branch_id']??"";
|
||||
return $pre_branch_id;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user