From 28015007f3979da9454db66b5e1258b59615f7f8 Mon Sep 17 00:00:00 2001 From: vadivelJ96 Date: Wed, 19 Mar 2025 10:56:37 +0530 Subject: [PATCH] stock module - 19-03-2025 --- app/Views/purchaseorder.php | 6 ++++-- app/Views/servicePurchaseorder.php | 14 +++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/Views/purchaseorder.php b/app/Views/purchaseorder.php index 911bf01f..b61334fd 100755 --- a/app/Views/purchaseorder.php +++ b/app/Views/purchaseorder.php @@ -222,13 +222,15 @@ if (!empty($INRSYMBOL)) { alert('Please Select the Delivery Date'); $('#Deliverydt').focus(); return false; - }else if ( radioValue == 1 && (scheduleBy.trim() == '' || scheduleBy == false)) + } + else if ( radioValue == 1 && (scheduleBy.trim() == '' || scheduleBy == false)) { alert('Please Enter the Schedule By'); $('#Scheduleby').focus(); return false; - }else if ($('#PoTypeOptions').val() == "0") { + } + else if ($('#PoTypeOptions').val() == "0") { alert('Please Select Revenue Type'); $('#PoTypeOptions').focus(); return false; diff --git a/app/Views/servicePurchaseorder.php b/app/Views/servicePurchaseorder.php index ce864503..c76b0563 100755 --- a/app/Views/servicePurchaseorder.php +++ b/app/Views/servicePurchaseorder.php @@ -2458,7 +2458,10 @@ if (!empty($INRSYMBOL)) { } function vaildateBeforeOpenModal() { + var radioValue = parseInt($("input[name='DateRange']:checked").val()); + var scheduleBy = $('#Scheduleby').val(); // Get the value + if ($('#drpSupplier').val() == "0") { alert('Please Select the Supplier details'); $('#drpSupplier').focus(); @@ -2479,14 +2482,15 @@ 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($('#PODate').val() == ''){ + + } + else if($('#PODate').val() == ''){ alert('Please Enter the Purchase Order date'); $('#PODate').focus(); return false;