nhance/app/Views/report_bds.php

181 lines
7.8 KiB
PHP

<style>
.table th,
.table td {
padding: 8px;
}
table.dataTable tbody td {
padding: 4px 4px !important;
}
.col-12 {
max-width: 98% !important;
}
.dataTables_filter {
position: absolute;
}
</style>
<div class="col-12" id="second_page">
<div class="card">
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">BDS Report</h4>
</div>
</div>
<div class="table-responsive" style="overflow-x: auto;">
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light">
<tr>
<th>S. No</th>
<th>User Name</th>
<th>Month</th>
<th>Business Type</th>
<th>Date</th>
<th>Sales Generated By (Name)</th>
<th>Branch (JIBS)</th>
<th>Serviced By (Name)</th>
<th>Client Name</th>
<th>Client Address</th>
<th>Client Type</th>
<th>Payment From</th>
<th>Reference</th>
<th>Remarks</th>
<th>Policy/Endorsement</th>
<th>Policy No</th>
<th>Endorsement No</th>
<th>Insurer Name</th>
<th>Insurer Branch</th>
<th>TPA</th>
<th>Days Until Expiry</th>
<th>Endorsement Effective Date</th>
<th>Policy Effective Date</th>
<th>Policy Expiry Date</th>
<th>Policy Type</th>
<th>BAP Group</th>
<th>Vehicle Number</th>
<th>Base Premium</th>
<th>Terrorism/TP</th>
<th>Premium (without GST)</th>
<th>GST @ 18%</th>
<th>Total Premium</th>
<th>Base Revenue %</th>
<th>TP / Terrorism Revenue %</th>
<th>Total IRDA Revenue INR</th>
<th>GST on Revenue</th>
<th>Total Amount Receivable</th>
<th>Rewards %</th>
<th>Rewards</th>
<th>Total Brokerage</th>
<th>Payment Ref</th>
<th>Invoice Number</th>
<th>Invoice Date</th>
<th>Invoice Amount</th>
<th>Payment Status</th>
<th>UTR</th>
<th>Payment Date</th>
</tr>
</thead>
<tbody>
<?php if (isset($report_list)) { ?>
<?php foreach($report_list as $index => $row){ ?>
<tr>
<td><?= $index + 1 ?></td>
<td><?php echo $row['user_name']; ?></td>
<td><?php echo $row['policy_issue_month']; ?></td>
<td><?php echo $row['revenue_type']; ?></td>
<td><?php echo $row['policy_issue_date']; ?></td>
<td><?php echo $row['salse_person_name']; ?></td> <!-- Sales Generated By (Name) -->
<td><?php echo 'Chennai'; ?></td>
<td><?php echo $row['service_person_name']; ?></td>
<td><?php echo $row['client_name']; ?></td>
<td><?php echo $row['client_address']; ?></td>
<td><?php echo $row['client_type']; ?></td>
<td></td> <!-- Payment From -->
<td><?php echo $row['ref']; ?></td>
<td><?php echo $row['remarks']; ?></td>
<td><?php echo $row['action_type']; ?></td>
<td><?php echo $row['policy_no']; ?></td>
<td><?php echo $row['endorsement_no']; ?></td>
<td><?php echo $row['insurer_name']; ?> </td>
<td><?php echo $row['insurer_branch_name']; ?></td>
<td><?php echo $row['tpa_name']; ?></td>
<td><?php echo $row['days']; ?></td>
<td><?php echo $row['endorse_eff_date']; ?></td>
<td><?php echo date('d-m-Y', strtotime($row['policy_start_date'])); ?></td>
<td><?php echo date('d-m-Y', strtotime($row['policy_end_date'])); ?></td>
<td><?php echo $row['policy_type']; ?></td>
<td><?php echo $row['bap']; ?></td>
<td><?php echo $row['vehicle_no'] ?? 'N.A'; ?></td>
<td><?php echo $row['bp_amt']; ?></td>
<td><?php echo $row['tp_or_ter']; ?></td>
<td><?php echo $row['premium_wo_gst']; ?></td>
<td><?php echo $row['gst_amount']; ?></td>
<td><?php echo $row['total_premium']; ?></td>
<td><?php echo $row['agreed_bp_per']; ?></td>
<td><?php echo $row['agreed_tp_or_ter_per']; ?></td>
<td><?php echo $row['total_irda']; ?></td>
<td><?php echo $row['gst_on_revenue']; ?></td>
<td><?php echo $row['total_amt_received']; ?></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<?php } ?>
<?php } ?>
</tbody>
</table>
<div>
</div>
</div>
</div><!-- end col -->
</div>
</div>
<script>
// Datatable document ready
$(document).ready(function() {
var ticketsTable = $('#scroll-horizontal-datatable');
if (ticketsTable.length) {
ticketsTable.DataTable({
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [
{
extend: 'csv',
text: 'CSV',
title: 'Policy-Tranction-BDS-List',
},
{
extend: 'excel',
text: 'Excel',
title: 'Policy-Tranction-BDS-List',
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true, // Enable pagination
pageLength: 25 // Set default number of rows per page (optional)
});
} else {
console.error("Table not found.");
}
});
</script>