From 03adb2875ca1f0b402f7f1309fed59a02317f2ae Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Wed, 5 Jul 2017 11:45:31 +0530 Subject: [PATCH] validations --- application/views/servicePurchaseorder.php | 59 +++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/application/views/servicePurchaseorder.php b/application/views/servicePurchaseorder.php index ffca1158..2034e25f 100755 --- a/application/views/servicePurchaseorder.php +++ b/application/views/servicePurchaseorder.php @@ -64,6 +64,9 @@ var AvilBudAmt = ''; + + + $('#drpSupplier').change(function() { @@ -786,7 +789,7 @@ $(document).ready(function () {
- + @@ -2071,5 +2074,59 @@ $('#txtStatus').val(stat); + + + +function openModal() +{ + if(vaildateBeforeOpenModal()) + { + $('#SERVICE').modal('show'); + } +} + +function vaildateBeforeOpenModal() +{ + if($('#PODate').val() == '') + { + alert('Please Enter the Purchase Order date'); + $('#PODate').focus(); + return false; + } + else if($('#drpSupplier').val() == "0") + { + alert('Please Select the Supplier details'); + $('#drpSupplier').focus(); + return false; + } + else if($('#DeliveryAddr').val() == '') + { + alert('Please Enter the Delivery Address'); + $('#DeliveryAddr').focus(); + return false; + } + else if($('#Deliverydt').val() == '' && $('#Scheduleby').val() == '') + { + alert('Please Enter the Delivery Date'); + $('#Deliverydt').focus(); + return false; + } + else if($('#workstatus').val()=="0") + { + alert('Please Enter WorkStatus'); + $('#workstatus').focus(); + return false; + + } + + + else + { + return true; + } +} + + +