FIX_Motor Claims Option added
This commit is contained in:
parent
4b3793a645
commit
05aa07cca7
@ -750,9 +750,10 @@ class TicketController extends BaseController
|
|||||||
->where('owner', $id)
|
->where('owner', $id)
|
||||||
->findAll();
|
->findAll();
|
||||||
|
|
||||||
$data['partner_policy_list'] = $this->partnerPolicyModel
|
// $data['partner_policy_list'] = $this->partnerPolicyModel
|
||||||
->where('is_active', 1)
|
// ->where('is_active', 1)
|
||||||
->findAll();
|
// ->findAll();
|
||||||
|
$data['partner_policy_list'] = $this->partnerPolicyModel->partnerPolicyList();
|
||||||
|
|
||||||
$client = $this->clientModel
|
$client = $this->clientModel
|
||||||
->where('is_active', 1)
|
->where('is_active', 1)
|
||||||
@ -871,6 +872,15 @@ class TicketController extends BaseController
|
|||||||
{
|
{
|
||||||
// $ticket_data = $this->ticketMasterModel->where('id', $ticket_id)->where('is_active', 1)->first();
|
// $ticket_data = $this->ticketMasterModel->where('id', $ticket_id)->where('is_active', 1)->first();
|
||||||
$ticket_data = $this->ticketMasterModel->getTicketDataByTicketID($ticket_id);
|
$ticket_data = $this->ticketMasterModel->getTicketDataByTicketID($ticket_id);
|
||||||
|
if($ticket_data['ticket_type_id'] == 8){
|
||||||
|
$this->motor_claim($ticket_data,$ticket_id);
|
||||||
|
}else{
|
||||||
|
$this->other_claim($ticket_data,$ticket_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function other_claim($ticket_data,$ticket_id)
|
||||||
|
{
|
||||||
$ticket_data = $this->formatDateForClaim($ticket_data, 'd/m/Y');
|
$ticket_data = $this->formatDateForClaim($ticket_data, 'd/m/Y');
|
||||||
|
|
||||||
if (in_array($ticket_data['claim_status_id'], [15, 25, 35])) {
|
if (in_array($ticket_data['claim_status_id'], [15, 25, 35])) {
|
||||||
@ -932,6 +942,21 @@ class TicketController extends BaseController
|
|||||||
return $this->loadLayout('ticket_edit_onbording', $data);
|
return $this->loadLayout('ticket_edit_onbording', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function motor_claim($ticket_data,$ticket_id)
|
||||||
|
{
|
||||||
|
$claim_status_id = $ticket_data['claim_status_id'];
|
||||||
|
$ticket_type = $ticket_data['ticket_type_id'];
|
||||||
|
|
||||||
|
$data['selected_ticket_type'] = $ticket_type;
|
||||||
|
$data['ticket_type'] = [ 8 => 'Motor' ];
|
||||||
|
$data['ticket_data'] = $ticket_data;
|
||||||
|
// print_r($ticket_data);die;
|
||||||
|
$data['claim_status'] = $this->transFormClaimStatus($claim_status_id, $ticket_type);
|
||||||
|
$data['client_for_motor'] = $this->clientModel->select('id,client_name')->where('client_type', 2)->where('is_active', 1)->findAll();
|
||||||
|
// print_r($data);die;
|
||||||
|
return $this->loadLayout('ticket_form_motor', $data);
|
||||||
|
}
|
||||||
|
|
||||||
public function formatDateForClaim($ticket_data, $out_put_format = 'Y-m-d')
|
public function formatDateForClaim($ticket_data, $out_put_format = 'Y-m-d')
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -38,5 +38,35 @@ class PartnerPolicyModel extends Model
|
|||||||
protected $createdField = 'created_on';
|
protected $createdField = 'created_on';
|
||||||
protected $updatedField = 'updated_on';
|
protected $updatedField = 'updated_on';
|
||||||
protected $dateFormat = 'datetime';
|
protected $dateFormat = 'datetime';
|
||||||
|
|
||||||
|
|
||||||
|
public function partnerPolicyList()
|
||||||
|
{
|
||||||
|
return $this->db->table('partner_policy as pp')
|
||||||
|
->select('
|
||||||
|
pp.id,
|
||||||
|
pp.id as partner_policy_id,
|
||||||
|
pp.enquiry_id,
|
||||||
|
pp.insured_name,
|
||||||
|
pp.policy_number,
|
||||||
|
pp.agent_id,
|
||||||
|
pp.manager_id,
|
||||||
|
pp.client_id,
|
||||||
|
pp.client_policy_id,
|
||||||
|
pp.is_active as partner_policy_is_active,
|
||||||
|
pe.insurer_id,
|
||||||
|
pe.is_active as partner_enquiry_is_active,
|
||||||
|
i.name as insurer_name,
|
||||||
|
i.short_name as insurer_short_name,
|
||||||
|
i.is_active as insurer_is_active
|
||||||
|
')
|
||||||
|
->join('partner_enquiry as pe', 'pe.id = pp.enquiry_id', 'left')
|
||||||
|
->join('insurers as i', 'i.id = pe.insurer_id', 'left')
|
||||||
|
->where('pp.is_active', 1)
|
||||||
|
->get()
|
||||||
|
->getResultArray();
|
||||||
|
}
|
||||||
|
// $data['partner_policy_list'] = $this->partnerPolicyModel
|
||||||
|
// ->where('is_active', 1)
|
||||||
|
// ->findAll();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,7 +79,10 @@ class TicketMasterModel extends Model
|
|||||||
'approved_description',
|
'approved_description',
|
||||||
'file_id',
|
'file_id',
|
||||||
'denial_letter',
|
'denial_letter',
|
||||||
|
|
||||||
|
'manager_id',
|
||||||
|
'agent_id' ,
|
||||||
|
'vehicle_id',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user