diff --git a/app/Controllers/Employeedetails.php b/app/Controllers/Employeedetails.php index ae289a5c..d6fb02f1 100755 --- a/app/Controllers/Employeedetails.php +++ b/app/Controllers/Employeedetails.php @@ -918,7 +918,7 @@ class Employeedetails extends BaseController $empPayUpdate = $this->emppaydate_model->editemppay($emppay); if ($result + $empPayUpdate > 0) { - $this->session->setFlashdata('success', 'You Have Successfully updated the Employee Record!'); + $this->session->setFlashdata('success', 'You Have Successfully Updated the Employee Record!'); return json_encode(true); } else { $this->session->setFlashdata('error', 'Record Not Updated!'); diff --git a/app/Controllers/Inwardgateregister.php b/app/Controllers/Inwardgateregister.php index fbd57ea0..71ab44b8 100755 --- a/app/Controllers/Inwardgateregister.php +++ b/app/Controllers/Inwardgateregister.php @@ -813,7 +813,7 @@ function viewIGRDetails() $DriverMobileNumber = $this->request->getPost('driver_mobile'); $PreIGRStatus = (int)$this->request->getPost('status') == 1 ? IGR_CREATED : IGR_DRAFT; - $IsThisOpenOrderPO = $this->request->getPost('hiddenIsOpenOrder'); + $IsThisOpenOrderPO = $this->request->getPost('isOpenOrder'); $IGRStatus = ((int)$IsThisOpenOrderPO == 1) ? IGR_DRAFT : $PreIGRStatus; # Here decode the tableData for IGRLineitem diff --git a/app/Models/Dashboard_model.php b/app/Models/Dashboard_model.php index 11b11b98..2a85ed61 100755 --- a/app/Models/Dashboard_model.php +++ b/app/Models/Dashboard_model.php @@ -2234,11 +2234,11 @@ join t_purchaseorder_master po on po.PONO = pl.PONO join t_supplierdetailsn sup on sup.SupplierID=po.SupplierID join t_materialmaster mm on mm.MaterialCode=pl.MaterialCode join t_configdetails cd on cd.key = mm.Category -where po.Status != 'ST030' and po.Status = 'ST026 and po.IsOpenOrder != '1' +where po.Status != 'ST030' and po.Status = 'ST026' and (po.IsOpenOrder IS NULL OR po.IsOpenOrder = 1) "; if ($cname != '') { - $sql .= "and sup.SupplierName = '" . $cname . "'"; + $sql .= " and sup.SupplierName = '" . $cname . "'"; } @@ -2249,14 +2249,14 @@ where po.Status != 'ST030' and po.Status = 'ST026 and po.IsOpenOrder != '1' } if ($m != '') { - $sql .= "and monthname(po.PODate) = '" . $m . "'"; + $sql .= " and monthname(po.PODate) = '" . $m . "'"; } if ($frm and $t != '') { $fromd = date("Y-m-d", strtotime($frm)); $tod = date("Y-m-d", strtotime($t)); - $sql .= "and date(po.PODate) >= '" . $fromd . "' + $sql .= " and date(po.PODate) >= '" . $fromd . "' and date(po.PODate) <= '" . $tod . "'"; } if ($prod != '') { @@ -2272,7 +2272,7 @@ where po.Status != 'ST030' and po.Status = 'ST026 and po.IsOpenOrder != '1' if ($purchaseorder_number != '') { $sql .= " and po.PONO = '" . $purchaseorder_number . "' "; } - $sql .= "order by date(po.PODate) desc"; + $sql .= " order by date(po.PODate) desc"; $query = $this->db->query($sql); //echo $sql; return $query->getResult(); diff --git a/app/Views/accountsDashboard.php b/app/Views/accountsDashboard.php index 04df9398..ef41ed04 100644 --- a/app/Views/accountsDashboard.php +++ b/app/Views/accountsDashboard.php @@ -192,6 +192,7 @@ Driver Transporter IGR Status + Remark Action @@ -253,9 +254,10 @@ } ?> + Remark; ?> - + @@ -989,6 +991,7 @@ // $('#content').loader('show'); var igrno = $("#IGRNO1").val(); var pono = $("#PONO1").val(); + var status = 0; var tableData = []; $('#tbleIGRAppend tr').each(function(index) { @@ -1025,6 +1028,7 @@ formData.append('status', status); formData.append('tableData', JSON.stringify(tableData)); formData.append('isOpenOrder', $("#hiddenIsOpenOrder").val()); + formData.append('hiddenIsOpenOrder', $("#hiddenIsOpenOrder").val()); formData.append('MasterFile', $('#MasterFile')[0].files[0]); formData.append('file_name[]', $('#file_name').val()); var empFiles = $('#emp_file')[0] ? $('#emp_file')[0].files : null; @@ -1103,6 +1107,7 @@ formData.append('status', status); formData.append('tableData', JSON.stringify(tableData)); formData.append('isOpenOrder', $("#hiddenIsOpenOrder").val()); + formData.append('hiddenIsOpenOrder', $("#hiddenIsOpenOrder").val()); formData.append('MasterFile', $('#MasterFile')[0].files[0]); $('input[name="file_name[]"]').each(function() { diff --git a/app/Views/addemppaydate.php b/app/Views/addemppaydate.php index dd826e54..7f8a8046 100755 --- a/app/Views/addemppaydate.php +++ b/app/Views/addemppaydate.php @@ -73,8 +73,8 @@
-
@@ -246,33 +246,35 @@ }); - function duecalculation() { - var totaldue = 0; - var loan = document.getElementById('Loan_Amount').value; - var no_of_due = document.getElementById('no_of_due').value; - $('#remaining_due').val(no_of_due); - - if (loan != 0) { - if (no_of_due == 0) { - alert("Enter No Of Due"); - $('#no_of_due').focus(); - } else { - - - totalDueAmt = loan / no_of_due; - - document.getElementById('monthly_due').value = Math.ceil(totalDueAmt); - - + function duecalculation() { + var loan = parseFloat(document.getElementById('Loan_Amount').value); + var no_of_due_raw = document.getElementById('no_of_due').value.trim(); + // Validate: not empty and matches 1–99 (no 0s or more than 2 digits) + if (no_of_due_raw !== '') { + if (!/^(?:[1-9]|[1-9][0-9])$/.test(no_of_due_raw)) { + alert("Please enter a valid Number of Dues (Minimum 1 digit,Maximum 2 Digit)."); + document.getElementById('no_of_due').focus(); + document.getElementById('no_of_due').value = ''; + $('#monthly_due').val(''); + $('#remaining_due').val(''); + return; + } } + + var no_of_due = parseInt(no_of_due_raw, 10); + $('#remaining_due').val(no_of_due); + + if (!isNaN(loan) && loan > 0) { + var totalDueAmt = loan / no_of_due; + document.getElementById('monthly_due').value = Math.ceil(totalDueAmt); + } else { + $('#monthly_due').val(''); + } + + dateCalulation(); // Update your dates } - - dateCalulation(); - - - } function dateCalulation() { //alert('j'); diff --git a/app/Views/createPOfromRequistion.php b/app/Views/createPOfromRequistion.php index 605272b7..88dba473 100755 --- a/app/Views/createPOfromRequistion.php +++ b/app/Views/createPOfromRequistion.php @@ -7,10 +7,7 @@ } - .th-status{ - - text-align:center !important; - } + .th-status{} .modal-dialog-centered { display: flex; @@ -317,7 +314,7 @@ Po Line Items Partial PO Line Items New Line Items - Status + Status Department Designation @@ -346,8 +343,7 @@ PolineItems; ?> PartilallyLineItems; ?> newLineItem; ?> - - StatusName; ?> + StatusName); ?> DepartmentName; ?> Designation; ?> diff --git a/app/Views/editEmployeenew.php b/app/Views/editEmployeenew.php index 82957a20..0a9752aa 100755 --- a/app/Views/editEmployeenew.php +++ b/app/Views/editEmployeenew.php @@ -1815,7 +1815,7 @@ if (!empty($EmpDetails)) { reasonTextarea.setAttribute("required", "true"); reasonTextarea.focus(); // Auto-focus - alert("Please enter the Reason!"); + alert("Please Enter the Reason!"); diff --git a/app/Views/editOld.php b/app/Views/editOld.php index 6a78ddff..d1c09787 100755 --- a/app/Views/editOld.php +++ b/app/Views/editOld.php @@ -1,3 +1,9 @@ + + + + + + @@ -313,4 +315,4 @@ if (!empty($EmpList)) { alert("Invalid email address"); } }); -> \ No newline at end of file + \ No newline at end of file diff --git a/app/Views/editOldemppay.php b/app/Views/editOldemppay.php index 8ae558df..9ebd921c 100755 --- a/app/Views/editOldemppay.php +++ b/app/Views/editOldemppay.php @@ -195,7 +195,7 @@ if (!empty($emppay)) {
- +
@@ -440,7 +440,21 @@ if (!empty($emppay)) { function duecalculation() { var totaldue = 0; var loan = document.getElementById('Loan_Amount').value; - var no_of_due = document.getElementById('no_of_due').value; + var no_of_due_raw = document.getElementById('no_of_due').value.trim(); + + if (no_of_due_raw !== '') { + if (!/^(?:[1-9]|[1-9][0-9])$/.test(no_of_due_raw)) { + alert("Please enter a valid Number of Dues (Minimum 1 digit,Maximum 2 Digit)."); + document.getElementById('no_of_due').focus(); + document.getElementById('no_of_due').value = ''; + $('#monthly_due').val(''); + $('#remaining_due').val(''); + $('#balance_due_amount').val(''); + return; + } + } + + var no_of_due = parseInt(no_of_due_raw, 10); if (loan != 0) { if (no_of_due == 0) { diff --git a/app/Views/emppayListing.php b/app/Views/emppayListing.php index 9a3f9032..954c2331 100755 --- a/app/Views/emppayListing.php +++ b/app/Views/emppayListing.php @@ -25,7 +25,8 @@
- +
+ diff --git a/app/Views/viewinwardgateregister.php b/app/Views/viewinwardgateregister.php index 71eda799..7b2ac6ef 100755 --- a/app/Views/viewinwardgateregister.php +++ b/app/Views/viewinwardgateregister.php @@ -234,7 +234,7 @@ - + @@ -297,12 +297,12 @@ - +
EmployeeDriver Transporter IGR StatusRemark Action
DriverName ?> TransporterName ?> IGRStatus == 'ST029'){ echo 'Cancel'; } elseif($record->IGRStatus == 'ST074'){ echo 'Draft'; } else{ echo 'Completed'; } ?>Remark; ?> - + @@ -1507,6 +1507,7 @@ formData.append('status', status); formData.append('tableData', JSON.stringify(tableData)); formData.append('isOpenOrder', $("#hiddenIsOpenOrder").val()); + formData.append('hiddenIsOpenOrder', $("#hiddenIsOpenOrder").val()); formData.append('MasterFile', $('#MasterFile')[0].files[0]); formData.append('file_name[]', $('#file_name').val()); var empFiles = $('#emp_file')[0] ? $('#emp_file')[0].files : null; @@ -1579,6 +1580,7 @@ formData.append('status', status); formData.append('tableData', JSON.stringify(tableData)); formData.append('isOpenOrder', $("#hiddenIsOpenOrder").val()); + formData.append('hiddenIsOpenOrder', $("#hiddenIsOpenOrder").val()); formData.append('MasterFile', $('#MasterFile')[0].files[0]); formData.append('MasterRemarks', $("#MasterRemarks").val()); @@ -2469,421 +2471,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -