diff --git a/app/Views/AmendPOlist.php b/app/Views/AmendPOlist.php index 07efdd7e..dbe27610 100644 --- a/app/Views/AmendPOlist.php +++ b/app/Views/AmendPOlist.php @@ -60,11 +60,11 @@
- + - - - + + +
@@ -188,87 +188,15 @@ - \ No newline at end of file + // Date range filter function + $.fn.dataTable.ext.search.push( + function(settings, data, dataIndex) { + var fromDate = $('#fromDate').val(); + var toDate = $('#toDate').val(); + + if (!fromDate || !toDate) { + return true; // If no dates selected, don't filter + } + + var dateStr = data[0]; // Assuming the date is in the first column + var dateParts = dateStr.split("-"); + var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object + + var startDate = new Date(fromDate); + var endDate = new Date(toDate); + + // 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); + + // Return true if the date is within the range + return date >= startDate && date <= 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 + }); + + // 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; + } + }); +}); + \ No newline at end of file diff --git a/app/Views/POlist.php b/app/Views/POlist.php index 12854d58..eaea187c 100644 --- a/app/Views/POlist.php +++ b/app/Views/POlist.php @@ -39,20 +39,20 @@ align-items: center; } .dataTables_wrapper .dataTables_length { - float: left; + /* float: left; */ } .dataTables_wrapper .dt-buttons, .dataTables_wrapper .dataTables_filter { - float: right; - margin-left: 10px; + /* float: right; */ + /* margin-left: 10px; */ } .dataTables_wrapper .dt-buttons { - margin-top: 10px; - margin-bottom: 10px; + /* margin-top: 10px; */ + /* margin-bottom: 10px; */ } .dataTables_wrapper .dataTables_filter { - margin-top: 10px; - margin-bottom: 10px; + /* margin-top: 10px; */ + /* margin-bottom: 10px; */ } @@ -88,14 +88,13 @@
- + - + - - -
+ +
@@ -202,146 +201,12 @@ + + - - - \ No newline at end of file + // Date range filter function + $.fn.dataTable.ext.search.push( + function(settings, data, dataIndex) { + var fromDate = $('#fromDate').val(); + var toDate = $('#toDate').val(); + + if (!fromDate || !toDate) { + return true; // If no dates selected, don't filter + } + + var dateStr = data[0]; // Assuming the date is in the first column + var dateParts = dateStr.split("-"); + var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object + + var startDate = new Date(fromDate); + var endDate = new Date(toDate); + + // 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); + + // Return true if the date is within the range + return date >= startDate && date <= 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 + }); + + // 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; + } + }); +}); + \ No newline at end of file diff --git a/app/Views/assetListing.php b/app/Views/assetListing.php index 10227862..bd3fa81b 100644 --- a/app/Views/assetListing.php +++ b/app/Views/assetListing.php @@ -35,43 +35,49 @@ color: #0056b3; } -
-
-
-
-
-

Asset Details

-
-
-
+
+
+ +
+ +
-
-
- - - - - - - - - -
- -
-
-
-
+
+
+
+ + + + + + + + + +
+ +
+
+ + + + + + +
+ @@ -122,13 +128,15 @@ ?>
Created Date
- -
+
+ + - - + + + + + \ No newline at end of file diff --git a/app/Views/configlisting.php b/app/Views/configlisting.php index eb9978ea..2315dbda 100644 --- a/app/Views/configlisting.php +++ b/app/Views/configlisting.php @@ -35,39 +35,26 @@ color: #0056b3; } -
-
-
-
-
-

Configuration Details

-
-
-
-
-
-
- - - - - - - -
-
-
- -
-
-
- +
+ +
+ +
+
+
+
+

Configuration Details

+
+
+ +
+ getFlashdata('error'); if ($error) { @@ -87,26 +74,34 @@
-
-
- listErrors('
', '
'); - ?>
-
-
-
-
- - - +
+
+
+
+ + + + + + + + + +
+ +
+
+ + - - - + + @@ -137,12 +132,17 @@ } } ?> - -
Create Date Configuration ID Configuration Name Description Action
-
-
-
+ + +
+
+
+ + + + + @@ -171,77 +171,78 @@ var dateSplit = date.split('-'); return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1; }; + // Initialize the DataTable - var table = $('#configtable').DataTable({ - "paging": true, - "lengthChange": true, - "searching": true, - "ordering": true, - "columnDefs": [{ - "targets": 0, - "type": "date-eu" - }], - "aaSorting": [ - [0, "desc"] - ], - "info": true, - "autoWidth": true, - "pageLength": 10, - "lengthMenu": [10, 25, 50, 100], - + var table = $('#config_list_table').DataTable({ + dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination + buttons: [ + 'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons + ], + pageLength: 10, // Default rows per page + lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options + responsive: true, // Responsive table + order: [[0, 'desc']], // Default ordering (column index 0, descending) + language: { + paginate: { + next: '', // Next button icon + previous: '' // Previous button icon + } + } }); - // Initialize the datepickers - $("#fromDate").datepicker({ - dateFormat: 'dd-mm-yy', - onSelect: function(selectedDate) { - var minDate = $(this).datepicker("getDate"); - $("#toDate").datepicker("option", "minDate", minDate); - } - }); + // Date range filter function + $.fn.dataTable.ext.search.push( + function(settings, data, dataIndex) { + var fromDate = $('#fromDate').val(); + var toDate = $('#toDate').val(); + + if (!fromDate || !toDate) { + return true; // If no dates selected, don't filter + } + + var dateStr = data[0]; // Assuming the date is in the first column + var dateParts = dateStr.split("-"); + var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object + + var startDate = new Date(fromDate); + var endDate = new Date(toDate); + + // 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); - $("#toDate").datepicker({ - dateFormat: 'dd-mm-yy', - onSelect: function(selectedDate) { - var maxDate = $(this).datepicker("getDate"); - $("#fromDate").datepicker("option", "maxDate", maxDate); - } + // Return true if the date is within the range + return date >= startDate && date <= 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").datepicker("setDate", null); - $("#toDate").datepicker("setDate", null); - $("#toDate").datepicker("option", "minDate", null); - $("#fromDate").datepicker("option", "maxDate", null); - table.draw(); + $("#fromDate").val(''); + $("#toDate").val(''); + table.draw(); // Redraw the table to clear the filter }); - // Date range filter - $.fn.dataTable.ext.search.push( + // 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; - function(settings, data, dataIndex) { - var fromDate = $("#fromDate").datepicker("getDate"); - var toDate = $("#toDate").datepicker("getDate"); - - var dateStr = data[0]; // Assuming the date is in the first column - - // Convert dateStr to Date object - var dateParts = dateStr.split("-"); - var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object - - if (!fromDate || !toDate) { - return true; // No filter if dates are not selected + // Optionally reset the To Date input if the current value is before the new min date + if (toDateInput.value < fromDate) { + toDateInput.value = fromDate; } - - return date >= fromDate && date <= toDate; - } - ); - - // Handle form submission - $("#DateRangeFilter").submit(function(e) { - e.preventDefault(); - table.draw(); }); - }); +}); \ No newline at end of file diff --git a/app/Views/costListing.php b/app/Views/costListing.php index 565966f0..83679e4b 100644 --- a/app/Views/costListing.php +++ b/app/Views/costListing.php @@ -29,92 +29,9 @@ color: #0056b3; } -
-
-
-
-
-

Cost Details

-
-
-
-
-
-
- - - - - - - - - -
-
-
- -
-
- - - - - - - - - - - - - - CreatedDate); - $date = $createdat->format('d-m-Y'); - $time = $createdat->format('h:i A'); - ?> - - - - - - - - - - - - -
Create DateCreate TimeCost Center CodeCost Center NameCreated ByActiveAction
code ?>CostCenterName ?>FirstName ?>IsActive == 1 ? $R = 'ACTIVE' : $R = 'INACTIVE'; - echo $R; - ?> - DeletedBy == '') { - ?> - -     - -
-
-
-
- -
-
- \ No newline at end of file + \ No newline at end of file diff --git a/app/Views/createPOfromRequistion.php b/app/Views/createPOfromRequistion.php index 652435f9..b467baf5 100644 --- a/app/Views/createPOfromRequistion.php +++ b/app/Views/createPOfromRequistion.php @@ -37,261 +37,330 @@ float: inline-end; } + + +
- 'form-label-left CreatePO ', 'name' => 'CreatePO', 'id' => 'CreatePO', 'method' => 'post', 'role' => 'form'); + 'form-label-left CreatePO ', 'name' => 'CreatePO', 'id' => 'CreatePO', 'method' => 'post', 'role' => 'form'); echo form_open(base_url() . 'purchaseOrder', $attributes); ?> - -
- +
-
-
-

