This commit is contained in:
Gowtham M 2025-10-24 18:18:32 +05:30
parent 9302368001
commit 0a96297e09
2 changed files with 10 additions and 1 deletions

View File

@ -56,7 +56,9 @@ class EnquiryController extends ResourceController
$to_date = DateTime::createFromFormat('d-m-Y', $to_date)->format('Y-m-d 23:59:59');
}
if (!empty($agent_id)) {
if (!empty($staff_id) && !empty($manager_id)) {
$data = $this->enquiryModel->getEnquiry('STAFF&MANAGER', [$staff_id,$manager_id], $only_policy_data, $from_date, $to_date, $status);
} elseif (!empty($agent_id)) {
$data = $this->enquiryModel->getEnquiry('AGENT', $agent_id, $only_policy_data, $from_date, $to_date, $status);
} elseif (!empty($staff_id)) {
$data = $this->enquiryModel->getEnquiry('STAFF', $staff_id, $only_policy_data, $from_date, $to_date, $status);

View File

@ -93,6 +93,13 @@ class EnquiryModel extends Model
{
return $data->where('partner_enquiry.manager_id', $Id)->findAll();
}
else if($getBy == 'STAFF&MANAGER')
{
$staffId = $Id[0];
$managerId = $Id[1];
return $data->where('partner_enquiry.manager_id', $managerId)->where('partner_enquiry.assigned_to',$staffId)->findAll();
}
}
}