diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index ee7ae376..1529e549 100755 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -7305,7 +7305,9 @@ class ClientController extends AdminController $pre_hr_id = $db2->table('client_branch cb') ->select('lc.id') ->join('level_contacts lc','lc.ref_id = cb.id') - ->where('cb.id',$pre_branch_id)->where('cb.is_Active',1)->where('lc.is_Active',1)->get()->getResultArray()[0]['id']??""; + ->where('lc.contact_type', 'client') + ->where('cb.id',$pre_branch_id)->where('cb.is_Active',1) + ->where('lc.is_Active',1)->get()->getResultArray()[0]['id']??""; return $pre_hr_id; }