Create Purchase Order from Requistion

- -
+
+
+

Create Purchase Order from Requistion

-
+
+
-
+
getFlashdata('error'); if ($error) { ?> -
- - getFlashdata('error'); ?> -
- - getFlashdata('success'); - if ($success) { - ?> -
- - getFlashdata('success'); ?> -
- - -
-
- listErrors('
', '
'); - ?>
-
+
+ + getFlashdata('error'); ?>
- getFlashdata('listErrors'); - if ($listErrors) { - ?> -
-
-
- - getFlashdata('listErrors'); ?> -
-
-
-
- -

-

- - - - Create Purchase Order - - -
-

- + getFlashdata('success'); + if ($success) { + ?> +
+ + getFlashdata('success'); ?>
-
-
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SelectRequested DateRequistion NumberRequistion Type Requested ByTot. No. Of Line ItemsPo Created Line ItemsPartial PO Created Line ItemsNew Line ItemsStatusDepartmentDesignation
  - ReqDate); - $RequestedDate = $dt->format('d-m-Y'); - echo $RequestedDate; - ?> - ReqNo; ?> ReqType; ?>FirstName; ?>TotalNoofLineItems; ?>PolineItems; ?>PartilallyLineItems; ?>newLineItem; ?>StatusName; ?>DepartmentName; ?>Designation; ?>
- +
@@ -326,9 +395,13 @@ function selectReqNo(rowId) { + + console.log("entered"); + ckb = $('#chk' + rowId).is(':checked'); var tr = document.getElementById(rowId); var cellval = tr.cells; + console.log(cellval) //coo/kie_value_add = {}; if (!ckb) { var removeItem = cellval[2].innerText; @@ -340,22 +413,28 @@ } else { var tr = document.getElementById(rowId); var cellval = tr.cells; + + //alert(RequistionList.Req.length); if (RequistionList.Req.length > 0) { - + console.log("111111111"); + if (Type == cellval[3].innerText) { + RequistionList.Req.push({ "ReqNo": cellval[2].innerText, "ReqType": cellval[3].innerText, "ReqBy": cellval[4].innerText, }); } else { + console.log("333333333"); + alert('Same type of Requistion only can be together.') $('#chk' + rowId).attr('checked', false); } } else { - + RequistionList.Req.push({ "ReqNo": cellval[2].innerText, "ReqType": cellval[3].innerText, @@ -366,6 +445,9 @@ } i = i + 1; } + + console.log(JSON.stringify(RequistionList)); + $('#txtReqNo').val(JSON.stringify(RequistionList)); } @@ -396,6 +478,10 @@ function Validate() { var ReqNo = $('#txtReqNo').val(); + console.log("--------------"); + + console.log(ReqNo); + if (ReqNo.length <= 0) { alert('Please select the Requisition Number to Create Purchase Order'); return false; @@ -425,8 +511,12 @@ }); - \ No newline at end of file + // Date range filter function + $.fn.dataTable.ext.search.push( + function(settings, data, dataIndex) { + var fromDate = $('#fromDate').val(); + var toDate = $('#toDate').val(); + + if (!fromDate || !toDate) { + return true; // If no dates selected, don't filter + } + + var dateStr = data[1]; // Assuming the date is in the first column + var dateParts = dateStr.split("-"); + var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object + + var startDate = new Date(fromDate); + var endDate = new Date(toDate); + + // 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); + + // Return true if the date is within the range + return date >= startDate && date <= endDate; + } + ); + + // Handle form submission for the date range filter + $("#DateRangeFilter").click(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 + }); + + // 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; + } + }); +}); + \ No newline at end of file diff --git a/app/Views/departmentListing.php b/app/Views/departmentListing.php index 33525d93..2a58196a 100644 --- a/app/Views/departmentListing.php +++ b/app/Views/departmentListing.php @@ -41,13 +41,26 @@ color: #0056b3; } -
- - -
-
-
- +
+ +
+ +
+
+
+
+

Department Details

+
+
+ +
+ getFlashdata('error'); if ($error) { @@ -67,190 +80,153 @@
-
-
- listErrors('
', '
'); - ?>
-
-
-
-
-
-
-

Department Details

-
+
+
+
+
+ + + -
-
- - -
-
- - - - + + - - + + +
+ +
+ + + + + + + + + + + + + + + + CreatedDt)) == "30-11--0001") { + $cdate = '00-00-0000'; + } else { + $cdate = date('d-m-Y', strtotime($record->CreatedDt)); + } ?> + + + + + + + - - -
- - - +
Create DateDepartment CodeDepartment NameHead DepartmentIsActive
DEPCode; ?>DepartmentName ?>HeadDept ?>IsActive == 1) { + echo "Active"; + } else { + echo "In Active"; + } ?>
+
+
+
+
-
-
-
-
- - - - - - - - - - - - - - - - CreatedDt)) == "30-11--0001") { - $cdate = '00-00-0000'; - } else { - $cdate = date('d-m-Y', strtotime($record->CreatedDt)); - } ?> - - - - - - - + + + - - -
Create DateDepartment CodeDepartment NameHead DepartmentIsActive
DEPCode; ?>DepartmentName ?>HeadDept ?>IsActive == 1) { - echo "Active"; - } else { - echo "In Active"; - } ?>
-
-
-
-
-
- -
- + \ No newline at end of file diff --git a/app/Views/includes/new_footer.php b/app/Views/includes/new_footer.php index dc8c3a59..6d10bcf1 100644 --- a/app/Views/includes/new_footer.php +++ b/app/Views/includes/new_footer.php @@ -62,6 +62,11 @@ + + + \ No newline at end of file diff --git a/app/Views/includes/new_header.php b/app/Views/includes/new_header.php index 53db80eb..0a8a7fd5 100644 --- a/app/Views/includes/new_header.php +++ b/app/Views/includes/new_header.php @@ -59,8 +59,25 @@ + -
-
-
- getFlashdata('error'); - if ($error) { - $type = "error"; - echo show_alert($type, $error); - } - $success = session()->getFlashdata('success'); - if ($success) { - $type = "success"; - echo show_alert($type, $success); - } - ?> -
-
- listErrors('
', '
'); - ?>
-
-
-
-
-
-
-
-

Material Master Details

-
-
-
-
-
-
- - - - - - - -
-
-
- -
-
-
- - - +
+
+ +
+ +
+
+
+
+

Material Master Details

+
+
+ +
+ getFlashdata('error'); + if ($error) { + $type = "error"; + echo show_alert($type, $error); + } + $success = session()->getFlashdata('success'); + if ($success) { + $type = "success"; + echo show_alert($type, $success); + } + ?> +
+
+
+
+ + + + + + + + + +
+ +
+
+ + + @@ -133,14 +127,18 @@ } } ?> - -
Created Date Material Code Material Description
-
-
-
-
-
+ + + +
+
+
+
+
+
+
+
-

