FIX_BDS_MOTOR_CD : RV

This commit is contained in:
VENKATESHWARAN 2025-09-15 17:30:24 +05:30
parent f529180f57
commit 4536bc7f45
4 changed files with 74 additions and 68 deletions

View File

@ -2078,18 +2078,18 @@ class EmpDataServiceController extends BaseController
'user_id' => $user_id,
]]);
$r = Jobs::addJob(['job_name' => 'makeEntryForBDSPolicyTransaction', 'payload' => [
'client_policy_id' => $client_policy_id ?? null,
'endorsement_no' => $endorsement_id ?? null,
'emp_count' => $emp_count ?? null,
'action_type' => $file['event_type'] ?? null,
'no_of_insured' => count($no_of_insured ?? []) ?? null,
'no_of_dependent' => count($no_of_dependent ?? []) ?? null,
'base_premium' => $base_bremium_and_gst['base_premium'] ?? null,
'gst' => $base_bremium_and_gst['gst'] ?? null,
'policy_issue_date' => $policy_issue_date ?? null,
'created_by' => $file['created_by'] ?? null,
]]);
// $r = Jobs::addJob(['job_name' => 'makeEntryForBDSPolicyTransaction', 'payload' => [
// 'client_policy_id' => $client_policy_id ?? null,
// 'endorsement_no' => $endorsement_id ?? null,
// 'emp_count' => $emp_count ?? null,
// 'action_type' => $file['event_type'] ?? null,
// 'no_of_insured' => count($no_of_insured ?? []) ?? null,
// 'no_of_dependent' => count($no_of_dependent ?? []) ?? null,
// 'base_premium' => $base_bremium_and_gst['base_premium'] ?? null,
// 'gst' => $base_bremium_and_gst['gst'] ?? null,
// 'policy_issue_date' => $policy_issue_date ?? null,
// 'created_by' => $file['created_by'] ?? null,
// ]]);
// $this->cashDepositCalculationForInception($depositeData);
// $this->sendMailForDownloadingECard($emp_policy_ids);
@ -2518,14 +2518,14 @@ class EmpDataServiceController extends BaseController
$file_data = $this->getDataByFileId($file_id, 'success');
$this->setPullNotification($file_data);
$r = Jobs::addJob(['job_name' => 'makeEntryForBDSPolicyTransaction', 'payload' => [
'client_policy_id' => $client_policy_id ?? null,
'endorsement_no' => $endorsement_id[0] ?? null,
'emp_count' => $emp_count ?? null,
'action_type' => $file['event_type'] ?? null,
'policy_issue_date' => $policy_issue_date ?? null,
'created_by' => $file['created_by'] ?? null,
]]);
// $r = Jobs::addJob(['job_name' => 'makeEntryForBDSPolicyTransaction', 'payload' => [
// 'client_policy_id' => $client_policy_id ?? null,
// 'endorsement_no' => $endorsement_id[0] ?? null,
// 'emp_count' => $emp_count ?? null,
// 'action_type' => $file['event_type'] ?? null,
// 'policy_issue_date' => $policy_issue_date ?? null,
// 'created_by' => $file['created_by'] ?? null,
// ]]);
//import file to upload Google Drive
@ -3177,18 +3177,18 @@ class EmpDataServiceController extends BaseController
'user_id' => $user_id,
]]);
$r = Jobs::addJob(['job_name' => 'makeEntryForBDSPolicyTransaction', 'payload' => [
'client_policy_id' => $client_policy_id ?? null,
'endorsement_no' => $endorsement_id ?? null,
'emp_count' => $emp_count ?? null,
'action_type' => $file['event_type'] ?? null,
'no_of_insured' => count($no_of_insured ?? []) ?? null,
'no_of_dependent' => count($no_of_dependent ?? []) ?? null,
'base_premium' => $base_bremium_and_gst['base_premium'] ?? null,
'gst' => $base_bremium_and_gst['gst'] ?? null,
'policy_issue_date' => $policy_issue_date ?? null,
'created_by' => $file['created_by'] ?? null,
]]);
// $r = Jobs::addJob(['job_name' => 'makeEntryForBDSPolicyTransaction', 'payload' => [
// 'client_policy_id' => $client_policy_id ?? null,
// 'endorsement_no' => $endorsement_id ?? null,
// 'emp_count' => $emp_count ?? null,
// 'action_type' => $file['event_type'] ?? null,
// 'no_of_insured' => count($no_of_insured ?? []) ?? null,
// 'no_of_dependent' => count($no_of_dependent ?? []) ?? null,
// 'base_premium' => $base_bremium_and_gst['base_premium'] ?? null,
// 'gst' => $base_bremium_and_gst['gst'] ?? null,
// 'policy_issue_date' => $policy_issue_date ?? null,
// 'created_by' => $file['created_by'] ?? null,
// ]]);
}
@ -3688,18 +3688,18 @@ class EmpDataServiceController extends BaseController
'user_id' => $user_id,
]]);
$r = Jobs::addJob(['job_name' => 'makeEntryForBDSPolicyTransaction', 'payload' => [
'client_policy_id' => $client_policy_id ?? null,
'endorsement_no' => $endorsement_id ?? null,
'emp_count' => $emp_count ?? null,
'action_type' => $file['event_type'] ?? null,
'no_of_insured' => count($no_of_insured ?? []) ?? null,
'no_of_dependent' => count($no_of_dependent ?? []) ?? null,
'base_premium' => $base_bremium_and_gst['base_premium'] ?? null,
'gst' => $base_bremium_and_gst['gst'] ?? null,
'policy_issue_date' => $policy_issue_date ?? null,
'created_by' => $file['created_by'] ?? null,
]]);
// $r = Jobs::addJob(['job_name' => 'makeEntryForBDSPolicyTransaction', 'payload' => [
// 'client_policy_id' => $client_policy_id ?? null,
// 'endorsement_no' => $endorsement_id ?? null,
// 'emp_count' => $emp_count ?? null,
// 'action_type' => $file['event_type'] ?? null,
// 'no_of_insured' => count($no_of_insured ?? []) ?? null,
// 'no_of_dependent' => count($no_of_dependent ?? []) ?? null,
// 'base_premium' => $base_bremium_and_gst['base_premium'] ?? null,
// 'gst' => $base_bremium_and_gst['gst'] ?? null,
// 'policy_issue_date' => $policy_issue_date ?? null,
// 'created_by' => $file['created_by'] ?? null,
// ]]);
}
$file_data = $this->getDataByFileId($file_id, 'success');

