FIX_Minor Fixes
This commit is contained in:
parent
5a36195fdc
commit
03f6fe59b2
@ -1027,6 +1027,8 @@ class BDSReportController extends AdminController
|
||||
$data['data'] = $result;
|
||||
// dd($data, get_role_id(), ENROLLMENT_TEAM_ID, user_team());
|
||||
if ($isInternalCalled) { return $result; }
|
||||
$data['tab_name'] = "BDS TAT Band Wise Report";
|
||||
$data['page_name'] = "BDS TAT Band Wise Report";
|
||||
return $this->loadLayout('bds_tat_wise_report', $data);
|
||||
}
|
||||
|
||||
|
||||
@ -26,11 +26,11 @@
|
||||
<div class="col-12" id="second_page">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="padding-bottom: 10px;">
|
||||
<!-- <div class="row" style="padding-bottom: 10px;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">BDS TAT Band Wise Report</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="table-responsive">
|
||||
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||
@ -40,7 +40,7 @@
|
||||
// Get headers dynamically
|
||||
$headers = array_keys($data[0]);
|
||||
foreach ($headers as $header): ?>
|
||||
<th><?= esc($header) ?></th>
|
||||
<th><?= esc(str_replace('_', ' ', $header)) ?></th>
|
||||
<?php endforeach; ?>
|
||||
<th>TOTAL</th>
|
||||
</tr>
|
||||
@ -108,13 +108,6 @@
|
||||
|
||||
// ],
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
className: 'btn app-btn-primary mr-2',
|
||||
action: function(e, dt, node, config) {
|
||||
openTicket();
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
|
||||
@ -190,6 +190,14 @@
|
||||
// "box-shadow": "0px 4px 4px 0px #00000040"
|
||||
// });
|
||||
});
|
||||
|
||||
const observer = new MutationObserver(() => {
|
||||
document.querySelectorAll('.select2-search__field').forEach(el => {
|
||||
el.style.setProperty('box-shadow', 'none', 'important');
|
||||
});
|
||||
});
|
||||
|
||||
observer.observe(document.body, { childList: true, subtree: true });
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
|
||||
@ -142,13 +142,13 @@ table.dataTable tbody td {
|
||||
<td style="display: none;"><?php echo empty($row['policy_end_date']) ? 'N/A' : date('d/m/Y', strtotime($row['policy_end_date'])); ?></td>
|
||||
<td style="display: none;"><?php echo $row['ref'] ?: 'N/A'; ?></td>
|
||||
<td style="display: none;"><?php echo $row['remarks'] ?: 'N/A'; ?></td>
|
||||
<td class="right-align-input"><?php echo $row['bp_amt']; ?></td>
|
||||
<td class="right-align-input"><?php echo $row['tp_or_ter']; ?></td>
|
||||
<td class="right-align-input"><?php echo $row['bp_amt'] ?: '0.00'; ?></td>
|
||||
<td class="right-align-input"><?php echo $row['tp_or_ter'] ?: '0.00'; ?></td>
|
||||
<td class="right-align-input" style="display: none;"><?php echo $row['premium_wo_gst']; ?></td>
|
||||
<!-- <td class="right-align-input" style="display: none;"><?php echo $row['gst_amount']; ?></td> -->
|
||||
<td class="right-align-input"><?php echo $row['total_premium']; ?></td>
|
||||
<td class="right-align-input"><?php echo $row['agreed_bp_per']; ?> %</td>
|
||||
<td class="right-align-input"><?php echo $row['agreed_tp_or_ter_per'];?> %</td>
|
||||
<td class="right-align-input"><?php echo $row['total_premium'] ?: '0.00'; ?></td>
|
||||
<td class="right-align-input"><?php echo $row['agreed_bp_per'] ?: '0.00'; ?> %</td>
|
||||
<td class="right-align-input"><?php echo $row['agreed_tp_or_ter_per'] ?: '0.00';?> %</td>
|
||||
<td class="right-align-input" style="display: none;"><?php echo isset($row['reward']) ? $row['reward'] : '0.00'; ?></td>
|
||||
|
||||
<?php
|
||||
@ -500,32 +500,61 @@ $(document).ready(function() {
|
||||
var api = this.api();
|
||||
|
||||
// Calculate column totals (adjust indices based on VISIBLE columns)
|
||||
var totalPremium = api.column(20, {search: 'applied'}).data().reduce(function(a, b) {
|
||||
return parseFloat(a) + parseFloat(b || 0);
|
||||
}, 0);
|
||||
// var totalPremium = api.column(20, {search: 'applied'}).data().reduce(function(a, b) {
|
||||
// return parseFloat(a) + parseFloat(b || 0);
|
||||
// }, 0);
|
||||
|
||||
var total_rewards = api.column(23, {search: 'applied'}).data().reduce(function(a, b) {
|
||||
return parseFloat(a) + parseFloat(b || 0);
|
||||
}, 0);
|
||||
// var total_rewards = api.column(23, {search: 'applied'}).data().reduce(function(a, b) {
|
||||
// return parseFloat(a) + parseFloat(b || 0);
|
||||
// }, 0);
|
||||
|
||||
var totalIrda = api.column(24, {search: 'applied'}).data().reduce(function(a, b) {
|
||||
return parseFloat(a) + parseFloat(b || 0);
|
||||
}, 0);
|
||||
// var totalIrda = api.column(24, {search: 'applied'}).data().reduce(function(a, b) {
|
||||
// return parseFloat(a) + parseFloat(b || 0);
|
||||
// }, 0);
|
||||
|
||||
var totalBilled = api.column(25, {search: 'applied'}).data().reduce(function(a, b) {
|
||||
return parseFloat(a) + parseFloat(b || 0);
|
||||
}, 0);
|
||||
// var totalBilled = api.column(25, {search: 'applied'}).data().reduce(function(a, b) {
|
||||
// return parseFloat(a) + parseFloat(b || 0);
|
||||
// }, 0);
|
||||
|
||||
var totalUnbilled = api.column(26, {search: 'applied'}).data().reduce(function(a, b) {
|
||||
return parseFloat(a) + parseFloat(b || 0);
|
||||
}, 0);
|
||||
// var totalUnbilled = api.column(26, {search: 'applied'}).data().reduce(function(a, b) {
|
||||
// return parseFloat(a) + parseFloat(b || 0);
|
||||
// }, 0);
|
||||
|
||||
// Update the totals
|
||||
// $('#total_premium').text(totalPremium.toFixed(2));
|
||||
// $('#total_rewards').text(total_rewards.toFixed(2));
|
||||
// $('#total_irda').text(totalIrda.toFixed(2));
|
||||
// $('#total_billed').text(totalBilled.toFixed(2));
|
||||
// $('#total_unbilled').text(totalUnbilled.toFixed(2));
|
||||
|
||||
// Helper to sum numeric values safely
|
||||
var getTotal = function(colIndex) {
|
||||
return api.column(colIndex, { search: 'applied' }).data()
|
||||
.reduce(function(a, b) {
|
||||
var x = parseFloat(a) || 0;
|
||||
var y = parseFloat(
|
||||
(typeof b === 'string') ? b.replace(/[^0-9.\-]+/g, '') : b
|
||||
) || 0;
|
||||
return x + y;
|
||||
}, 0);
|
||||
};
|
||||
|
||||
// Compute totals by column index
|
||||
var totalPremium = getTotal(21);
|
||||
var totalRewards = getTotal(24);
|
||||
var totalIrda = getTotal(25);
|
||||
var totalBilled = getTotal(26);
|
||||
var totalUnbilled = getTotal(27);
|
||||
|
||||
// Update the totals section above the table
|
||||
$('#total_premium').text(totalPremium.toFixed(2));
|
||||
$('#total_rewards').text(total_rewards.toFixed(2));
|
||||
$('#total_rewards').text(totalRewards.toFixed(2));
|
||||
$('#total_irda').text(totalIrda.toFixed(2));
|
||||
$('#total_billed').text(totalBilled.toFixed(2));
|
||||
$('#total_unbilled').text(totalUnbilled.toFixed(2));
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
@ -160,19 +160,19 @@
|
||||
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th>S.No </th>
|
||||
<th>Client </th>
|
||||
<th>Client Branch </th>
|
||||
<th>Insurer </th>
|
||||
<th>Insurer Branch </th>
|
||||
<th>Policy </th>
|
||||
<th>Endorsement No </th>
|
||||
<th>Premium </th>
|
||||
<th>Statement Premium </th>
|
||||
<th>Premium Variance </th>
|
||||
<th>Expected Amount </th>
|
||||
<th>Statement Amount </th>
|
||||
<th>Variance </th>
|
||||
<th>S.No </th>
|
||||
<th>Client </th>
|
||||
<th>Client Branch </th>
|
||||
<th>Insurer </th>
|
||||
<th>Insurer Branch </th>
|
||||
<th>Policy </th>
|
||||
<th>Endorsement No </th>
|
||||
<th>Premium </th>
|
||||
<th>Statement Premium </th>
|
||||
<th>Premium Variance </th>
|
||||
<th>Expected Amount </th>
|
||||
<th>Statement Amount </th>
|
||||
<th>Variance </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user