GWM
This commit is contained in:
parent
9302368001
commit
0a96297e09
@ -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);
|
||||
|
||||
@ -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();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user