View File

@ -526,7 +526,7 @@ class EmployeeController extends AdminController
$client_branch_id = $this->request->getPost('client_branch_id');
$insurer_or_tpa = $this->request->getPost('insurer_or_tpa');
$actions = $this->request->getPost('action_type');
$policy_issue_date = $this->request->getPost('policy_issue_date');
$policy_issue_date = $this->request->getPost('policy_issue_date') ?? null;
$client_data = $this->clientPolicyModel->getCliendDataForExcelFileName($client_policy_id);
$file_name = generate_filename($client_data['short_name'], $event_type, $actions, $insurer_or_tpa, $client_data['policy_type'], $client_data['branch_code']);
@ -544,9 +544,7 @@ class EmployeeController extends AdminController
];
$batch_data['policy_issue_date'] = (!empty($policy_issue_date) && strtotime($policy_issue_date) !== false)
? change_date_format($policy_issue_date)
: null;
$batch_data['policy_issue_date'] = (!empty($policy_issue_date) && strtotime($policy_issue_date) !== false) ? change_date_format($policy_issue_date) : null;
if ($actions == 'export') {

View File

@ -90,13 +90,14 @@
</select>
</div>
</div>
<div class="form-row policy_issue_date_row" style="display:none;">
<!-- <div class="form-row policy_issue_date_row" style="display:none;">
<div class="form-group col-md-4">
<label id="policy_issue_date_label">Policy Issue Date</label> <br />
<input type="text" class="form-control" id="policy_issue_date" name="policy_issue_date"
placeholder="Enter Policy Issue Date">
</div>
</div>
</div> -->
<br>
<div class="form-row" id="import_excel_btn">
@ -152,10 +153,10 @@
$(document).ready(function() {
var policy_issue_datePicker = flatpickr("#policy_issue_date", {
dateFormat: "d/m/Y",
allowInput: false,
});
// var policy_issue_datePicker = flatpickr("#policy_issue_date", {
// dateFormat: "d/m/Y",
// allowInput: false,
// });
$('#insurer_or_tpa, #action_type').on('change', togglePolicyIssueDate);
});
@ -751,14 +752,14 @@
function togglePolicyIssueDate() {
let insurer = $('#insurer_or_tpa').val();
let action = $('#action_type').val();
if (insurer === 'insurer' && action === 'import') {
$('.policy_issue_date_row').show();
$('#policy_issue_date').attr('required', true);
$('#policy_issue_date_label').html('Policy Issue Date <span class="text-danger">*</span>');
} else {
$('.policy_issue_date_row').hide();
$('#policy_issue_date').removeAttr('required').val('');
$('#policy_issue_date_label').text('Policy Issue Date');
}
// if (insurer === 'insurer' && action === 'import') {
// $('.policy_issue_date_row').show();
// $('#policy_issue_date').attr('required', true);
// $('#policy_issue_date_label').html('Policy Issue Date <span class="text-danger">*</span>');
// } else {
// $('.policy_issue_date_row').hide();
// $('#policy_issue_date').removeAttr('required').val('');
// $('#policy_issue_date_label').text('Policy Issue Date');
// }
}
</script>

View File

@ -172,6 +172,7 @@
<input type="hidden" name="cd_ac_no" id="cd_ac_pk_for_leader">
<input type="hidden" name="ct_type" id="ct_type">
<input type="hidden" name="remove_pt_co_id" id="remove_pt_co_id" >
<input type="hidden" name="issuer" id="issuer" value="2">
<!-- <input type="hidden" id="cd_ac_no_for_edit"> -->
<input type="hidden" id="premium_details_unique_id">
@ -249,7 +250,7 @@
</select>
</div>
<div class="form-group col-md-3">
<!-- <div class="form-group col-md-3">
<label for="client_branch">Issuer<span class="text-danger">*</span></label>
<select class="form-control" id="issuer" name="issuer" required>
<option value="">Select Issuer</option>
@ -261,7 +262,7 @@
}
?>
</select>
</div>
</div> -->
</div>
</div>
@ -1194,7 +1195,6 @@ $(document).ready(function(){
}
});
$('#upload_enrollment_model').on('hide.bs.modal', function (e) {
console.log('Attempting to hide #upload_enrollment_model modal');
@ -1263,7 +1263,6 @@ $(document).ready(function(){
});
$('#aadhar').attr('data-parsley-required', 'false');
$('#aadhar').removeAttr('required');
@ -1356,10 +1355,15 @@ $(document).ready(function(){
setTimeout(function(){
$('#client_branch_id').val(branch_id).change()
}, 800)
$('#table_tr_34').show();
$('#table_tr_37').show();
}else{
$('.branchdiv').hide()
$('#client_branch_id').prop('required', false);
$('#table_tr_34').hide();
$('#table_tr_37').hide();
}
if(val == 'add_vehicle'){
@ -1541,7 +1545,6 @@ $(document).ready(function(){
$('[name="standard_tp[]"]').val(std_tp);
$('[name="standard_ter[]"]').val(std_tep);
if(value == 8){
$('#vhnodiv').show();
$('#client_type_div').hide();
@ -3843,9 +3846,13 @@ $('#Owner_type').on('change', function() {
if ($(this).val() == 2) {
$('.ownerbranchdiv').hide();
$('#owner_branch').prop('required', false);
$('#table_tr_34').hide();
$('#table_tr_37').hide();
} else {
$('.ownerbranchdiv').show();
$('#owner_branch').prop('required', true);
$('#table_tr_34').show();
$('#table_tr_37').show();
}
// console.log('selected Owner type', selectedClientType);