FEAT_REG_NO
This commit is contained in:
parent
2eb2c58915
commit
cc579a9a77
@ -64,7 +64,7 @@ class ClaimController extends ResourceController
|
|||||||
$to_date = $this->request->getGet('to_date');
|
$to_date = $this->request->getGet('to_date');
|
||||||
|
|
||||||
$builder = $this->db->table('partner_claims pc')
|
$builder = $this->db->table('partner_claims pc')
|
||||||
->select('pc.*,
|
->select("pc.*,
|
||||||
i.name as insurer_name,
|
i.name as insurer_name,
|
||||||
i.short_name as insurer_short_name,
|
i.short_name as insurer_short_name,
|
||||||
pct.claim_type as claim_type_value,
|
pct.claim_type as claim_type_value,
|
||||||
@ -73,7 +73,12 @@ class ClaimController extends ResourceController
|
|||||||
tcs.claim_status as claim_status_value,
|
tcs.claim_status as claim_status_value,
|
||||||
pp.start_date as policy_start_date,
|
pp.start_date as policy_start_date,
|
||||||
pp.end_date as policy_end_date,
|
pp.end_date as policy_end_date,
|
||||||
pp.rc_no as reg_no')
|
pp.rc_no as reg_no,
|
||||||
|
CASE
|
||||||
|
WHEN pc.reg_no IS NULL OR pc.reg_no = '' THEN pp.rc_no
|
||||||
|
ELSE pc.reg_no
|
||||||
|
END AS reg_no
|
||||||
|
")
|
||||||
->join('insurers i', 'i.id = pc.insurer_id', 'left')
|
->join('insurers i', 'i.id = pc.insurer_id', 'left')
|
||||||
->join('partner_claim_type_master pct', 'pct.id = pc.claim_type', 'left')
|
->join('partner_claim_type_master pct', 'pct.id = pc.claim_type', 'left')
|
||||||
->join('partner_agent pa', 'pa.id = pc.agent_id', 'left')
|
->join('partner_agent pa', 'pa.id = pc.agent_id', 'left')
|
||||||
@ -200,6 +205,7 @@ class ClaimController extends ResourceController
|
|||||||
'remark' => $reqData['remark'] ?? null,
|
'remark' => $reqData['remark'] ?? null,
|
||||||
'is_active' => 1,
|
'is_active' => 1,
|
||||||
'created_by' => $reqData['created_by'] ?? null,
|
'created_by' => $reqData['created_by'] ?? null,
|
||||||
|
'reg_no' => $reqData['reg_no'] ?? null,
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->db->transStart();
|
$this->db->transStart();
|
||||||
@ -352,7 +358,7 @@ class ClaimController extends ResourceController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$claim = $this->db->table('partner_claims pc')
|
$claim = $this->db->table('partner_claims pc')
|
||||||
->select('pc.*,
|
->select("pc.*,
|
||||||
i.name as insurer_name,
|
i.name as insurer_name,
|
||||||
i.short_name as insurer_short_name,
|
i.short_name as insurer_short_name,
|
||||||
pct.claim_type as claim_type_value,
|
pct.claim_type as claim_type_value,
|
||||||
@ -361,7 +367,12 @@ class ClaimController extends ResourceController
|
|||||||
tcs.claim_status as claim_status_value,
|
tcs.claim_status as claim_status_value,
|
||||||
pp.start_date as policy_start_date,
|
pp.start_date as policy_start_date,
|
||||||
pp.end_date as policy_end_date,
|
pp.end_date as policy_end_date,
|
||||||
v.vehicle_no as reg_no')
|
|
||||||
|
CASE
|
||||||
|
WHEN pc.reg_no IS NULL OR pc.reg_no = '' THEN v.vehicle_no
|
||||||
|
ELSE pc.reg_no
|
||||||
|
END AS reg_no
|
||||||
|
")
|
||||||
->join('insurers i', 'i.id = pc.insurer_id', 'left')
|
->join('insurers i', 'i.id = pc.insurer_id', 'left')
|
||||||
->join('partner_claim_type_master pct', 'pct.id = pc.claim_type', 'left')
|
->join('partner_claim_type_master pct', 'pct.id = pc.claim_type', 'left')
|
||||||
->join('partner_agent pa', 'pa.id = pc.agent_id', 'left')
|
->join('partner_agent pa', 'pa.id = pc.agent_id', 'left')
|
||||||
|
|||||||
@ -38,6 +38,7 @@ class ClaimModel extends Model
|
|||||||
'updated_by',
|
'updated_by',
|
||||||
'claim_number',
|
'claim_number',
|
||||||
'policy_from',
|
'policy_from',
|
||||||
|
'reg_no',
|
||||||
];
|
];
|
||||||
|
|
||||||
// Auto timestamps
|
// Auto timestamps
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user