+ $cd = date("j F Y", strtotime($employee['created_at']));
+ $ct = date("h:i a", strtotime($employee['created_at']));
+ echo $cd . "
";
+ endif; ?>
-
@@ -222,7 +230,7 @@
console.log("window loaded");
});
-
+
// Function to convert object to query parameters
function objectToQueryString(obj) {
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
@@ -234,7 +242,7 @@
var client_id = $('#clients').val();
var insurer_id = $('#insurer').val();
var status = $('#status1').val();
-
+
var queryParams = {
client_id: client_id,
insurer_id: insurer_id,
@@ -260,7 +268,7 @@
var eno = $(this).data('eno');
var status = $(this).data('status');
// console.log(val);
- fetchRetailEndorsementData(id,eno,status)
+ fetchRetailEndorsementData(id, eno, status)
});
@@ -276,19 +284,19 @@
var endorsement_no = document.getElementById('endorsement_no').value.trim();
var edit_status = document.getElementById('edit_status').value.trim();
-
+
if (endorsement_no === "" || edit_status === "") {
toastr.warning('Please fill all required fields.', 'Warning');
form.classList.add('was-validated');
return;
}
-
+
$.ajax({
url: "= base_url('/employee/retail-endorsement-save') ?>",
type: "POST",
data: formData,
- processData: false,
- contentType: false,
+ processData: false,
+ contentType: false,
dataType: 'json',
success: function(response) {
if (response.status === "success") {
@@ -311,17 +319,17 @@
});
}
- function fetchRetailEndorsementData(id,eno,status) {
+ function fetchRetailEndorsementData(id, eno, status) {
$('.loader').fadeIn();
$('.loader-mask').fadeIn();
var form = document.getElementById('retailEndorsementForm');
- form.reset();
+ form.reset();
+
+ $("#edit_id").val(id);
+ $("#endorsement_no").val(eno);
+ $("#edit_status").val(status);
- $("#edit_id").val(id);
- $("#endorsement_no").val(eno);
- $("#edit_status").val(status);
-
setTimeout(function() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
@@ -353,33 +361,29 @@
// }
// }
// }],
- buttons: [
- {
- extend: 'collection',
- text: '
Export ',
- className: 'btn app-btn-secondary ',
- buttons: [
- {
- extend: 'csv',
- text: '
CSV ',
- className: 'app-btn-primary ',
- title: 'Retail-Endorsement-List',
- exportOptions: {
- columns: ':not(:last-child)',
- format: {
- body: function (data, row, column, node) {
- // Convert data to string to avoid scientific notation in CSV
- if (!isNaN(data) && parseFloat(data) > 1e20) {
- return `'${data}`;
- }
- return data.toString();// Ensures all data is treated as strings
- }
- }
- }
- },
- ]
+ buttons: [{
+ extend: 'collection',
+ text: '
Export ',
+ className: 'btn app-btn-secondary ',
+ buttons: [{
+ extend: 'csv',
+ text: '
CSV ',
+ className: 'app-btn-primary ',
+ title: 'Retail-Endorsement-List',
+ exportOptions: {
+ columns: ':not(:last-child)',
+ format: {
+ body: function(data, row, column, node) {
+ // Convert data to string to avoid scientific notation in CSV
+ if (!isNaN(data) && parseFloat(data) > 1e20) {
+ return `'${data}`;
+ }
+ return data.toString(); // Ensures all data is treated as strings
+ }
+ }
}
- ],
+ }, ]
+ }],
initComplete: function(settings, json) {
$('.my_class').css({
"position": "relative",
@@ -387,17 +391,19 @@
});
},
language: {
- search: `
+ search: `
_INPUT_
`,
- searchPlaceholder: "Search"
+ searchPlaceholder: "Search"
},
paging: true,
// pagingType: 'full_numbers'
- columnDefs: [
- { type: 'scientific', targets: 0 } // Apply custom sorting type to the first column
+ columnDefs: [{
+ type: 'scientific',
+ targets: 0
+ } // Apply custom sorting type to the first column
],
});
diff --git a/app/Views/variance_report_list.php b/app/Views/variance_report_list.php
index 6bd8969a..476a0439 100644
--- a/app/Views/variance_report_list.php
+++ b/app/Views/variance_report_list.php
@@ -156,49 +156,6 @@