Invoices Table

-
-
-
-
- - - - - - - - - - - - - - - - - - - - +
+
+
+ + + + + + + + + +
+ +
+
Invoice DateInvoice NoClient NameProductRateQuantitySub TotalGSTTotalStatusE-Invoice NumberAction
+ + + + + + + + + + + + + + + + + + item_price * $invoice->item_quantity; @@ -83,39 +156,38 @@ $sgst_amount = ($subtotal * $invoice->sgst) / 100; $total = $subtotal + $cgst_amount + $sgst_amount;?> - - - - - - - - - - - - - - + + + + + + + + + + + + + + - -
Invoice DateInvoice NoClient NameProductRateQuantitySub TotalGSTTotalStatusE-Invoice NumberAction
invoice_date_created)); ?> - invoice_url)){ ?> - - - invoice_number; ?> - invoice_url)){ ?> - - - client_name ?>item_name ?>item_price ?>item_quantity, 2 ,'.', ',' ) ?>status ?>e_invoice_number; ?> - - - -
invoice_date_created)); ?> + invoice_url)){ ?> + + + invoice_number; ?> + invoice_url)){ ?> + + + client_name ?>item_name ?>item_price ?>item_quantity, 2 ,'.', ',' ) ?>status ?>e_invoice_number; ?> + + + +
- -
-
-
+ + +
+
+
@@ -123,8 +195,10 @@ - - + \ No newline at end of file diff --git a/app/Views/supplierListing.php b/app/Views/supplierListing.php index b85d46bd..f693cd90 100644 --- a/app/Views/supplierListing.php +++ b/app/Views/supplierListing.php @@ -35,12 +35,11 @@ color: #0056b3; } -
-
-
-
- +
+ getFlashdata('error'); if ($error) { @@ -54,47 +53,41 @@ } ?> -
-
- listErrors('
', '
'); - ?>
-
-
-
- - -
-
-
-

Supplier Listing

-
-
-
-
-
-
- - - - - - - - - -
-
-
-
+ +
+ +
+
+
+
+

Supplier Listing

+
+
+ -
-
- - + +
+
+
+
+ + + + + + + + + +
+ +
+
+ @@ -131,7 +124,7 @@ @@ -141,13 +134,15 @@ ?>
Created Date Supplier IDIsActive == 0) { echo "Deactived"; } else { ?> -     +    
+
+
+
+
+
+
+
+
-
-
-
- - - \ No newline at end of file + // Optionally reset the To Date input if the current value is before the new min date + if (toDateInput.value < fromDate) { + toDateInput.value = fromDate; + } + }); +}); + \ No newline at end of file diff --git a/app/Views/transporterListing.php b/app/Views/transporterListing.php index 72d635a9..a27c14ad 100644 --- a/app/Views/transporterListing.php +++ b/app/Views/transporterListing.php @@ -37,26 +37,85 @@ color: rgb(173, 3, 23); } + +
- -
- -
-
- - + +
+
+
+
+

Transporter Details

+
+
+ +
+ +
+
+ + + + + + + + + +
+
- +
@@ -77,8 +136,8 @@ $time = $createdat->format('h:i A'); ?> - - + + @@ -106,9 +165,11 @@ + +
Create Date
id ?> name ?> FirstName ?>
- - - + + +
+ +
+
Created Date
+ + @@ -126,7 +115,7 @@ @@ -135,15 +124,18 @@ } } ?> - -
Created Date User Name EmailDepartmentName ?> role ?> -     +        
- -
+ + + +
+
+
- - + + + \ No newline at end of file diff --git a/app/Views/viewinwardgateregister.php b/app/Views/viewinwardgateregister.php index cd1d4ae9..86434473 100644 --- a/app/Views/viewinwardgateregister.php +++ b/app/Views/viewinwardgateregister.php @@ -145,36 +145,36 @@
-
- -
- -
-
-
-
-

View Inward Gate Register

-
-
-
-
-
-
-
- - - +
+ +
+ +
+
+
+
+

View Inward Gate Register

+
+
+
+
+
+
+ + + + - - + + - - -
- -
- - + + +
+ +
+
+ @@ -199,32 +199,40 @@ $date = $createddate->format('d-m-Y'); $time = $createddate->format('h:i A'); ?> - - - - - - - - - - - - + + + + + + + + + + + + - - -
Create Date Create time
IGRNO ?> PONO ?>SupplierName ?>DeliveryChellanOrInvoiceNo ?>DeliveryChellanDate); - echo $date->format('d-m-Y'); ?>VehicleNo ?>IGRStatus == 'ST074' ? 'Draft' : 'Completed'; ?> - - - -   - - - - -   - - -
IGRNO ?> PONO ?>SupplierName ?>DeliveryChellanOrInvoiceNo ?>DeliveryChellanDate); + echo $date->format('d-m-Y'); ?>VehicleNo ?>IGRStatus == 'ST074' ? 'Draft' : 'Completed'; ?> + + + +   + FilePath)) { ?> + + file)) { ?> + + + + +   + + + + +   + + +