FIX_LIVE_UNHANDLED_ISSUES
This commit is contained in:
parent
236cf58e0f
commit
411249fd63
@ -279,7 +279,7 @@ class EmployeeController extends AdminController
|
||||
|
||||
$data['fileList'] = $this->fileModel
|
||||
->select([
|
||||
'files.*',
|
||||
'files.id','files.file_name','files.created_by','files.created_at','files.is_active','files.status','files.client_id','files.policy_id','files.client_branch_id','files.action','files.uploaded_by',
|
||||
'up.emp_code',
|
||||
'up.first_name',
|
||||
'c.short_name',
|
||||
@ -301,9 +301,10 @@ class EmployeeController extends AdminController
|
||||
->join('client_branch cb', 'files.client_branch_id = cb.id', 'left')
|
||||
->join('policy_type', 'policy_type.id = cp.policy_type_id')
|
||||
->join('clients c', 'files.client_id = c.id and files.client_id = cp.client_id', 'left')
|
||||
->where('files.created_by', get_session_userid())
|
||||
// ->where('files.created_by', get_session_userid())
|
||||
->orderBy('files.created_at', 'desc')
|
||||
->findAll();
|
||||
->limit(100)
|
||||
->find();
|
||||
// dd($data['fileList']);
|
||||
|
||||
$data['batch_list'] = $this->batchFileModel->select(
|
||||
@ -318,7 +319,8 @@ class EmployeeController extends AdminController
|
||||
->join('policy_type', 'policy_type.id = client_policy.policy_type_id')
|
||||
->join('clients', 'clients.id = client_policy.client_id')
|
||||
->orderBy('batch_files.id', 'desc')
|
||||
->findAll();
|
||||
->limit(100)
|
||||
->find();
|
||||
|
||||
|
||||
// dd($data['fileList']);die();
|
||||
|
||||
@ -804,6 +804,7 @@ class EmployeeRestController extends AdminController
|
||||
'basic_pay'=> $extra['11'][$index],
|
||||
'unit'=> isset($extra['12'][$index]) ? $extra['12'][$index] : null,
|
||||
'client_branch_id' => $client_branch_id
|
||||
'date_coverage' => $extra['13'][$index]
|
||||
|
||||
];
|
||||
$basic_cover_si_value = null;
|
||||
@ -840,6 +841,8 @@ class EmployeeRestController extends AdminController
|
||||
$count = 0;
|
||||
for ($a=0; $a <count($dataToInsert) ; $a++)
|
||||
{
|
||||
$date_coverage = $dataToInsert[$a]['date_coverage'];
|
||||
unset($dataToInsert[$a]['date_coverage']);
|
||||
$employee = $this->employeeModel->checkExistingEmployee($dataToInsert[$a],$client_branch_id);
|
||||
$emp_id =0;
|
||||
|
||||
@ -891,6 +894,7 @@ class EmployeeRestController extends AdminController
|
||||
'employee_id'=>$emp_id,
|
||||
'client_policy_id'=>$policy_id,
|
||||
'status'=> 'draft',
|
||||
'date_coverage' => $date_coverage
|
||||
'basic_cover_si'=>isset($basic_cover_si[$a]) ? $basic_cover_si[$a] : null
|
||||
];
|
||||
|
||||
|
||||
@ -594,6 +594,15 @@ class EmployeeServiceController extends AdminController
|
||||
'data_type' => 'str',
|
||||
'format' => null,
|
||||
'allowed_values' => null
|
||||
],
|
||||
'doc' => [
|
||||
'col_idx' => 13,
|
||||
'col_cell_name' => 'N',
|
||||
'col_name' => 'DOC',
|
||||
'is_mandatory' => false,
|
||||
'data_type' => 'str',
|
||||
'format' => 'd-M-Y',
|
||||
'allowed_values' => null
|
||||
]
|
||||
];
|
||||
|
||||
@ -605,7 +614,7 @@ class EmployeeServiceController extends AdminController
|
||||
4 => 4, // inception: gender (Gender) -> enrollment: gender (Gender)
|
||||
5 => 5, // inception: relationship (RELATIONSHIP) -> enrollment: relationship (Relation)
|
||||
6 => 9, // inception: basic_cover_si (BASIC COVER SI) -> enrollment: basic_cover_si (SI)
|
||||
7 => null, // inception: doc (Date of Coverage) -> No match in enrollment
|
||||
7 => 13, // inception: doc (Date of Coverage)
|
||||
8 => 3, // inception: doj (DOJ) -> enrollment: doj (DOJ)
|
||||
9 => 11, // inception: basic_pay (Basic Pay) -> enrollment: basic_pay (Basic Pay)
|
||||
10 => 10, // inception: band_grade (Band/Grade) -> enrollment: band_grade (Grade)
|
||||
@ -1249,7 +1258,7 @@ class EmployeeServiceController extends AdminController
|
||||
//get policy slab rates
|
||||
$slab_details = $this->policiesModel->getPolicySlabRatesForEmpOnboard($client_policy_id,$client_id);
|
||||
|
||||
$existing_famility_details = $this->employeeModel->getEmpFamilybyEmpCode(client_id: $client_id,client_policy_id: $client_policy_id,emp_status: ['enrolled','draft'],policy_status:['enrolled','draft']);
|
||||
$existing_famility_details = $this->employeeModel->getEmpFamilybyEmpCode(client_id: $client_id,client_policy_id: $client_policy_id,emp_status: ['enrolled'],policy_status:['enrolled']);
|
||||
|
||||
// $file = ['id' => null,'client_id' => $client_id,'policy_id' => $client_policy_id,'action' => 'inception'];
|
||||
$file = ['id' => null,'client_id' => $client_id,'policy_id' => $client_policy_id,'action' => 'inception','created_by' => get_session_userid(),'client_branch_id' => $params['client_branch_id']];
|
||||
@ -1613,6 +1622,7 @@ class EmployeeServiceController extends AdminController
|
||||
$value['emp_status'] = 'active';
|
||||
$value['created_by'] = $file['created_by'];
|
||||
$value['client_branch_id'] = $file['client_branch_id'];
|
||||
$value['family_floater_key'] = generate_family_floater_key($value['relationship']);
|
||||
$log_message = 'Insert Employee- '.$value['name'] .'('.$value['emp_code'] .') with PK ';
|
||||
// $this->myLogger->logme('error',('Insert - ' . $value['emp_code'] .' - '. $value['name']));
|
||||
// echo 'update emp';
|
||||
@ -1983,7 +1993,7 @@ public function employeesEnrollmentInsert($params)
|
||||
$value['file_id'] = $file_id;
|
||||
|
||||
$value['temp']['emp_id'] = null; // dummy value for using exisitng funciton in model
|
||||
if (strtolower(trim($value['relationship'])) === 'mother' || strtolower(trim($value['relationship'])) === 'Father') {
|
||||
if (strtolower(trim($value['relationship'])) === 'mother' || strtolower(trim($value['relationship'])) === 'father') {
|
||||
$relation = 'parent';
|
||||
} else if(strtolower(trim($value['relationship'])) === 'son' || strtolower(trim($value['relationship'])) === 'daughter'){
|
||||
$relation = 'child';
|
||||
@ -1997,6 +2007,7 @@ public function employeesEnrollmentInsert($params)
|
||||
$value['family_floater_key'] = $relation;
|
||||
|
||||
$policy_data['basic_cover_si'] = $row[9];
|
||||
$policy_data['date_coverage'] = $row[13];
|
||||
$policy_data['client_policy_id'] = $file['policy_id'];
|
||||
|
||||
$employee = $this->employeeModel->checkExistingEmployee($value,$file['client_branch_id']);
|
||||
|
||||
@ -1800,7 +1800,7 @@ if(!function_exists('transform_enrollment_row_to_inception_row'))
|
||||
$res[4] = $row[4]; // inception: gender (Gender) -> enrollment: gender (Gender)
|
||||
$res[5] = $row[5]; // inception: relationship (RELATIONSHIP) -> enrollment: relationship (Relation)
|
||||
$res[6] = $row[9]; // inception: basic_cover_si (BASIC COVER SI) -> enrollment: basic_cover_si (SI)
|
||||
$res[7] = null; // inception: doc (Date of Coverage) -> No match in enrollment
|
||||
$res[7] = $row[13]; // inception: doc (Date of Coverage) -> No match in enrollment
|
||||
$res[8] = $row[3]; // inception: doj (DOJ) -> enrollment: doj (DOJ)
|
||||
$res[9] = $row[11]; // inception: basic_pay (Basic Pay) -> enrollment: basic_pay (Basic Pay)
|
||||
$res[10] = $row[10]; // inception: band_grade (Band/Grade) -> enrollment: band_grade (Grade)
|
||||
@ -2119,4 +2119,24 @@ if(!function_exists('group_slab_rates_basedon_name'))
|
||||
|
||||
return $temp_slab_rates;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//this key generating mandantory for display employee info in enrolment app w/o error
|
||||
if(!function_exists('generate_family_floater_key'))
|
||||
{
|
||||
function generate_family_floater_key($relationship)
|
||||
{
|
||||
if (strtolower(trim($relationship)) === 'mother' || strtolower(trim($relationship)) === 'father') {
|
||||
$relation = 'parent';
|
||||
} else if(strtolower(trim($relationship)) === 'son' || strtolower(trim($relationship)) === 'daughter'){
|
||||
$relation = 'child';
|
||||
}else if(strtolower(trim($relationship)) === 'father in Law' || strtolower(trim($relationship)) === 'mother in Law'){
|
||||
$relation = 'parent_in_law';
|
||||
}else if(strtolower(trim($relationship)) === 'spouse'){
|
||||
$relation = 'spouse';
|
||||
}else{
|
||||
$relation = 'self';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -67,7 +67,7 @@
|
||||
|
||||
<td><?php echo format_indian_number($file['amount'])?></td>
|
||||
<td class="reload">
|
||||
<?php echo date('d-M-Y H:i:a', strtotime($file['created_at'])) ?> by <?php echo get_username($file['created_by']) ?>
|
||||
<?php echo change_date_format($file['created_at'],'Y-m-d H:i:s', 'd M Y h:i a') ?> by <?php echo get_username($file['created_by']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($file['status'] == 'failed') { ?>
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
<!-- <td><?php echo isset($file['policy_name']) ? $file['policy_name'] : '' ?> - <?php echo isset($file['policy_no']) ? $file['policy_no'] : '' ?> - <?php echo isset($file['policy_type']) ? $file['policy_type'] : '' ?></td> -->
|
||||
<td><?php echo isset($file['policy_type']) ? $file['policy_type'] : '' ?> - <?php echo isset($file['policy_no']) ? $file['policy_no'] : '' ?></td>
|
||||
<td><?php echo $file['action'] ?></td>
|
||||
<td><?php echo fancy_date_time_format($file['created_at']) . ' by <strong>' . $file['first_name'] . '</strong>' ?>
|
||||
<td><?php echo change_date_format($file['created_at'],'Y-m-d H:i:s', 'd M Y h:i a') . ' by <strong>' . $file['first_name'] . '</strong>' ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
|
||||
Loading…
Reference in New Issue
Block a user