From 2185a951763cc4328e1bdffb5ded7f7b97cc1305 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Wed, 19 Mar 2025 10:44:21 +0530 Subject: [PATCH] stock module - 19-03-2025 --- app/Views/purchaseorder.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Views/purchaseorder.php b/app/Views/purchaseorder.php index c5d5650c..911bf01f 100755 --- a/app/Views/purchaseorder.php +++ b/app/Views/purchaseorder.php @@ -204,6 +204,7 @@ if (!empty($INRSYMBOL)) { function vaildateBeforeOpenModal() { var radioValue = parseInt($("input[name='DateRange']:checked").val()); + var scheduleBy = $('#Scheduleby').val(); if ($('#drpSupplier').val() == "0") { alert('Please Select the Supplier details'); @@ -221,13 +222,12 @@ if (!empty($INRSYMBOL)) { alert('Please Select the Delivery Date'); $('#Deliverydt').focus(); return false; - }else if (radioValue == 1) { - var scheduleBy = $('#Scheduleby').val(); // Get the value - if (!scheduleBy || scheduleBy.trim() == '') { // Check if it's empty or undefined + }else if ( radioValue == 1 && (scheduleBy.trim() == '' || scheduleBy == false)) + { alert('Please Enter the Schedule By'); $('#Scheduleby').focus(); return false; - } + }else if ($('#PoTypeOptions').val() == "0") { alert('Please Select Revenue Type'); $('#PoTypeOptions').focus();