@@ -296,7 +309,7 @@
$("#resetButton").click(function() {
$("#fromDate").val('');
$("#toDate").val('');
- table.draw(); // Redraw the table to clear the filter
+ window.location="amendmentpurchaseorder"
});
// Automatically focus and open the To Date picker when From Date is selected
diff --git a/app/Views/POlist.php b/app/Views/POlist.php
index a3696fa1..00693550 100755
--- a/app/Views/POlist.php
+++ b/app/Views/POlist.php
@@ -108,23 +108,34 @@
@@ -266,7 +277,7 @@
var table = $('#po_list').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
- 'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
+ 'csv', 'excel', 'pdf', // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [
@@ -288,67 +299,15 @@
}
});
- // Date range filter function
- $.fn.dataTable.ext.search.push(
- function(settings, data, dataIndex) {
- var fromDate = $('#fromDate').val();
- var toDate = $('#toDate').val();
- console.log(fromDate); // e.g., 01-09-2024
- console.log(toDate); // e.g., 08-09-2024
-
- if (!fromDate || !toDate) {
- return true; // If no dates selected, don't filter
- }
-
- // Convert the fromDate and toDate from dd-mm-yyyy to Date objects
- var fromParts = fromDate.split("-");
- var toParts = toDate.split("-");
-
- var startDate = new Date(fromParts[2], fromParts[1] - 1, fromParts[0]); // Year, month (0-based), day
- var endDate = new Date(toParts[2], toParts[1] - 1, toParts[0]);
-
- // Adjust startDate to include the day before the selected fromDate
- startDate.setDate(startDate.getDate() - 1);
-
- // Ensure endDate includes the entire end date by setting time to the end of the day
- endDate.setHours(23, 59, 59, 999);
-
- // Get the date from the DataTable row (assuming it's in the first column in dd-mm-yyyy format)
- var dateStr = data[0];
- var dateParts = dateStr.split("-");
- var rowDate = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]);
-
- // Return true if the row date is within the range
- return rowDate >= startDate && rowDate <= endDate;
- }
- );
-
- // Handle form submission for the date range filter
- $("#DateRangeFilter").submit(function(e) {
- e.preventDefault();
- table.draw(); // Redraw the table to apply the filter
- });
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").val('');
$("#toDate").val('');
- table.draw(); // Redraw the table to clear the filter
+ window.location='purchaseorderListing'
});
- // Automatically focus and open the To Date picker when From Date is selected
- document.getElementById('fromDate').addEventListener('change', function() {
- var fromDate = this.value;
- var toDateInput = document.getElementById('toDate');
-
- // Set the min attribute of the To Date input to the selected From Date
- toDateInput.min = fromDate;
-
- // Optionally reset the To Date input if the current value is before the new min date
- if (toDateInput.value < fromDate) {
- toDateInput.value = fromDate;
- }
- });
+
});
$(document).ready(function() {
diff --git a/app/Views/addasset.php b/app/Views/addasset.php
index 6abc9ee0..d477a31a 100755
--- a/app/Views/addasset.php
+++ b/app/Views/addasset.php
@@ -276,7 +276,7 @@
$('#loader').show();
$.ajax({
type: 'POST',
- url: "assetdetails/getline",
+ url: "assetdetails/getline",
data: 'line=' + line,
success: function(data) {
$.each(JSON.parse(data), function(i, item) {
diff --git a/app/Views/porelease_view.php b/app/Views/porelease_view.php
index c2a78af0..f350a4f1 100755
--- a/app/Views/porelease_view.php
+++ b/app/Views/porelease_view.php
@@ -146,18 +146,29 @@ if (empty($Status)) {
-
+
+
+
+
+
+
+
@@ -560,7 +571,7 @@ if (empty($Status)) {
var table = $('#po_release').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
- 'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
+ 'csv', 'excel', 'pdf' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [
@@ -583,67 +594,15 @@ if (empty($Status)) {
});
- // Date range filter function
- $.fn.dataTable.ext.search.push(
- function(settings, data, dataIndex) {
- var fromDate = $('#fromDate').val();
- var toDate = $('#toDate').val();
- console.log(fromDate); // e.g., 01-09-2024
- console.log(toDate); // e.g., 08-09-2024
-
- if (!fromDate || !toDate) {
- return true; // If no dates selected, don't filter
- }
-
- // Convert the fromDate and toDate from dd-mm-yyyy to Date objects
- var fromParts = fromDate.split("-");
- var toParts = toDate.split("-");
-
- var startDate = new Date(fromParts[2], fromParts[1] - 1, fromParts[0]); // Year, month (0-based), day
- var endDate = new Date(toParts[2], toParts[1] - 1, toParts[0]);
-
- // Adjust startDate to include the day before the selected fromDate
- startDate.setDate(startDate.getDate() - 1);
-
- // Ensure endDate includes the entire end date by setting time to the end of the day
- endDate.setHours(23, 59, 59, 999);
-
- // Get the date from the DataTable row (assuming it's in the first column in dd-mm-yyyy format)
- var dateStr = data[0];
- var dateParts = dateStr.split("-");
- var rowDate = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]);
-
- // Return true if the row date is within the range
- return rowDate >= startDate && rowDate <= endDate;
- }
- );
-
- // Handle form submission for the date range filter
- $("#DateRangeFilter").submit(function(e) {
- e.preventDefault();
- table.draw(); // Redraw the table to apply the filter
- });
-
// Reset button functionality
$("#resetButton").click(function() {
$("#fromDate").val('');
$("#toDate").val('');
- table.draw(); // Redraw the table to clear the filter
+ window.location="PORelease"
});
// Automatically focus and open the To Date picker when From Date is selected
- document.getElementById('fromDate').addEventListener('change', function() {
- var fromDate = this.value;
- var toDateInput = document.getElementById('toDate');
-
- // Set the min attribute of the To Date input to the selected From Date
- toDateInput.min = fromDate;
-
- // Optionally reset the To Date input if the current value is before the new min date
- if (toDateInput.value < fromDate) {
- toDateInput.value = fromDate;
- }
- });
+
});
$(document).ready(function() {
$('.supplier-content').on('click', function() {