CHANGE_BDS_ISSUES : RV
This commit is contained in:
parent
c90e2205e6
commit
e9e3cd84c8
@ -2002,13 +2002,14 @@ class ClientController extends AdminController
|
||||
->join('policy_type', 'policy_type.id = policies.policy_type_id')
|
||||
->where(['policies.insurer_id' => $insurer_id, 'policies.is_active' => 1])
|
||||
->findAll();
|
||||
|
||||
$client_policy_list = $this->clientPolicyModel->getPolicyTypeForPolicyBinding($client_id);
|
||||
$cd_data = $this->CDMasterModel->where('client_id', $client_id)->where('insurer_id', $insurer_id)->findAll();
|
||||
$client_policy_data['policy_end_date'] = date('d/m/Y', strtotime($client_policy_data['policy_end_date']));
|
||||
$fromDate = $client_policy_data['policy_end_date'];
|
||||
$date = \DateTime::createFromFormat('d/m/Y', $fromDate);
|
||||
$date->modify('+1 year');
|
||||
$newDate = $date->format('d/m/Y');
|
||||
// $client_policy_data['policy_end_date'] = date('d/m/Y', strtotime($client_policy_data['policy_end_date']));
|
||||
$fromDate = new \DateTime($client_policy_data['policy_end_date']);
|
||||
$fromDate->modify('+1 year');
|
||||
$newDate = $fromDate->format('d/m/Y');
|
||||
|
||||
|
||||
// print_rr($client_policy_data['policy_end_date']);die();
|
||||
|
||||
@ -2020,7 +2021,8 @@ class ClientController extends AdminController
|
||||
"insurer_id" => $client_policy_data['insurer_id'],
|
||||
'policy' => $polices,
|
||||
'client_policy_list' => $client_policy_list,
|
||||
'end_date' => $newDate
|
||||
'end_date' => $newDate,
|
||||
'new_start_date' => date('d/m/Y', strtotime($client_policy_data['policy_end_date']))
|
||||
], 200);
|
||||
} else {
|
||||
return $this->respond(['status' => false, 'code' => 404, 'message' => 'no data found'], 200);
|
||||
|
||||
@ -2700,7 +2700,7 @@ class PolicyTransactionController extends BaseController
|
||||
// Build query
|
||||
$db = db_connect();
|
||||
$builder = $db->table("cash_deposit")
|
||||
->where('cd_ac_no', $cd_ac_no)
|
||||
->where('cd_ac_pk', $cd_ac_no)
|
||||
->where('is_active', 1)
|
||||
->orderBy('id', 'desc')
|
||||
->limit(1);
|
||||
@ -2715,6 +2715,8 @@ class PolicyTransactionController extends BaseController
|
||||
'status' => true,
|
||||
'code' => 200,
|
||||
'data' => $result,
|
||||
'base_premium' => $base_premium,
|
||||
'cd_ac_no' => $cd_ac_no,
|
||||
'base_premium_greater_than_balance' => $base_premium_greater_than_balance,
|
||||
], 200);
|
||||
}
|
||||
|
||||
@ -501,8 +501,8 @@ class PolicyTransactionModel extends Model
|
||||
->join('user_profiles', 'policy_transaction.created_by = user_profiles.id', 'left')
|
||||
->join('vehicle', 'policy_transaction.vehicle_id = vehicle.id', 'left')
|
||||
->join('policy_type', 'policy_transaction.policy_type_id = policy_type.id', 'left')
|
||||
->join('insurers', 'policy_transaction.insurer_id = insurers.id', 'left')
|
||||
->join('insurer_branch', 'policy_transaction.insurer_branch_id = insurer_branch.id', 'left')
|
||||
->join('insurers', 'pt_co_share_details.insurer_id = insurers.id', 'left')
|
||||
->join('insurer_branch', 'pt_co_share_details.insurer_branch_id = insurer_branch.id', 'left')
|
||||
->join('tpa', 'policy_transaction.tpa_id = tpa.id', 'left')
|
||||
->join('tpa_branch', 'policy_transaction.tpa_branch_id = tpa_branch.id', 'left')
|
||||
->join('user_profiles AS sales_user', 'policy_transaction.sales_generated_by = sales_user.id', 'left')
|
||||
|
||||
@ -804,7 +804,7 @@
|
||||
$(`#tpa_${i}`).val(tpa).trigger('change');
|
||||
$(`#proposed_insurer_${i}`).val(insurer).trigger('change');
|
||||
$(`#proposed_tpa_${i}`).val(tpa).trigger('change');
|
||||
$('#policy_start_date').val(res.data.policy_end_date);
|
||||
$('#policy_start_date').val(res.new_start_date);
|
||||
$('#policy_end_date').val(res.end_date);
|
||||
console.log($(`#policy_type_id_${i}_${random_id}`));
|
||||
console.log($(`#insurer_${i}`));
|
||||
|
||||
@ -3543,7 +3543,7 @@ $('#setInsurerCount').on('click', function() {
|
||||
|
||||
function addInsurerColumn() {
|
||||
|
||||
insurerCount++;
|
||||
insurerCount = insurerCount + 1;
|
||||
|
||||
// hidePermiumDetailsBasedOnTheTeam()
|
||||
|
||||
@ -4087,6 +4087,7 @@ function populateTable(dataArray, cd_ac_pk) {
|
||||
|
||||
// console.log('data.cd_ac_pk', cd_ac_pk)
|
||||
if(data.co_share_type == 1){
|
||||
if(index == 0) { index = 1;}
|
||||
getCdAmount(cd_ac_pk, index);
|
||||
}
|
||||
});
|
||||
@ -4232,7 +4233,7 @@ function checkCDAmountForBasePremium(input) {
|
||||
|
||||
function getCdAmount(cd_ac_pk, increment){
|
||||
|
||||
increment = increment + 1
|
||||
// increment = increment + 1
|
||||
console.log('cd_ac_pk', cd_ac_pk);
|
||||
console.log('increment', increment);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user