CHANGE_BDS_ALL_FILTER_POLICY_ISSUE_DATE_TO_PT_CO_SHARE
This commit is contained in:
parent
f90b464feb
commit
d48f5ddcf4
@ -1394,9 +1394,9 @@ class EmployeeServiceController extends AdminController
|
|||||||
|
|
||||||
// Kint::dump($family);
|
// Kint::dump($family);
|
||||||
$data = calculate_premium_new(family_data:$family,policy_terms: $policy_terms,slab_details : $slab_details,fileArr: $file, existing_units:$existing_units);
|
$data = calculate_premium_new(family_data:$family,policy_terms: $policy_terms,slab_details : $slab_details,fileArr: $file, existing_units:$existing_units);
|
||||||
if($file['action'] == 'dependent_addition') {
|
// if($file['action'] == 'dependent_addition') {
|
||||||
$data = validatet_family_floter_rata_premium($data);
|
// $data = validatet_family_floter_rata_premium($data);
|
||||||
}
|
// }
|
||||||
// dd($data);
|
// dd($data);
|
||||||
$employee_data_group_by_family[$emp_id] = $data;
|
$employee_data_group_by_family[$emp_id] = $data;
|
||||||
$this->employeesOnboardProcess(['familiy_data' => $data,'file' => $file]);
|
$this->employeesOnboardProcess(['familiy_data' => $data,'file' => $file]);
|
||||||
|
|||||||
@ -1022,8 +1022,8 @@ if (!function_exists('transform_excel_data_to_db')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!function_exists('premium_calculation_manager_old')) {
|
if (!function_exists('premium_calculation_manager')) {
|
||||||
function premium_calculation_manager_old($emp_data, $policy_terms, $slab_details, $default_si = null)
|
function premium_calculation_manager($emp_data, $policy_terms, $slab_details, $default_si = null)
|
||||||
{
|
{
|
||||||
// dd($emp_data,$policy_terms,$slab_details,$default_si);
|
// dd($emp_data,$policy_terms,$slab_details,$default_si);
|
||||||
|
|
||||||
@ -1429,8 +1429,8 @@ if (!function_exists('premium_calculation_manager_old')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!function_exists('premium_calculation_manager')) {
|
if (!function_exists('premium_calculation_manager_new')) {
|
||||||
function premium_calculation_manager($emp_data, $policy_terms, $slab_details, $default_si = null)
|
function premium_calculation_manager_new($emp_data, $policy_terms, $slab_details, $default_si = null)
|
||||||
{
|
{
|
||||||
// dd($emp_data,$policy_terms,$slab_details,$default_si);
|
// dd($emp_data,$policy_terms,$slab_details,$default_si);
|
||||||
|
|
||||||
|
|||||||
@ -826,9 +826,17 @@
|
|||||||
$startDate = date('Y-m-d 00:00:00', strtotime($start_date));
|
$startDate = date('Y-m-d 00:00:00', strtotime($start_date));
|
||||||
$endDate = date('Y-m-d 23:59:59', strtotime($end_date));
|
$endDate = date('Y-m-d 23:59:59', strtotime($end_date));
|
||||||
|
|
||||||
|
// $builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
||||||
|
// ->where('policy_transaction.' . $date_type . '<=', $endDate);
|
||||||
|
|
||||||
|
if($date_type == "policy_issue_date"){
|
||||||
|
$builder->where("pt_co_share_details.pt_policy_issue_date >=", $startDate)
|
||||||
|
->where("pt_co_share_details.pt_policy_issue_date <=", $endDate);
|
||||||
|
}else{
|
||||||
$builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
$builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
||||||
->where('policy_transaction.' . $date_type . '<=', $endDate);
|
->where('policy_transaction.' . $date_type . '<=', $endDate);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// if($date_type == 'statement_month' && $start_date != 0 && $end_date != 0){
|
// if($date_type == 'statement_month' && $start_date != 0 && $end_date != 0){
|
||||||
|
|
||||||
@ -1043,8 +1051,18 @@
|
|||||||
|
|
||||||
// Optimize Date Filtering
|
// Optimize Date Filtering
|
||||||
if (!empty($start_date) && !empty($end_date) && !empty($date_type)) {
|
if (!empty($start_date) && !empty($end_date) && !empty($date_type)) {
|
||||||
$builder->where("policy_transaction.$date_type >=", date('Y-m-d 00:00:00', strtotime($start_date)))
|
|
||||||
->where("policy_transaction.$date_type <=", date('Y-m-d 23:59:59', strtotime($end_date)));
|
$startDate = change_date_format($start_date, 'd/m/Y', 'Y-m-d 00:00:00');
|
||||||
|
$endDate = change_date_format($end_date, 'd/m/Y', 'Y-m-d 23:59:59');
|
||||||
|
|
||||||
|
if($date_type == "policy_issue_date"){
|
||||||
|
$builder->where("pt_co_share_details.pt_policy_issue_date >=", $startDate)
|
||||||
|
->where("pt_co_share_details.pt_policy_issue_date <=", $endDate);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$builder->where("policy_transaction.$date_type >=", $startDate)
|
||||||
|
->where("policy_transaction.$date_type <=", $startDate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply Filters Only When Necessary
|
// Apply Filters Only When Necessary
|
||||||
@ -1080,6 +1098,7 @@
|
|||||||
// Optimize Query Execution
|
// Optimize Query Execution
|
||||||
$builder->orderBy('policy_transaction.id', 'desc');
|
$builder->orderBy('policy_transaction.id', 'desc');
|
||||||
$data = $builder->get()->getResultArray();
|
$data = $builder->get()->getResultArray();
|
||||||
|
// dd($this->db->getLastQuery());
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1134,11 +1153,17 @@
|
|||||||
|
|
||||||
if ($start_date != 0 && $end_date != 0 && $date_type != 0) {
|
if ($start_date != 0 && $end_date != 0 && $date_type != 0) {
|
||||||
|
|
||||||
$startDate = date('Y-m-d 00:00:00', strtotime($start_date));
|
$startDate = change_date_format($start_date, 'd/m/Y', 'Y-m-d 00:00:00');
|
||||||
$endDate = date('Y-m-d 23:59:59', strtotime($end_date));
|
$endDate = change_date_format($end_date, 'd/m/Y', 'Y-m-d 23:59:59');
|
||||||
|
|
||||||
|
if($date_type == "policy_issue_date"){
|
||||||
|
$builder->where("pt_co_share_details.pt_policy_issue_date >=", $startDate)
|
||||||
|
->where("pt_co_share_details.pt_policy_issue_date <=", $endDate);
|
||||||
|
}else{
|
||||||
$builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
$builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
||||||
->where('policy_transaction.' . $date_type . '<=', $endDate);
|
->where('policy_transaction.' . $date_type . '<=', $endDate);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// $fromDate = date('Y-m-d', strtotime('-30 days'));
|
// $fromDate = date('Y-m-d', strtotime('-30 days'));
|
||||||
@ -1177,7 +1202,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$builder->orderBy('policy_transaction.id', 'desc');
|
$builder->orderBy('policy_transaction.id', 'desc');
|
||||||
|
// dd($this->db->getLastQuery());
|
||||||
return $builder->get()->getResultArray();
|
return $builder->get()->getResultArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1315,8 +1340,17 @@
|
|||||||
$startDate = date('Y-m-d 00:00:00', strtotime($start_date));
|
$startDate = date('Y-m-d 00:00:00', strtotime($start_date));
|
||||||
$endDate = date('Y-m-d 23:59:59', strtotime($end_date));
|
$endDate = date('Y-m-d 23:59:59', strtotime($end_date));
|
||||||
|
|
||||||
|
// $builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
||||||
|
// ->where('policy_transaction.' . $date_type . '<=', $endDate);
|
||||||
|
|
||||||
|
if($date_type == "policy_issue_date"){
|
||||||
|
$builder->where("pt_co_share_details.pt_policy_issue_date >=", $startDate)
|
||||||
|
->where("pt_co_share_details.pt_policy_issue_date <=", $endDate);
|
||||||
|
}else{
|
||||||
$builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
$builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
||||||
->where('policy_transaction.' . $date_type . '<=', $endDate);
|
->where('policy_transaction.' . $date_type . '<=', $endDate);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$fromDate = date('Y-m-d', strtotime('-90 days'));
|
$fromDate = date('Y-m-d', strtotime('-90 days'));
|
||||||
@ -1356,8 +1390,10 @@
|
|||||||
|
|
||||||
|
|
||||||
$builder->orderBy('policy_transaction.id', 'desc');
|
$builder->orderBy('policy_transaction.id', 'desc');
|
||||||
|
$return_data = $builder->get()->getResultArray();
|
||||||
|
// dd(db_connect()->getLastQuery());
|
||||||
|
|
||||||
return $builder->get()->getResultArray();
|
return $return_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBusinessReportList($start_date = 0, $end_date = 0, $client_id = 0, $insurer_id = 0, $policy_type_id = 0, $date_type = 0, $issuer = 0, $status = 0)
|
public function getBusinessReportList($start_date = 0, $end_date = 0, $client_id = 0, $insurer_id = 0, $policy_type_id = 0, $date_type = 0, $issuer = 0, $status = 0)
|
||||||
@ -1418,8 +1454,16 @@
|
|||||||
$startDate = date('Y-m-d 00:00:00', strtotime($start_date));
|
$startDate = date('Y-m-d 00:00:00', strtotime($start_date));
|
||||||
$endDate = date('Y-m-d 23:59:59', strtotime($end_date));
|
$endDate = date('Y-m-d 23:59:59', strtotime($end_date));
|
||||||
|
|
||||||
|
// $builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
||||||
|
// ->where('policy_transaction.' . $date_type . '<=', $endDate);
|
||||||
|
|
||||||
|
if($date_type == "policy_issue_date"){
|
||||||
|
$builder->where("pt_co_share_details.pt_policy_issue_date >=", $startDate)
|
||||||
|
->where("pt_co_share_details.pt_policy_issue_date <=", $endDate);
|
||||||
|
}else{
|
||||||
$builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
$builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
||||||
->where('policy_transaction.' . $date_type . '<=', $endDate);
|
->where('policy_transaction.' . $date_type . '<=', $endDate);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$fromDate = date('Y-m-d', strtotime('-90 days'));
|
$fromDate = date('Y-m-d', strtotime('-90 days'));
|
||||||
@ -1521,8 +1565,17 @@
|
|||||||
$startDate = date('Y-m-d 00:00:00', strtotime($start_date));
|
$startDate = date('Y-m-d 00:00:00', strtotime($start_date));
|
||||||
$endDate = date('Y-m-d 23:59:59', strtotime($end_date));
|
$endDate = date('Y-m-d 23:59:59', strtotime($end_date));
|
||||||
|
|
||||||
|
// $builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
||||||
|
// ->where('policy_transaction.' . $date_type . '<=', $endDate);
|
||||||
|
|
||||||
|
if($date_type == "policy_issue_date"){
|
||||||
|
$builder->where("pt_co_share_details.pt_policy_issue_date >=", $startDate)
|
||||||
|
->where("pt_co_share_details.pt_policy_issue_date <=", $endDate);
|
||||||
|
}else{
|
||||||
$builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
$builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
||||||
->where('policy_transaction.' . $date_type . '<=', $endDate);
|
->where('policy_transaction.' . $date_type . '<=', $endDate);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$fromDate = date('Y-m-d', strtotime('-90 days'));
|
$fromDate = date('Y-m-d', strtotime('-90 days'));
|
||||||
@ -1627,8 +1680,16 @@
|
|||||||
$startDate = date('Y-m-d 00:00:00', strtotime($start_date));
|
$startDate = date('Y-m-d 00:00:00', strtotime($start_date));
|
||||||
$endDate = date('Y-m-d 23:59:59', strtotime($end_date));
|
$endDate = date('Y-m-d 23:59:59', strtotime($end_date));
|
||||||
|
|
||||||
|
// $builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
||||||
|
// ->where('policy_transaction.' . $date_type . '<=', $endDate);
|
||||||
|
|
||||||
|
if($date_type == "policy_issue_date"){
|
||||||
|
$builder->where("pt_co_share_details.pt_policy_issue_date >=", $startDate)
|
||||||
|
->where("pt_co_share_details.pt_policy_issue_date <=", $endDate);
|
||||||
|
}else{
|
||||||
$builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
$builder->where('policy_transaction.' . $date_type . '>=', $startDate)
|
||||||
->where('policy_transaction.' . $date_type . '<=', $endDate);
|
->where('policy_transaction.' . $date_type . '<=', $endDate);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$fromDate = date('Y-m-d', strtotime('-90 days'));
|
$fromDate = date('Y-m-d', strtotime('-90 days'));
|
||||||
$toDate = date('Y-m-d 23:59:59');
|
$toDate = date('Y-m-d 23:59:59');
|
||||||
|
|||||||
@ -440,7 +440,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr id="table_tr_40" >
|
<tr id="table_tr_40" >
|
||||||
<td>Policy Issue Date</td>
|
<td>Endorsement Issue Date</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr id="table_tr_3" style="display: none;">
|
<tr id="table_tr_3" style="display: none;">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user