126 lines
7.0 KiB
PHP
Executable File
126 lines
7.0 KiB
PHP
Executable File
<script>
|
|
var pageSubTitle = 'Client Deposit - <?= $clientName[0]["client_name"]; ?>';
|
|
|
|
var pageBackButton = '<a href="<?= base_url("client/list"); ?>" data-toggle="tooltip" data-placement="top" title="Back to Client List"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>';
|
|
</script>
|
|
<div class="row" id="client_list">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<!-- <div class="row" style="margin-bottom:1rem;">
|
|
<div class="col-6" style="align-self: center;">
|
|
|
|
<h4 style="position: relative;">Client Deposit -
|
|
<?php echo $clientName[0]['client_name'];?></h4>
|
|
|
|
</div>
|
|
<div class="col-6" style="text-align: right;">
|
|
<a href="<?= base_url("client/list"); ?>"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>
|
|
</div>
|
|
<!- <div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
|
<a href="<?= base_url("client/client_deposit"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
|
|
</div> ->
|
|
</div> -->
|
|
<div class="table-responsive">
|
|
<table data-custom-table-css="table" class="table mb-0 nowrap w-100 table-centered" cellspacing="0" id="tickets-table">
|
|
<thead class="bg-light">
|
|
<tr>
|
|
<th class="font-weight-medium">Insurer Name </th>
|
|
<th class="font-weight-medium">Insurer Branch Name </th>
|
|
<th class="font-weight-medium">CD Account Number </th>
|
|
<th class="font-weight-medium">Current Balance </th>
|
|
<th class="font-weight-medium">Action</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($clientData as $value): ?>
|
|
<tr>
|
|
<td><?php echo $value->insurer_name;?></td>
|
|
<td><?php echo $value->insurer_branch_name;?></td>
|
|
<td><?php echo $value->cd_master_account_no;?></td>
|
|
|
|
<td>₹
|
|
<?php
|
|
$insurerId = $value->insurer_id;
|
|
$cd_ac_pk = $value->cd_ac_pk;
|
|
// Check if the balance information exists for the insurer
|
|
if (isset($balances[$insurerId . '-'. $cd_ac_pk])) {
|
|
$balance = $balances[$insurerId . '-'. $cd_ac_pk]->balance;
|
|
echo $balance;
|
|
} else {
|
|
echo "N/A"; // Display "Not Available" if balance information is not present
|
|
}
|
|
?>
|
|
</td>
|
|
<td>
|
|
<a class="dropdown-item"
|
|
href="<?= base_url("client/view_deposit/{$value->insurer_id}?client_id={$value->client_id}&cd_ac_pk={$value->cd_ac_pk}"); ?>">
|
|
<i class="mdi mdi-eye mr-2 text-muted font-18 vertical-middle"></i>View Deposit
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div><!-- end col -->
|
|
</div>
|
|
<!-- end row -->
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
|
|
$('#tickets-table').DataTable({
|
|
// dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>",
|
|
dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
|
|
"<'row'<'col-sm-12'tr>>" +
|
|
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>",
|
|
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
|
buttons: [
|
|
{
|
|
extend: 'collection',
|
|
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
|
className: 'btn app-btn-secondary ',
|
|
buttons: [
|
|
{
|
|
extend: 'csv',
|
|
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
|
title: 'Client Deposit Details - ' + ' <?php echo $clientName[0]['client_name'];?>',
|
|
className: 'app-btn-primary ',
|
|
exportOptions: {
|
|
columns: ':not(:last-child)'
|
|
},
|
|
},
|
|
{
|
|
extend: 'pdf',
|
|
text: '<i class="mdi mdi-file-pdf " ></i><span class=" btn-custom"> PDF </span>',
|
|
title: 'Client Deposit Details - ' + ' <?php echo $clientName[0]['client_name'];?>',
|
|
exportOptions: {
|
|
columns: ':not(:last-child)'
|
|
},
|
|
className: 'app-btn-primary ',
|
|
}
|
|
]
|
|
}
|
|
],
|
|
language: {
|
|
search: `
|
|
<div class="datatable-search-wrapper" style="position:relative; display:inline-block;">
|
|
_INPUT_
|
|
<i class="mdi mdi-magnify datatable-search-icon"
|
|
style="position:absolute; right:11px; top:50%; transform:translateY(-53%); color:#666;"></i>
|
|
<i class="mdi mdi-close-circle datatable-clear-icon"
|
|
style="position:absolute; right:11px; top:50%; transform:translateY(-53%); color:#666; display:none;"></i>
|
|
</div>`,
|
|
searchPlaceholder: "Search",
|
|
emptyTable: '<div class="text-center text-muted">No Data found</div>'
|
|
},
|
|
|
|
});
|
|
$('.dataTables_length label').css('height', '21px');
|
|
|
|
})
|
|
</script>
|