CHANGE_UI_Support_Policy
This commit is contained in:
parent
3ce7953884
commit
dc5119f752
@ -1589,7 +1589,7 @@ class MasterController extends AdminController
|
||||
|
||||
public function VehicleMasterList()
|
||||
{
|
||||
$data['page_name'] = 'Vehicle Master List';
|
||||
$data['page_name'] = 'Vehicle Master';
|
||||
$data['vehicle_type'] = [
|
||||
'two_wheeler' => 'Two Wheeler',
|
||||
'four_wheeler' => 'Four Wheeler',
|
||||
|
||||
@ -22,7 +22,6 @@
|
||||
</style>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12" id="second_page">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@ -82,7 +81,6 @@
|
||||
</div> <!-- end card-body -->
|
||||
</div> <!-- end card -->
|
||||
</div> <!-- end col-12 -->
|
||||
</div> <!-- end row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
@ -94,18 +92,24 @@
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
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: 'CSV',
|
||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||
title: 'BDS TAT BAND WISE DATA',
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
text: 'Excel',
|
||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||
title: 'BDS TAT BAND WISE DATA',
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
|
||||
@ -9,8 +9,7 @@ table.dataTable tbody td {
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row" id="inception_list">
|
||||
<div class="col-12">
|
||||
<div class="col-12" id="inception_list">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="margin-bottom:1rem;">
|
||||
@ -100,7 +99,6 @@ table.dataTable tbody td {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@ -115,20 +113,26 @@ $(document).ready(function() {
|
||||
dom: "<'row'<'col-sm-2'f><'col-sm-10 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: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
className: 'btn app-btn-secondary ',
|
||||
buttons: [{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||
title: 'Renewal-List',
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
text: 'Excel',
|
||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||
title: 'Renewal-List',
|
||||
exportOptions: {
|
||||
orthogonal: 'sort'
|
||||
},
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
@ -142,4 +146,39 @@ $(document).ready(function() {
|
||||
console.error("Table atet found.");
|
||||
}
|
||||
});
|
||||
|
||||
// Global DataTables defaults
|
||||
$.extend(true, $.fn.dataTable.defaults, {
|
||||
language: {
|
||||
search: "", // remove "Search:" label
|
||||
searchPlaceholder: "Search"
|
||||
},
|
||||
paging: true,
|
||||
pageLength: 10,
|
||||
ordering: false
|
||||
});
|
||||
|
||||
// Global init hook
|
||||
$(document).on('init.dt', function (e, settings) {
|
||||
let $filter = $(settings.nTableWrapper).find('.dataTables_filter');
|
||||
let $input = $filter.find('input');
|
||||
|
||||
if (!$filter.hasClass('custom-search')) {
|
||||
// Wrap in Bootstrap input-group
|
||||
$input
|
||||
.addClass('form-control')
|
||||
.wrap('<div class="input-group"></div>');
|
||||
|
||||
// Append icon
|
||||
$input.after(`
|
||||
<span class="input-group-text bg-white border-0">
|
||||
<i class="mdi mdi-magnify"></i>
|
||||
</span>
|
||||
`);
|
||||
|
||||
// Align to right
|
||||
$filter.addClass('text-right custom-search');
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -44,16 +44,22 @@ table.dataTable tbody td {
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12" style="margin-top: -12px;">
|
||||
<div class="col-12">
|
||||
<h4 class="ml-1 mb-3"> <span class="font-color-black">Business Team</span> </h4>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-1">
|
||||
<h5 class="m-1">
|
||||
|
||||
|
||||
<label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
|
||||
<span class="font-color-black">Filters</span>
|
||||
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
|
||||
aria-expanded="true">
|
||||
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
|
||||
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
|
||||
</a>
|
||||
</h5>
|
||||
</label>
|
||||
<div class="card mb-1">
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
@ -135,16 +141,16 @@ table.dataTable tbody td {
|
||||
|
||||
<div class="form-group col-md-3" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control"
|
||||
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 text-right m-b-0" style="margin-top: 29px;">
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right m-b-0">
|
||||
<a href="<?= base_url("/policy_tranction/report/report-business-list"); ?>"
|
||||
class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a href="<?= base_url("/policy_tranction/report/report-business-list"); ?>"
|
||||
@ -152,7 +158,7 @@ table.dataTable tbody td {
|
||||
onclick="fetchEmpolyeeList(event);">Submit</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="form-group text-right m-b-0">
|
||||
<button type="button" class="btn btn-secondary" id="clear-filters">Clear</button>
|
||||
@ -167,7 +173,7 @@ table.dataTable tbody td {
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12" id="second_page">
|
||||
<div class="card">
|
||||
@ -337,14 +343,19 @@ $(document).ready(function() {
|
||||
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: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
className: 'btn app-btn-secondary ',
|
||||
buttons: [{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||
title: 'Policy-Tranction-BDS-List',
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
text: 'Excel',
|
||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||
title: 'Policy-Tranction-BDS-List',
|
||||
customize: function(xlsx) {
|
||||
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
||||
@ -374,7 +385,7 @@ $(document).ready(function() {
|
||||
$(sheet).find('sheetData').append(totalRow);
|
||||
}
|
||||
}
|
||||
|
||||
]}
|
||||
],
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
@ -487,7 +498,7 @@ $(function() {
|
||||
// var end = moment();
|
||||
|
||||
function cb(start, end) {
|
||||
$('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
$('#startDate').val(start.format('DD-MM-YYYY'));
|
||||
$('#endDate').val(end.format('DD-MM-YYYY'));
|
||||
}
|
||||
@ -495,6 +506,7 @@ $(function() {
|
||||
$('#reportrange').daterangepicker({
|
||||
startDate: start,
|
||||
endDate: end,
|
||||
locale: { format: 'DD-MM-YYYY' },
|
||||
ranges: {
|
||||
'Today': [moment(), moment()],
|
||||
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
|
||||
@ -66,8 +66,9 @@ table.dataTable thead th {
|
||||
data-trigger="hover">ADD</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap" >
|
||||
<thead class="bg-light">
|
||||
|
||||
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap text-custom-black text-custom app-datatable">
|
||||
<thead class="app-table-head">
|
||||
<tr>
|
||||
<th class="font-weight-medium">S.No.</th>
|
||||
<th class="font-weight-medium">Client Name</th>
|
||||
@ -80,7 +81,7 @@ table.dataTable thead th {
|
||||
<th class="font-weight-medium">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="app-table-body">
|
||||
<?php foreach($CD_Master_Data as $index => $row){ ?>
|
||||
<tr>
|
||||
<td><?= $index + 1; ?></td>
|
||||
@ -90,7 +91,7 @@ table.dataTable thead th {
|
||||
<td><?php echo date('d-m-Y', strtotime($row['opening_date'])); ?></td>
|
||||
<td><?php echo $row['cd_ac_no']; ?></td>
|
||||
<td><?php echo $row['opening_bal']; ?></td>
|
||||
<td><?php echo date('d-M-Y h:i A', strtotime($row['created_at'])) ?> by <?php echo $row['user_name']; ?></td>
|
||||
<td><?php echo date('d-M-Y h:i A', strtotime($row['created_at'])) ?> <br>by <?php echo $row['user_name']; ?></td>
|
||||
<td>
|
||||
<div class="btn-group dropdown">
|
||||
<a href="javascript: void(0);"class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||
@ -213,35 +214,75 @@ table.dataTable thead th {
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#scroll-horizontal-datatable').DataTable({
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'CD-Master-List',
|
||||
className: 'my_class',
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
},
|
||||
},
|
||||
{
|
||||
text: 'Add',
|
||||
className: 'buttons-html5 ',
|
||||
action: function (e, dt, node, config) {
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
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) {
|
||||
showCdMasterAddModal();
|
||||
}
|
||||
}
|
||||
],
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
searchPlaceholder: "Search..."
|
||||
},
|
||||
paging: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
className: 'btn app-btn-secondary ',
|
||||
buttons: [
|
||||
{
|
||||
extend: 'csv',
|
||||
title: 'CD-Master-List',
|
||||
className: 'my_class',
|
||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||
className: 'app-btn-primary my_class',
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
},
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||
exportOptions: {
|
||||
orthogonal: 'sort'
|
||||
},
|
||||
className: 'app-btn-primary ',
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
paging: true,
|
||||
pageLength: 25,
|
||||
order: [[0, 'desc']]
|
||||
// scrollX: true,
|
||||
// dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" +
|
||||
// "<'row'<'col-sm-12'tr>>" +
|
||||
// "<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
// buttons: [
|
||||
// {
|
||||
// extend: 'csv',
|
||||
// text: 'CSV',
|
||||
// title: 'CD-Master-List',
|
||||
// className: 'my_class',
|
||||
// exportOptions: {
|
||||
// columns: ':not(:last-child)'
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// text: 'Add',
|
||||
// className: 'buttons-html5 ',
|
||||
// action: function (e, dt, node, config) {
|
||||
// showCdMasterAddModal();
|
||||
// }
|
||||
// }
|
||||
// ],
|
||||
// language: {
|
||||
// search: "_INPUT_",
|
||||
// searchPlaceholder: "Search..."
|
||||
// },
|
||||
// paging: true,
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
@ -34,51 +34,57 @@
|
||||
</a>
|
||||
</h5>
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="card-body" style="margin-top: 0px;">
|
||||
<div class="form-group">
|
||||
<form method="post" action="<?= base_url("/dmsSearch");?>" id='dms_search_form'>
|
||||
<div class="form-row">
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-2">
|
||||
<label for="customer">Customer</label>
|
||||
<!-- <div style="position:relative;"> -->
|
||||
<input type="text" class="form-control" id="customer" placeholder="Enter customer name">
|
||||
<input type="hidden" name="customer_id" class="form-control" id="customer_id" placeholder="Enter customer name">
|
||||
<div id="customer_suggestions" class="autocomplete-suggestions" style="display:none;"></div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="customer">Customer</label>
|
||||
<!-- <div style="position:relative;"> -->
|
||||
<input type="text" class="form-control" id="customer" placeholder="Enter customer name">
|
||||
<input type="hidden" name="customer_id" class="form-control" id="customer_id" placeholder="Enter customer name">
|
||||
<div id="customer_suggestions" class="autocomplete-suggestions" style="display:none;"></div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-2">
|
||||
<label for="customer">Customer document name</label>
|
||||
<!-- <div style="position:relative;"> -->
|
||||
<input type="text" name="cus_doc_name" class="form-control" id="cus_doc_name" placeholder="Enter customer doc name ">
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div class="form-group col-md-1" style="text-align: center;">
|
||||
OR
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="customer">Policy</label>
|
||||
<!-- <div style="position:relative;"> -->
|
||||
<input type="text" class="form-control" id="policy" placeholder="Enter policy no">
|
||||
<input type="hidden" name="policy_id" class="form-control" id="policy_id" placeholder="Enter policy no">
|
||||
<div id="policy_suggestions" class="autocomplete-suggestions" style="display:none;"></div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="customer">Customer document name</label>
|
||||
<!-- <div style="position:relative;"> -->
|
||||
<input type="text" name="cus_doc_name" class="form-control" id="cus_doc_name" placeholder="Enter customer doc name ">
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div class="form-group col-md-4"></div>
|
||||
|
||||
<div class="form-group col-md-8" style="text-align: center; font-size: small;">
|
||||
OR
|
||||
</div>
|
||||
<div class="form-group col-md-4"></div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="customer">Policy document name</label>
|
||||
<!-- <div style="position:relative;"> -->
|
||||
<input type="text" name="policy_doc_name" class="form-control" id="policy_doc_name" placeholder="Enter policy doc name ">
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="customer">Policy</label>
|
||||
<!-- <div style="position:relative;"> -->
|
||||
<input type="text" class="form-control" id="policy" placeholder="Enter policy no">
|
||||
<input type="hidden" name="policy_id" class="form-control" id="policy_id" placeholder="Enter policy no">
|
||||
<div id="policy_suggestions" class="autocomplete-suggestions" style="display:none;"></div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right m-b-0">
|
||||
<button type="button" class="btn btn-secondary" id="clear-filters">Clear</button>
|
||||
<input type="submit" class="btn btn-primary waves-effect waves-light" id="get-emp-list" onclick="fetchFileList(event);" value="submit">
|
||||
</div>
|
||||
</form>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="customer">Policy document name</label>
|
||||
<!-- <div style="position:relative;"> -->
|
||||
<input type="text" name="policy_doc_name" class="form-control" id="policy_doc_name" placeholder="Enter policy doc name ">
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4 d-flex justify-content-end align-items-end">
|
||||
<button type="button" class="btn app-btn-outline-secondary mr-2" id="clear-filters">Clear</button>
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="get-emp-list" onclick="fetchFileList(event);">Submit</button>
|
||||
<!-- <input type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="get-emp-list" onclick="fetchFileList(event);" value="submit"> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -94,7 +100,8 @@
|
||||
<div class="card-body">
|
||||
<div class="row" style="padding-bottom: 10px;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">File search result</h4>
|
||||
<h4 style="position: relative;">Files</h4>
|
||||
<!-- <h4 style="position: relative;">File search result</h4> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -159,13 +166,35 @@ var ticketsTable = $('#scroll-horizontal-datatable');
|
||||
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
searchPlaceholder: "Search..."
|
||||
},
|
||||
paging: true, // Enable pagination
|
||||
pageLength: 25, // Set default number of rows per page (optional)
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
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>',
|
||||
className: 'app-btn-primary ',
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||
exportOptions: {
|
||||
orthogonal: 'sort'
|
||||
},
|
||||
className: 'app-btn-primary ',
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
paging: true,
|
||||
pageLength: 25,
|
||||
order: [[0, 'desc']]
|
||||
});
|
||||
} else {
|
||||
console.error("Table not found.");
|
||||
@ -220,6 +249,11 @@ function fetchFileList(event)
|
||||
var cus_doc_name = document.getElementById('cus_doc_name').value;
|
||||
var policy_doc_name = document.getElementById('policy_doc_name').value;
|
||||
|
||||
if(policy == '' && customer == '')
|
||||
{
|
||||
alert('choose customer or policy');return false;
|
||||
}
|
||||
|
||||
if(customer == '' && cus_doc_name != '')
|
||||
{
|
||||
alert('choose customer');return false;
|
||||
@ -230,10 +264,7 @@ function fetchFileList(event)
|
||||
alert('choose policy');return false;
|
||||
}
|
||||
|
||||
if(policy == '' && customer == '')
|
||||
{
|
||||
alert('choose customer or policy');return false;
|
||||
}
|
||||
|
||||
console.log('called');
|
||||
let customEvent = new CustomEvent('fetchFileListCustomEvent');
|
||||
$('#dms_search_form').submit();
|
||||
|
||||
@ -44,16 +44,20 @@ table.dataTable tbody td {
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row" id="finance_filter">
|
||||
<div class="col-12" style="margin-top: -12px;">
|
||||
<div class="col-12">
|
||||
<h4 class="ml-1 mb-3"> <span class="font-color-black">Finance Team</span> </h4>
|
||||
</div>
|
||||
|
||||
<div class="col-12" id="finance_filter">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-1">
|
||||
<h5 class="m-1">
|
||||
<label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
|
||||
<span class="font-color-black">Filters</span>
|
||||
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
|
||||
aria-expanded="true">
|
||||
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
|
||||
</a>
|
||||
</h5>
|
||||
</label>
|
||||
<div class="card mb-1">
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
@ -135,16 +139,15 @@ table.dataTable tbody td {
|
||||
|
||||
<div class="form-group col-md-3" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control"
|
||||
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 text-right m-b-0" style="margin-top: 29px;">
|
||||
</div>
|
||||
<div class="form-group text-right m-b-0">
|
||||
<a href="<?= base_url("/policy_tranction/report/report-finance-list"); ?>"
|
||||
class="btn btn-secondary" id="clear-filters">Clear</a>
|
||||
<a href="<?= base_url("/policy_tranction/report/report-finance-list"); ?>"
|
||||
@ -152,7 +155,7 @@ table.dataTable tbody td {
|
||||
onclick="fetchEmpolyeeList(event);">Submit</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="form-group text-right m-b-0">
|
||||
<button type="button" class="btn btn-secondary" id="clear-filters">Clear</button>
|
||||
@ -167,7 +170,6 @@ table.dataTable tbody td {
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12" id="finance_list">
|
||||
<div class="card">
|
||||
@ -338,14 +340,19 @@ $(document).ready(function() {
|
||||
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: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
className: 'btn app-btn-secondary ',
|
||||
buttons: [{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||
title: 'Policy-Tranction-BDS-List',
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
text: 'Excel',
|
||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||
title: 'Policy-Tranction-BDS-List',
|
||||
customize: function(xlsx) {
|
||||
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
||||
@ -375,7 +382,7 @@ $(document).ready(function() {
|
||||
$(sheet).find('sheetData').append(totalRow);
|
||||
}
|
||||
}
|
||||
|
||||
]}
|
||||
],
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
@ -488,7 +495,7 @@ $(function() {
|
||||
// var end = moment();
|
||||
|
||||
function cb(start, end) {
|
||||
$('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
$('#startDate').val(start.format('DD-MM-YYYY'));
|
||||
$('#endDate').val(end.format('DD-MM-YYYY'));
|
||||
}
|
||||
@ -496,6 +503,7 @@ $(function() {
|
||||
$('#reportrange').daterangepicker({
|
||||
startDate: start,
|
||||
endDate: end,
|
||||
locale: { format: 'DD-MM-YYYY' },
|
||||
ranges: {
|
||||
'Today': [moment(), moment()],
|
||||
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
|
||||
@ -135,14 +135,46 @@ table.dataTable tbody td {
|
||||
cursor: pointer !important;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.payment-card {
|
||||
width: 100%;
|
||||
background: #F7F7F7;
|
||||
box-shadow: 0px 2px 2px 0px #00000040;
|
||||
border-radius: 6px;
|
||||
padding: 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.payment-card .row {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.payment-card label {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
margin-bottom: 4px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.payment-card .form-control {
|
||||
border-radius: 6px;
|
||||
height: 35px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.payment-card .btn {
|
||||
margin-left: 5px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="row" id="inception_list">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-9" style="align-self: center;">
|
||||
<h4 style="position: relative;">Insurer Statement List</h4>
|
||||
<div class="col-8" style="align-self: center;">
|
||||
<h4 style="position: relative;">Insurer Statements</h4>
|
||||
<!-- <div id="statusSwitchWrapper" class="dt-switch-wrapper">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="statusSwitch">
|
||||
@ -157,9 +189,9 @@ table.dataTable tbody td {
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="col-3" style="text-align: right;">
|
||||
<div class="col-4" style="text-align: right;">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-8">
|
||||
<div class="offset-3 col-5">
|
||||
<div id="statusSwitchWrapper" class="dt-switch-wrapper">
|
||||
<div class="custom-control custom-switch" style="text-align: left;">
|
||||
<input type="checkbox" class="custom-control-input" id="statusSwitch">
|
||||
@ -168,7 +200,7 @@ table.dataTable tbody td {
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<button type="button" id="btnAdd" onclick="showFileUploadModal()" class="btn btn-primary waves-effect waves-light">Upload</button>
|
||||
<button type="button" id="btnAdd" onclick="showFileUploadModal()" class="btn btn-primary waves-effect waves-light">Upload <i class="mdi mdi-upload"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -221,7 +253,7 @@ table.dataTable tbody td {
|
||||
</span>
|
||||
|
||||
</td>
|
||||
<td><?php echo change_date_format($row['created_at'],'Y-m-d H:i:s','d M Y h:i a').' by <br>'.$row['first_name'] ?></td>
|
||||
<td><?php echo change_date_format($row['created_at'],'Y-m-d H:i:s','d M Y h:i a').' <br> by '.$row['first_name'] ?></td>
|
||||
<td>
|
||||
<?php if($row['file_status'] != 'failed'){?>
|
||||
<div class="btn-group dropdown">
|
||||
@ -263,50 +295,59 @@ table.dataTable tbody td {
|
||||
<form role="form" class="parsley-examples" method="post" id="insurer_statement_upload_form" enctype="multipart/form-data" action="upload">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<div class="form-group col-md-10">
|
||||
<label for="insurer"> Insurer <spanclass="text-danger">*</spanclass=></label>
|
||||
<select class="form-control" id="insurer" name="insurer" required>
|
||||
<option value="" selected>Select Insurer</option>
|
||||
<?php
|
||||
if (isset($insurers) && count($insurers)) {
|
||||
foreach ($insurers as $key => $value) {
|
||||
echo "<option value=" . $value['insurer_id'].'-'.$value['id'] . ">" . $value['insurer_name'] .'-'. $value['branch_code'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-10">
|
||||
<label for="statement_month">Statement month</label>
|
||||
<input type="text" class="form-control" id="statement_month" name="statement_month" placeholder="" required readonly onchange="getStatementNo()">
|
||||
<div class="row">
|
||||
<div class="form-group float-right-end offset-8 col-4">
|
||||
<span><a href="downloadSampleInsurerStatement" id="download_sample_file" style="font-size: small; color:red !important;">Download sample file</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-10">
|
||||
<label for="statement_no">Statement no</label>
|
||||
<select class="form-control" id="statement_no" name="statement_no" required >
|
||||
<option value="" selected>Select statement no</option>
|
||||
<?php
|
||||
$stmt_no = [1,2,3,4,5,6,7];
|
||||
if (isset($stmt_no) && count($stmt_no)) {
|
||||
foreach ($stmt_no as $key => $value) {
|
||||
echo "<option value=" . $value . ">" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="insurer"> Insurer <spanclass="text-danger">*</spanclass=></label>
|
||||
<select class="form-control" id="insurer" name="insurer" required>
|
||||
<option value="" selected>Select Insurer</option>
|
||||
<?php
|
||||
if (isset($insurers) && count($insurers)) {
|
||||
foreach ($insurers as $key => $value) {
|
||||
echo "<option value=" . $value['insurer_id'].'-'.$value['id'] . ">" . $value['insurer_name'] .'-'. $value['branch_code'] . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="statement_month">Statement month</label>
|
||||
<input type="text" class="form-control" id="statement_month" name="statement_month" placeholder="" required readonly onchange="getStatementNo()">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-10" >
|
||||
<label for="statment">Statement </label> <span><a href="downloadSampleInsurerStatement" id="download_sample_file" style="font-size: small;">Download sample file</a></span>
|
||||
<input type="file" class="form-control" name="statement" required accept=" application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,application/vnd.oasis.opendocument.spreadsheet">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="statement_no">Statement no</label>
|
||||
<select class="form-control" id="statement_no" name="statement_no" required >
|
||||
<option value="" selected>Select statement no</option>
|
||||
<?php
|
||||
$stmt_no = [1,2,3,4,5,6,7];
|
||||
if (isset($stmt_no) && count($stmt_no)) {
|
||||
foreach ($stmt_no as $key => $value) {
|
||||
echo "<option value=" . $value . ">" . $value . "</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="statment">Statement </label>
|
||||
<div class="input-icon">
|
||||
<input type="file" class="form-control" name="statement" required accept=" application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,application/vnd.oasis.opendocument.spreadsheet">
|
||||
<i class="mdi mdi-upload additional-icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right m-b-0">
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1"
|
||||
id="btnSubmit">Submit</button>
|
||||
<button type="button"class="btn app-btn-outline-secondary mr-2" data-dismiss="modal" aria-hidden="true">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnSubmit">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -365,6 +406,7 @@ table.dataTable tbody td {
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<!-- Invoice Number and Invoice Date in same row -->
|
||||
<!-- <div id="invoice_no_div_modal" style="display: none;"> -->
|
||||
@ -422,10 +464,7 @@ table.dataTable tbody td {
|
||||
|
||||
<!-- Payment Received Table -->
|
||||
<div class="form-group col-md-12" style="display: none;" id="payment_table_div_modal" style="max-width: 800px;">
|
||||
<button type="button" id="add_row_btn" class="btn btn-secondary float-right"><i class="fa fa-plus"></i></button>
|
||||
|
||||
|
||||
<table data-custom-table-css="table" class="table table-bordered" id="payment_table_modal">
|
||||
<!-- <table data-custom-table-css="table" class="table table-bordered" id="payment_table_modal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="display: none;">pk</th>
|
||||
@ -448,14 +487,51 @@ table.dataTable tbody td {
|
||||
<td><i class="mdi mdi-delete mr-2 font-18 vertical-middle text-danger remove-row" style="text-align: center;"></i></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table> -->
|
||||
<!-- <button type="button" id="add_row_btn" class="btn btn-secondary float-right mt-2"><i class="fa fa-plus"></i></button> -->
|
||||
|
||||
<div class="payment-card">
|
||||
<input type="hidden" class="form-control" name="pk[]" placeholder="Enter Amount">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<label>Invoice value</label>
|
||||
<input type="number" class="form-control" name="received_amount[]" placeholder="Enter Amount" required step="0.01" onchange="checkInvAmont(event)">
|
||||
</div>
|
||||
<div class="col">
|
||||
<label>GST</label>
|
||||
<input type="number" class="form-control" name="gst_amount[]" placeholder="Enter GST" required step="0.01" onchange="checkInvAmont(event)">
|
||||
</div>
|
||||
<div class="col">
|
||||
<label>TDS</label>
|
||||
<input type="number" class="form-control" name="tds[]" placeholder="Enter TDS" onchange="checkInvAmont(event)" required>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label>UTR Number</label>
|
||||
<input type="text" class="form-control" name="utr_no[]" placeholder="Enter UTR No" required>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label>Date</label>
|
||||
<input type="text" class="form-control payment_date" name="payment_date[]" value="<?php echo date('d/m/Y'); ?>" placeholder="dd/mm/yyyy" required readonly>
|
||||
</div>
|
||||
<div class="col-auto d-flex align-items-end">
|
||||
<button type="button" class="btn btn-danger btn-sm remove-row">
|
||||
<i class="mdi mdi-delete"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="payment_card_container"></div>
|
||||
<div class="form-group text-right m-b-0">
|
||||
<button type="button" id="add_row_btn" class=" ml-2 btn app-btn-primary"><i class="mdi mdi-plus"></i></button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right m-b-0">
|
||||
<!-- <button type="button" id="add_row_btn" class="btn btn-primary waves-effect waves-light mr-1">Add payment</button> -->
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnSubmit">Save</button>
|
||||
<button type="button" class="btn app-btn-outline-secondary mr-2" data-dismiss="modal" aria-hidden="true">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light" id="btnSubmit">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -717,61 +793,139 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
|
||||
// Add/Delete rows in the payment table
|
||||
document.getElementById('add_row_btn').addEventListener('click', function () {
|
||||
const tableBody = document.querySelector('#payment_table_modal tbody');
|
||||
const newRow = document.createElement('tr');
|
||||
// document.getElementById('add_row_btn').addEventListener('click', function () {
|
||||
// const tableBody = document.querySelector('#payment_table_modal tbody');
|
||||
// const newRow = document.createElement('tr');
|
||||
|
||||
newRow.innerHTML = `
|
||||
<td style="display: none;"><input type="hidden" class="form-control" name="pk[]" placeholder="Enter Amount"></td>
|
||||
<td><input type="number" class="form-control" name="received_amount[]" placeholder="Enter Amount" onchange="checkInvAmont(event)" required step="0.01"></td>
|
||||
<td><input type="number" class="form-control" name="gst_amount[]" placeholder="Enter GST" onchange="checkInvAmont(event)" required step="0.01"></td>
|
||||
<td><input type="number" class="form-control" name="tds[]" placeholder="Enter TDS" onchange="checkInvAmont(event)" required></td>
|
||||
<td><input type="text" class="form-control" name="utr_no[]" placeholder="Enter UTR No" required></td>
|
||||
<td><input type="text" class="form-control payment_date" value="<?php echo date('d/m/Y'); ?>" name="payment_date[]" placeholder="dd/mm/yyyy" required readonly></td>
|
||||
<td><i class="mdi mdi-delete mr-2 font-18 vertical-middle text-danger remove-row" style="text-align: center;"></i></td>
|
||||
`;
|
||||
// newRow.innerHTML = `
|
||||
// <td style="display: none;"><input type="hidden" class="form-control" name="pk[]" placeholder="Enter Amount"></td>
|
||||
// <td><input type="number" class="form-control" name="received_amount[]" placeholder="Enter Amount" onchange="checkInvAmont(event)" required step="0.01"></td>
|
||||
// <td><input type="number" class="form-control" name="gst_amount[]" placeholder="Enter GST" onchange="checkInvAmont(event)" required step="0.01"></td>
|
||||
// <td><input type="number" class="form-control" name="tds[]" placeholder="Enter TDS" onchange="checkInvAmont(event)" required></td>
|
||||
// <td><input type="text" class="form-control" name="utr_no[]" placeholder="Enter UTR No" required></td>
|
||||
// <td><input type="text" class="form-control payment_date" value="<?php echo date('d/m/Y'); ?>" name="payment_date[]" placeholder="dd/mm/yyyy" required readonly></td>
|
||||
// <td><i class="mdi mdi-delete mr-2 font-18 vertical-middle text-danger remove-row" style="text-align: center;"></i></td>
|
||||
// `;
|
||||
|
||||
tableBody.appendChild(newRow);
|
||||
$('.payment_date').datepicker({
|
||||
format: 'dd/mm/yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
});
|
||||
// tableBody.appendChild(newRow);
|
||||
// $('.payment_date').datepicker({
|
||||
// format: 'dd/mm/yyyy',
|
||||
// autoclose: true
|
||||
// });
|
||||
// });
|
||||
|
||||
// Remove row
|
||||
document.getElementById('payment_table_modal').addEventListener('click', function (e) {
|
||||
if (e.target && e.target.classList.contains('remove-row')) {
|
||||
if (confirm("Do you want to delete this entry?")) {
|
||||
var row = e.target.closest('tr');
|
||||
var pk = row.querySelector('input[name="pk[]"]').value;
|
||||
// document.getElementById('payment_table_modal').addEventListener('click', function (e) {
|
||||
// if (e.target && e.target.classList.contains('remove-row')) {
|
||||
// if (confirm("Do you want to delete this entry?")) {
|
||||
// var row = e.target.closest('tr');
|
||||
// var pk = row.querySelector('input[name="pk[]"]').value;
|
||||
|
||||
if (pk === "") {
|
||||
// If pk is empty, remove the row
|
||||
row.remove();
|
||||
} else {
|
||||
// If pk is non-empty, send AJAX request to remove it from the backend
|
||||
$.ajax({
|
||||
url: 'deletePaymentEntry/'+pk, // Your backend URL here
|
||||
type: 'GET',
|
||||
// data: { pk: pk }, // Send the pk value to delete on server-side
|
||||
success: function (response) {
|
||||
// On success, remove the row
|
||||
console.log(response);
|
||||
if (response.dataStatus) {
|
||||
row.remove();
|
||||
alert('Payment deleted successfully.');
|
||||
} else {
|
||||
alert('Failed to delete the entry.');
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
alert('Error occurred while deleting the entry.');
|
||||
// if (pk === "") {
|
||||
// // If pk is empty, remove the row
|
||||
// row.remove();
|
||||
// } else {
|
||||
// // If pk is non-empty, send AJAX request to remove it from the backend
|
||||
// $.ajax({
|
||||
// url: 'deletePaymentEntry/'+pk, // Your backend URL here
|
||||
// type: 'GET',
|
||||
// // data: { pk: pk }, // Send the pk value to delete on server-side
|
||||
// success: function (response) {
|
||||
// // On success, remove the row
|
||||
// console.log(response);
|
||||
// if (response.dataStatus) {
|
||||
// row.remove();
|
||||
// alert('Payment deleted successfully.');
|
||||
// } else {
|
||||
// alert('Failed to delete the entry.');
|
||||
// }
|
||||
// },
|
||||
// error: function () {
|
||||
// alert('Error occurred while deleting the entry.');
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
document.getElementById('add_row_btn').addEventListener('click', function () {
|
||||
const container = document.getElementById('payment_card_container'); // wrapper div for cards
|
||||
const newCard = document.createElement('div');
|
||||
newCard.classList.add('payment-card');
|
||||
|
||||
newCard.innerHTML = `
|
||||
<input type="hidden" class="form-control" name="pk[]" placeholder="Enter Amount">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<label>Invoice value</label>
|
||||
<input type="number" class="form-control" name="received_amount[]" placeholder="Enter Amount" onchange="checkInvAmont(event)" required step="0.01">
|
||||
</div>
|
||||
<div class="col">
|
||||
<label>GST</label>
|
||||
<input type="number" class="form-control" name="gst_amount[]" placeholder="Enter GST" onchange="checkInvAmont(event)" required step="0.01">
|
||||
</div>
|
||||
<div class="col">
|
||||
<label>TDS</label>
|
||||
<input type="number" class="form-control" name="tds[]" placeholder="Enter TDS" onchange="checkInvAmont(event)" required>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label>UTR Number</label>
|
||||
<input type="text" class="form-control" name="utr_no[]" placeholder="Enter UTR No" required>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label>Date</label>
|
||||
<input type="text" class="form-control payment_date" value="<?php echo date('d/m/Y'); ?>" name="payment_date[]" placeholder="dd/mm/yyyy" required readonly>
|
||||
</div>
|
||||
<div class="col-auto d-flex align-items-end">
|
||||
<button type="button" class="btn btn-danger btn-sm remove-row" style="text-align: center;">
|
||||
<i class="mdi mdi-delete"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
container.appendChild(newCard);
|
||||
|
||||
// Reinit datepicker
|
||||
$('.payment_date').datepicker({
|
||||
format: 'dd/mm/yyyy',
|
||||
autoclose: true
|
||||
});
|
||||
});
|
||||
|
||||
// Remove row (card)
|
||||
document.getElementById('payment_card_container').addEventListener('click', function (e) {
|
||||
if (e.target.closest('.remove-row')) {
|
||||
const card = e.target.closest('.payment-card');
|
||||
if (confirm("Do you want to delete this entry?")) {
|
||||
const pk = card.querySelector('input[name="pk[]"]').value;
|
||||
|
||||
if (pk === "") {
|
||||
// frontend only remove
|
||||
card.remove();
|
||||
} else {
|
||||
// AJAX delete request
|
||||
$.ajax({
|
||||
url: 'deletePaymentEntry/' + pk,
|
||||
type: 'GET',
|
||||
success: function (response) {
|
||||
if (response.dataStatus) {
|
||||
card.remove();
|
||||
alert('Payment deleted successfully.');
|
||||
} else {
|
||||
alert('Failed to delete the entry.');
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
alert('Error occurred while deleting the entry.');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,22 +1,26 @@
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="col-xl-12">
|
||||
<h4 class="ml-1 mb-3"> <span class="font-color-black">IRBA</span> </h4>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-12" id="outstanding_filter">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-1">
|
||||
<h5 class="m-1">
|
||||
<label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
|
||||
<span class="font-color-black">Filters</span>
|
||||
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
|
||||
aria-expanded="true">
|
||||
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
|
||||
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
|
||||
</a>
|
||||
</h5>
|
||||
</label>
|
||||
<div class="card mb-1">
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<!-- <div class="text-center"> -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate" value=<?= $default_start ?>>
|
||||
<input type="hidden" id="endDate" value=<?= $default_end ?>>
|
||||
@ -58,11 +62,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mb-1">
|
||||
|
||||
<div id="report"></div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
var end = moment(end, 'DD/MM/YYYY');
|
||||
|
||||
function cb(start, end) {
|
||||
$('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
$('#startDate').val(start.format('DD-MM-YYYY'));
|
||||
$('#endDate').val(end.format('DD-MM-YYYY'));
|
||||
}
|
||||
@ -81,6 +81,7 @@
|
||||
$('#reportrange').daterangepicker({
|
||||
startDate: start,
|
||||
endDate: end,
|
||||
locale: { format: 'DD-MM-YYYY' },
|
||||
ranges: {
|
||||
'Today': [moment(), moment()],
|
||||
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
|
||||
@ -157,8 +157,28 @@
|
||||
"closeButton": true,
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#collapseOne').on('show.bs.collapse', function () {
|
||||
// When open
|
||||
$('#icon').removeClass('mdi-chevron-down').addClass('mdi-chevron-up');
|
||||
// $('#filterAccordion').removeAttr("style"); // remove bg/border when open
|
||||
});
|
||||
|
||||
$('#collapseOne').on('hide.bs.collapse', function () {
|
||||
// When closed
|
||||
$('#icon').removeClass('mdi-chevron-up').addClass('mdi-chevron-down');
|
||||
// $('#filterAccordion').css({
|
||||
// "background-color": "#F5FFFF",
|
||||
// "border": "2px solid #F5FFFF",
|
||||
// "border-radius": "10px",
|
||||
// "box-shadow": "0px 4px 4px 0px #00000040"
|
||||
// });
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<script>
|
||||
var pullNotificationCount = 0;
|
||||
var pendingActionCount = 0;
|
||||
|
||||
@ -1847,7 +1847,7 @@
|
||||
|
||||
<!-- Top Bar -->
|
||||
<div class="top-navbar-div" style="margin-left:130px;">
|
||||
<div>
|
||||
<div class="top-navbar-title">
|
||||
<h5>Welcome <?= (isset(get_session_userdata()->first_name) ? get_session_userdata()->first_name : 'NOT SET') ?> </h5>
|
||||
</div>
|
||||
<div class="nav-flex">
|
||||
|
||||
@ -26,16 +26,20 @@ table.dataTable tbody td {
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row" id="outstanding_filter">
|
||||
<div class="col-12" style="margin-top: -12px;">
|
||||
<div class="col-12">
|
||||
<h4 class="ml-1 mb-3"> <span class="font-color-black">Outstanding</span> </h4>
|
||||
</div>
|
||||
|
||||
<div class="col-12" id="outstanding_filter">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-1">
|
||||
<h5 class="m-1">
|
||||
<label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
|
||||
<span class="font-color-black">Filters</span>
|
||||
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
|
||||
aria-expanded="true">
|
||||
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
|
||||
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
|
||||
</a>
|
||||
</h5>
|
||||
</label>
|
||||
<div class="card mb-1">
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
@ -55,7 +59,7 @@ table.dataTable tbody td {
|
||||
</select>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="addon_policy"> Insurer <span id="base_danger"
|
||||
class="text-danger"></span></label>
|
||||
<select class="form-control" id="insurer_id" name="insurer_id">
|
||||
@ -68,11 +72,11 @@ table.dataTable tbody td {
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="addon_policy"> Insurer Branch<span id="base_danger"
|
||||
class="text-danger"></span></label>
|
||||
<select class="form-control" id="insurer_id" name="insurer_id">
|
||||
<option value="0" selected>Select Insurer</option>
|
||||
<option value="0" selected>Select Insurer Branch</option>
|
||||
<?php if(isset($insurer) && count($insurer)){ ?>
|
||||
<?php foreach ($insurer as $value) { ?>
|
||||
<option value="<?= $value['id']?>"><?= $value['name']?></option>
|
||||
@ -128,13 +132,20 @@ table.dataTable tbody td {
|
||||
</select>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group col-md-3" style="display: true;" id="date_div">
|
||||
<div class="form-group col-md-4" style="display: true;" id="date_div">
|
||||
<label>Statement Month<span class="text-danger"></span></label>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<!--
|
||||
codeword : ***1***
|
||||
if you cross check means also uncomment "star2star" (***2***)
|
||||
<div id="reportrange" class="form-control"
|
||||
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div>
|
||||
</div> -->
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
</div>
|
||||
@ -152,9 +163,7 @@ table.dataTable tbody td {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12" id="outstanding_list">
|
||||
@ -216,6 +225,25 @@ table.dataTable tbody td {
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#collapseOne').on('show.bs.collapse', function () {
|
||||
// When open
|
||||
$('#icon').removeClass('mdi-chevron-down').addClass('mdi-chevron-up');
|
||||
$('#filterAccordion').removeAttr("style"); // remove custom bg/border when open
|
||||
});
|
||||
|
||||
$('#collapseOne').on('hide.bs.collapse', function () {
|
||||
// When closed
|
||||
$('#icon').removeClass('mdi-chevron-up').addClass('mdi-chevron-down');
|
||||
// $('#filterAccordion').css({
|
||||
// "background-color": "#F5FFFF",
|
||||
// "border": "2px solid #F5FFFF",
|
||||
// "border-radius": "10px",
|
||||
// "box-shadow": "0px 4px 4px 0px #00000040"
|
||||
// });
|
||||
});
|
||||
});
|
||||
|
||||
// Datatable document ready
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -227,14 +255,19 @@ $(document).ready(function() {
|
||||
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: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
className: 'btn app-btn-secondary ',
|
||||
buttons: [{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||
title: 'Policy-Tranction-BDS-List',
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
text: 'Excel',
|
||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||
title: 'Policy-Tranction-BDS-List',
|
||||
customize: function(xlsx) {
|
||||
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
||||
@ -264,7 +297,8 @@ $(document).ready(function() {
|
||||
$(sheet).find('sheetData').append(totalRow);
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
@ -376,7 +410,10 @@ $(function() {
|
||||
// var end = moment();
|
||||
|
||||
function cb(start, end) {
|
||||
$('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
// codeword : ***2***
|
||||
// if you cross check means also uncomment "star1star" (***1***)
|
||||
// $('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
$('#startDate').val(start.format('DD-MM-YYYY'));
|
||||
$('#endDate').val(end.format('DD-MM-YYYY'));
|
||||
}
|
||||
@ -384,11 +421,13 @@ $(function() {
|
||||
$('#reportrange').daterangepicker({
|
||||
startDate: start,
|
||||
endDate: end,
|
||||
// autoUpdateInput: false,
|
||||
locale: {
|
||||
format: 'DD-MM-YYYY' // 👈 force input format
|
||||
},
|
||||
ranges: {
|
||||
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
||||
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month')
|
||||
.endOf('month')
|
||||
]
|
||||
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
}
|
||||
}, cb);
|
||||
|
||||
|
||||
@ -1,23 +1,31 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h4 class="ml-1 mb-3"> <span class="font-color-black">Renewal Policy</span> </h4>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-12">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-1">
|
||||
<h5 class="m-1">
|
||||
<label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
|
||||
<span class="font-color-black">Filters</span>
|
||||
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
|
||||
aria-expanded="true">
|
||||
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
|
||||
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
|
||||
</a>
|
||||
</h5>
|
||||
</label>
|
||||
<div class="card mb-1">
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<!-- <div class="text-center"> -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-3" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control"
|
||||
<!-- <div id="reportrange" class="form-control"
|
||||
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
</div> -->
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate" value=<?= $default_start ?>>
|
||||
<input type="hidden" id="endDate" value=<?= $default_end ?>>
|
||||
@ -68,7 +76,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="report"></div>
|
||||
|
||||
@ -89,7 +97,7 @@ $(function() {
|
||||
var end = moment(end, 'DD/MM/YYYY');
|
||||
|
||||
function cb(start, end) {
|
||||
$('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
$('#startDate').val(start.format('DD-MM-YYYY'));
|
||||
$('#endDate').val(end.format('DD-MM-YYYY'));
|
||||
}
|
||||
@ -97,6 +105,7 @@ $(function() {
|
||||
$('#reportrange').daterangepicker({
|
||||
startDate: start,
|
||||
endDate: end,
|
||||
locale: { format: 'DD-MM-YYYY' },
|
||||
ranges: {
|
||||
'Today': [moment(), moment()],
|
||||
'Next 7 Days': [moment(), moment().add(6, 'days')], // Next 7 Days
|
||||
|
||||
@ -20,6 +20,21 @@ table.dataTable tbody td {
|
||||
.right-align-input {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.badge-container {
|
||||
background: #F0F0F0;
|
||||
padding: 6px 12px;
|
||||
border-radius: 6px;
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
}
|
||||
#totals {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div class="col-12" id="second_page">
|
||||
@ -32,14 +47,34 @@ table.dataTable tbody td {
|
||||
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<div id="totals" style="margin-bottom: 10px;">
|
||||
<strong>Total Premium:</strong> <span id="total_premium">0.00</span> |
|
||||
<strong>Total Rewards:</strong> <span id="total_rewards">0.00</span> |
|
||||
<strong>Total IRDA Revenue INR:</strong> <span id="total_irda">0.00</span> |
|
||||
<strong>Total Billed Amount:</strong> <span id="total_billed">0.00</span> |
|
||||
<strong>Total Unbilled Amount:</strong> <span id="total_unbilled">0.00</span> |
|
||||
<strong>Total Policy Count:</strong> <span id="total_policy_count"><?= $policy_count ?></span>
|
||||
</div>
|
||||
<div id="totals" class="d-flex flex-wrap gap-2 mb-2">
|
||||
|
||||
<div class="badge-container">
|
||||
Total Premium: <span class="text-primary" id="total_premium">0.00</span>
|
||||
</div>
|
||||
|
||||
<div class="badge-container">
|
||||
Total Rewards: <span class="text-primary" id="total_rewards">0.00</span>
|
||||
</div>
|
||||
|
||||
<div class="badge-container">
|
||||
Total IRDA Revenue INR: <span class="text-primary" id="total_irda">0.00</span>
|
||||
</div>
|
||||
|
||||
<div class="badge-container">
|
||||
Total Billed Amount: <span class="text-primary" id="total_billed">0.00</span>
|
||||
</div>
|
||||
|
||||
<div class="badge-container">
|
||||
Total Unbilled Amount: <span class="text-primary" id="total_unbilled">0.00</span>
|
||||
</div>
|
||||
|
||||
<div class="badge-container">
|
||||
Total Policy Count: <span class="text-primary"><?= $policy_count ?></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<table data-custom-table-css="table" id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
@ -227,10 +262,15 @@ $(document).ready(function() {
|
||||
// }
|
||||
// }
|
||||
// ],
|
||||
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: 'CSV',
|
||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||
title: 'Policy-Tranction-BDS-List',
|
||||
exportOptions: {
|
||||
columns: ':visible', // or specify exact columns [0,1,2,...]
|
||||
@ -251,8 +291,9 @@ $(document).ready(function() {
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
text: 'Excel',
|
||||
title: 'Policy-Tranction-BDS-List',
|
||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||
className: 'app-btn-primary ',
|
||||
// customize: function (xlsx) {
|
||||
// var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
||||
// var total = 0;
|
||||
@ -360,8 +401,9 @@ $(document).ready(function() {
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
searchPlaceholder: "Search..."
|
||||
|
||||
@ -5,16 +5,20 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12" style="margin-top: -12px;">
|
||||
<div class="col-12">
|
||||
<h3 class="ml-1 mb-3"> <span class="font-color-black">BDS</span> </h3>
|
||||
</div>
|
||||
|
||||
<div class="col-12" id="bds_filter">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-1">
|
||||
<h5 class="m-1">
|
||||
<label id="filterAccordion" class="m-1 d-flex justify-content-between align-items-center">
|
||||
<span class="font-color-black">Filters</span>
|
||||
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
|
||||
aria-expanded="true">
|
||||
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
|
||||
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
|
||||
</a>
|
||||
</h5>
|
||||
</label>
|
||||
<div class="card mb-1">
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
@ -113,9 +117,9 @@
|
||||
|
||||
<div class="form-group col-md-3" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
@ -140,11 +144,11 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- end page title -->
|
||||
<div class="row" id="file_list">
|
||||
<div id="file_list">
|
||||
<?php include('report_bds.php'); ?>
|
||||
</div>
|
||||
|
||||
@ -291,7 +295,7 @@ $(function() {
|
||||
// var end = moment();
|
||||
|
||||
function cb(start, end) {
|
||||
$('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
$('#startDate').val(start.format('DD-MM-YYYY'));
|
||||
$('#endDate').val(end.format('DD-MM-YYYY'));
|
||||
}
|
||||
@ -299,6 +303,7 @@ $(function() {
|
||||
$('#reportrange').daterangepicker({
|
||||
startDate: start,
|
||||
endDate: end,
|
||||
locale: { format: 'DD-MM-YYYY' },
|
||||
ranges: {
|
||||
'Today': [moment(), moment()],
|
||||
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
|
||||
@ -26,17 +26,20 @@ table.dataTable tbody td {
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row" id="varience_filter">
|
||||
<div class="col-12">
|
||||
<h3 class="ml-1 mb-3"> <span class="font-color-black">Variance</span> </h3>
|
||||
</div>
|
||||
|
||||
<div class="col-12" style="margin-top: -12px;">
|
||||
<div class="col-12" id="varience_filter">
|
||||
<div id="accordion" class="mb-3">
|
||||
<div class="card mb-1">
|
||||
<h5 class="m-1">
|
||||
<label class="m-1 d-flex justify-content-between align-items-center">
|
||||
<span class="title-text font-color-black" style="margin-top: 8px;">Filters</span>
|
||||
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
|
||||
aria-expanded="true">
|
||||
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
|
||||
<i id="icon" class="mdi mdi-chevron-up mr-1 text-primary" style="font-size: 28px;"></i>
|
||||
</a>
|
||||
</h5>
|
||||
</label>
|
||||
<div class="card mb-1">
|
||||
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
@ -122,10 +125,9 @@ table.dataTable tbody td {
|
||||
|
||||
<div class="form-group col-md-3" style="display: none;" id="date_div">
|
||||
<label>Date<span class="text-danger"></span></label>
|
||||
<div id="reportrange" class="form-control"
|
||||
style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
|
||||
<i class="mdi mdi-calendar-blank"></i>
|
||||
<span></span> <i class="mdi mdi-menu-down"></i>
|
||||
<div class="input-icon">
|
||||
<input type="text" id="reportrange" class="form-control" readonly style="caret-color: transparent;">
|
||||
<i class="mdi mdi-calendar-blank-outline additional-icon"></i>
|
||||
</div>
|
||||
<input type="hidden" id="startDate">
|
||||
<input type="hidden" id="endDate">
|
||||
@ -145,9 +147,7 @@ table.dataTable tbody td {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12" id="varience_list">
|
||||
@ -227,14 +227,19 @@ $(document).ready(function() {
|
||||
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: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
className: 'btn app-btn-secondary ',
|
||||
buttons: [{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||
title: 'Policy-Tranction-BDS-List',
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
text: 'Excel',
|
||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||
title: 'Policy-Tranction-BDS-List',
|
||||
customize: function(xlsx) {
|
||||
var sheet = xlsx.xl.worksheets['sheet1.xml'];
|
||||
@ -264,7 +269,8 @@ $(document).ready(function() {
|
||||
$(sheet).find('sheetData').append(totalRow);
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
@ -401,7 +407,7 @@ $(function() {
|
||||
// var end = moment();
|
||||
|
||||
function cb(start, end) {
|
||||
$('#reportrange span').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
$('#reportrange').html(start.format('D-MM-YYYY') + ' - ' + end.format('D-MM-YYYY'));
|
||||
$('#startDate').val(start.format('DD-MM-YYYY'));
|
||||
$('#endDate').val(end.format('DD-MM-YYYY'));
|
||||
}
|
||||
@ -409,6 +415,7 @@ $(function() {
|
||||
$('#reportrange').daterangepicker({
|
||||
startDate: start,
|
||||
endDate: end,
|
||||
locale: { format: 'DD-MM-YYYY' },
|
||||
ranges: {
|
||||
'Today': [moment(), moment()],
|
||||
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
|
||||
@ -466,40 +466,53 @@ $(document).ready(function() {
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#scroll-horizontal-datatable').DataTable({
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'Vehicle-Master-List',
|
||||
className: 'my_class',
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
},
|
||||
},
|
||||
{
|
||||
text: 'ADD',
|
||||
className: 'btn-color',
|
||||
attr: {
|
||||
id: 'btnAdd',
|
||||
title: 'Add'
|
||||
},
|
||||
action: function () {
|
||||
showModal('add')
|
||||
}
|
||||
}
|
||||
],
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
searchPlaceholder: "Search..."
|
||||
},
|
||||
paging: true,
|
||||
});
|
||||
|
||||
})
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-2'f><'col-sm-10 text-right'B>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
buttons: [
|
||||
{
|
||||
text: '<i class="mdi mdi-plus" ></i><span class=" btn-custom"> Add </span>',
|
||||
className: 'btn app-btn-primary btn-color mr-2',
|
||||
attr: {
|
||||
id: 'btnAdd',
|
||||
title: 'Add'
|
||||
},
|
||||
action: function () {
|
||||
showModal('add')
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'collection',
|
||||
text: '<span class=" btn-custom"> Export </span><i class="mdi mdi-menu-down"></i>',
|
||||
className: 'btn app-btn-secondary ',
|
||||
buttons: [
|
||||
{
|
||||
extend: 'csv',
|
||||
title: 'Vehicle-Master-List',
|
||||
className: 'my_class',
|
||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||
className: 'app-btn-primary my_class',
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
},
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
text: '<i class="mdi mdi-file-excel " ></i><span class=" btn-custom"> EXCEL </span>',
|
||||
exportOptions: {
|
||||
orthogonal: 'sort'
|
||||
},
|
||||
className: 'app-btn-primary ',
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
paging: true,
|
||||
pageLength: 25,
|
||||
order: [[0, 'desc']]
|
||||
});
|
||||
});
|
||||
|
||||
function getEditVehicleDetailsData(input) {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user