validations
This commit is contained in:
parent
602d83b830
commit
03adb2875c
@ -64,6 +64,9 @@ var AvilBudAmt = '';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$('#drpSupplier').change(function() {
|
||||
|
||||
@ -786,7 +789,7 @@ $(document).ready(function () {
|
||||
<table class="table table-bordered" style="border:1px solid #333" id="ServiceTable">
|
||||
<div style="padding-right:10px">
|
||||
<div align="right">
|
||||
<a data-toggle="modal" ><button type="submit" onclick="myFunction();" class="btn btn-primary" id="abcd" >Select Line Item</button> </a>
|
||||
<a data-toggle="modal" ><button type="submit" onclick="openModal();" class="btn btn-primary" id="abcd" >Select Line Item</button> </a>
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user