FIX_LIVE_ISSUE_BDS_ENDOREMENT_BRO_CALC : RV
This commit is contained in:
parent
a3339baf7c
commit
e006d76a99
@ -1209,6 +1209,10 @@ class PolicyTransactionController extends BaseController
|
|||||||
$client_branch_id = $issue_type['client_branch_id'];
|
$client_branch_id = $issue_type['client_branch_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if($data['bro_payable_by'] == ""){
|
||||||
|
// $data['bro_payable_by'] = $issue_type['bro_payable_by'];
|
||||||
|
// }
|
||||||
|
|
||||||
if (!$data['id']) {
|
if (!$data['id']) {
|
||||||
|
|
||||||
$data += [
|
$data += [
|
||||||
@ -1224,7 +1228,7 @@ class PolicyTransactionController extends BaseController
|
|||||||
'policy_end_date' => $issue_type['policy_end_date'] ?? null,
|
'policy_end_date' => $issue_type['policy_end_date'] ?? null,
|
||||||
'revenue_type' => $issue_type['revenue_type'] ?? null,
|
'revenue_type' => $issue_type['revenue_type'] ?? null,
|
||||||
'co_share' => $issue_type['co_share'] ?? 0,
|
'co_share' => $issue_type['co_share'] ?? 0,
|
||||||
'bro_payable_by' => $issue_type['bro_payable_by'] ?? 0,
|
'bro_payable_by' => $data['bro_payable_by'] == "" ? $issue_type['bro_payable_by'] ?? 0 : $data['bro_payable_by'],
|
||||||
'installment' => $issue_type['installment'] ?? null,
|
'installment' => $issue_type['installment'] ?? null,
|
||||||
'installment_data' => $issue_type['installment_data'] ?? null,
|
'installment_data' => $issue_type['installment_data'] ?? null,
|
||||||
'location' => $issue_type['location'] ?? null,
|
'location' => $issue_type['location'] ?? null,
|
||||||
|
|||||||
@ -427,7 +427,7 @@
|
|||||||
<td id="agree_tp_td">Agreed TEP %</td>
|
<td id="agree_tp_td">Agreed TEP %</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team())) { ?>
|
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team())) { ?>
|
||||||
|
|
||||||
<tr id="table_tr_17" <?= in_array(FINANCE_TEAM_ID, user_team()) ? 'style="display:none"' : '' ?>>
|
<tr id="table_tr_17" <?= in_array(FINANCE_TEAM_ID, user_team()) ? 'style="display:none"' : '' ?>>
|
||||||
<td>Agreed Amount</td>
|
<td>Agreed Amount</td>
|
||||||
@ -445,7 +445,7 @@
|
|||||||
<td>Standard TEP %</td>
|
<td>Standard TEP %</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if (in_array(FINANCE_TEAM_ID, user_team()) || in_array(MANAGEMENT_TEAM_ID, user_team())) { ?>
|
<?php if (in_array(in_array(get_role_id(), [1,5]) || FINANCE_TEAM_ID, user_team()) || in_array(MANAGEMENT_TEAM_ID, user_team())) { ?>
|
||||||
|
|
||||||
<tr id="table_tr_21">
|
<tr id="table_tr_21">
|
||||||
<td>Actual BP Amount</td>
|
<td>Actual BP Amount</td>
|
||||||
@ -520,6 +520,8 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
var team_id = [];
|
var team_id = [];
|
||||||
|
var role_id = <?php echo get_role_id(); ?>;
|
||||||
|
console.log(" role_id : ", role_id);
|
||||||
var insurer_count_array = [];
|
var insurer_count_array = [];
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
@ -643,7 +645,7 @@ $(document).ready(function(){
|
|||||||
$('#ct_type').val(2)
|
$('#ct_type').val(2)
|
||||||
$('#cd_ac_pk').val(res.is_copay_yes.cd_ac_pk);
|
$('#cd_ac_pk').val(res.is_copay_yes.cd_ac_pk);
|
||||||
$('#cd_ac_no').val(res.cd_master_data.cd_ac_no ?? "");
|
$('#cd_ac_no').val(res.cd_master_data.cd_ac_no ?? "");
|
||||||
$('#bro_payable_by').val(res.data[0].bro_payable_by)
|
$('#bro_payable_by').val(res.data[0].bro_payable_by);
|
||||||
|
|
||||||
if(res.is_copay_yes && res.is_copay_yes.co_share == 1){
|
if(res.is_copay_yes && res.is_copay_yes.co_share == 1){
|
||||||
// console.log('copay yes', res.is_copay_yes);
|
// console.log('copay yes', res.is_copay_yes);
|
||||||
@ -1034,14 +1036,18 @@ function amountCalculation(input) {
|
|||||||
console.log('############################## AMOUNT CALCULATION ############################################')
|
console.log('############################## AMOUNT CALCULATION ############################################')
|
||||||
console.log('amountCalculation : ' + input);
|
console.log('amountCalculation : ' + input);
|
||||||
let selectedOption = $('#client_policy_id').find('option:selected');
|
let selectedOption = $('#client_policy_id').find('option:selected');
|
||||||
|
console.log("selectedOption", selectedOption);
|
||||||
let bap = selectedOption.data('bap');
|
let bap = selectedOption.data('bap');
|
||||||
|
console.log("bap", bap);
|
||||||
|
|
||||||
const event = window.event;
|
const event = window.event;
|
||||||
console.log("Event id:", event.target.id);
|
console.log("Event id:", event.target.id);
|
||||||
|
|
||||||
// Retrieve and parse the values or default to 0 if not a number
|
// Retrieve and parse the values or default to 0 if not a number
|
||||||
let bp = parseFloat($('#base_premium_' + input).val()) || 0;
|
let bp = parseFloat($('#base_premium_' + input).val()) || 0;
|
||||||
|
console.log("bp base premium", bp);
|
||||||
let ncpa = parseFloat($('#non_comm_per_amt_' + input).val()) || 0;
|
let ncpa = parseFloat($('#non_comm_per_amt_' + input).val()) || 0;
|
||||||
|
console.log("ncpa non comm base premium", ncpa);
|
||||||
|
|
||||||
var tp = 0;
|
var tp = 0;
|
||||||
if(bap == 'Motor'){
|
if(bap == 'Motor'){
|
||||||
@ -1683,7 +1689,7 @@ function addInsurerColumn() {
|
|||||||
$('#insurerTable tbody tr').each(function(index) {
|
$('#insurerTable tbody tr').each(function(index) {
|
||||||
let newCell = '';
|
let newCell = '';
|
||||||
|
|
||||||
if(team_id.includes('6') || team_id.includes('4')){
|
if(role_id == 1 || role_id == 5 || team_id.includes('6') || team_id.includes('4')){
|
||||||
|
|
||||||
switch(index) {
|
switch(index) {
|
||||||
|
|
||||||
@ -2082,7 +2088,7 @@ function populateTable(dataArray, status = false) {
|
|||||||
|
|
||||||
let insurer = data.insurer_branch_id + '-' + data.insurer_id;
|
let insurer = data.insurer_branch_id + '-' + data.insurer_id;
|
||||||
|
|
||||||
if(team_id.includes('6') || team_id.includes('4')){
|
if(role_id == 1 || role_id == 5 || team_id.includes('6') || team_id.includes('4')){
|
||||||
switch (rowIndex) {
|
switch (rowIndex) {
|
||||||
case 0: // Insurer selection
|
case 0: // Insurer selection
|
||||||
cell.find('select').val(insurer);
|
cell.find('select').val(insurer);
|
||||||
|
|||||||
@ -718,7 +718,7 @@
|
|||||||
<td id="agree_tp_td">Agreed TEP %</td>
|
<td id="agree_tp_td">Agreed TEP %</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team())) { ?>
|
<?php if (in_array(get_role_id(), [1,5]) || in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team())) { ?>
|
||||||
|
|
||||||
<tr id="table_tr_17" <?= in_array(FINANCE_TEAM_ID, user_team()) ? 'style="display:none"' : '' ?>>
|
<tr id="table_tr_17" <?= in_array(FINANCE_TEAM_ID, user_team()) ? 'style="display:none"' : '' ?>>
|
||||||
<td>Agreed Amount</td>
|
<td>Agreed Amount</td>
|
||||||
@ -736,7 +736,7 @@
|
|||||||
<td>Standard TEP %</td>
|
<td>Standard TEP %</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if (in_array(FINANCE_TEAM_ID, user_team()) || in_array(MANAGEMENT_TEAM_ID, user_team())) { ?>
|
<?php if (in_array(get_role_id(), [1,5]) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(MANAGEMENT_TEAM_ID, user_team())) { ?>
|
||||||
|
|
||||||
<tr id="table_tr_21">
|
<tr id="table_tr_21">
|
||||||
<td>Actual BP Amount</td>
|
<td>Actual BP Amount</td>
|
||||||
@ -1168,6 +1168,7 @@
|
|||||||
|
|
||||||
|
|
||||||
var team_id = [];
|
var team_id = [];
|
||||||
|
var role_id = <?php echo get_role_id(); ?>;
|
||||||
let isClientFormSubmitting = false;
|
let isClientFormSubmitting = false;
|
||||||
let isVehicleFormSubmitting = false;
|
let isVehicleFormSubmitting = false;
|
||||||
var insurer_count_array = [];
|
var insurer_count_array = [];
|
||||||
@ -4039,7 +4040,7 @@ function addInsurerColumn() {
|
|||||||
|
|
||||||
let newCell = '';
|
let newCell = '';
|
||||||
|
|
||||||
if(team_id.includes('6') || team_id.includes('4')){
|
if(role_id == 1 || role_id == 5 || team_id.includes('6') || team_id.includes('4')){
|
||||||
|
|
||||||
switch(index) {
|
switch(index) {
|
||||||
|
|
||||||
@ -4451,7 +4452,7 @@ function populateTable(dataArray, cd_ac_pk) {
|
|||||||
|
|
||||||
let insurer = data.insurer_branch_id + '-' + data.insurer_id;
|
let insurer = data.insurer_branch_id + '-' + data.insurer_id;
|
||||||
|
|
||||||
if(team_id.includes('6') || team_id.includes('4')){
|
if(role_id == 1 || role_id == 5 || team_id.includes('6') || team_id.includes('4')){
|
||||||
switch (rowIndex) {
|
switch (rowIndex) {
|
||||||
case 0: // Insurer selection
|
case 0: // Insurer selection
|
||||||
cell.find('select').val(insurer).change().toggleClass('readonly-select', !!disable_td);
|
cell.find('select').val(insurer).change().toggleClass('readonly-select', !!disable_td);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user