GWM : claim list filter
This commit is contained in:
parent
c160009831
commit
eded43bb79
@ -33,10 +33,15 @@ class ClaimController extends ResourceController
|
||||
{
|
||||
try {
|
||||
|
||||
$id = $this->request->getGet('id'); // claim id
|
||||
$manager_id = $this->request->getGet('manager_id');
|
||||
$agent_id = $this->request->getGet('agent_id');
|
||||
$id = $this->request->getGet('id'); // claim id
|
||||
$manager_id = $this->request->getGet('manager_id');
|
||||
$agent_id = $this->request->getGet('agent_id');
|
||||
$policy_number = $this->request->getGet('policy_number');
|
||||
$claim_type_id = $this->request->getGet('claim_type_id'); // partner_claim_type_master.id
|
||||
$claim_status_id = $this->request->getGet('claim_status_id'); // ticket_claim_status.id
|
||||
$insurer_id = $this->request->getGet('insurer_id'); // insurers.id
|
||||
$from_date = $this->request->getGet('from_date');
|
||||
$to_date = $this->request->getGet('to_date');
|
||||
|
||||
|
||||
$builder = $this->db->table('ticket_master tm')
|
||||
@ -83,6 +88,23 @@ class ClaimController extends ResourceController
|
||||
$builder->where('tm.policy_no', $policy_number);
|
||||
}
|
||||
|
||||
if (!empty($claim_type_id)) {
|
||||
$builder->where('tm.claim_type', $claim_type_id);
|
||||
}
|
||||
|
||||
if (!empty($claim_status_id)) {
|
||||
$builder->where('tm.claim_status_id', $claim_status_id);
|
||||
}
|
||||
|
||||
if (!empty($insurer_id)) {
|
||||
$builder->where('tm.insurer_id', $insurer_id);
|
||||
}
|
||||
|
||||
if (!empty($from_date) && !empty($to_date)) {
|
||||
$builder->where('tm.created_at >=', $from_date . ' 00:00:00')
|
||||
->where('tm.created_at <=', $to_date . ' 23:59:59');
|
||||
}
|
||||
|
||||
$data = $builder->get()->getResultArray();
|
||||
|
||||
foreach ($data as $key => $row) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user