diff --git a/application/views/editimportpo.php b/application/views/editimportpo.php index 34ccede4..e44044a5 100644 --- a/application/views/editimportpo.php +++ b/application/views/editimportpo.php @@ -3966,6 +3966,8 @@ return true; var avalbudAmte= ; function validateEditExceedLimit() { +//alert(); + // console.log(txtbasic); //var avalbudAmt = parseFloat($('#EditAvlBudAmt').val()); var basicAmountRate = parseFloat($('#EdittxtBasicValue').val()); var totalAmount = parseFloat($('#EditTotalExp').val()); diff --git a/application/views/importpo.php b/application/views/importpo.php index 4ca61878..46d11825 100644 --- a/application/views/importpo.php +++ b/application/views/importpo.php @@ -3825,6 +3825,79 @@ $('#Deliverydt').change(function(){ }); +function validate() +{ + + + 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($('#Dispatch').val() == '' && $('#Scheduleby').val() == '') + { + alert('Please Enter the Dispatch Instruction'); + $('#Dispatch').focus(); + return false; + } + else if($('#currencytype').val() == '0') + { + alert('Please Select the Currency Type'); + $('#currencytype').focus(); + return false; + } + else if($('#ExchangeRate').val() == '') + { + alert('Please Enter the Exchange Rate'); + $('#ExchangeRate').focus(); + return false; + } + + else if($('#PlaceOforigin').val()== '') + { + alert('Please Enter Place Of Origin'); + $('#PlaceOforigin').focus(); + return false; + } + + else if($('#PaymentTerms').val()=='') + { + alert('Please Select Payment Terms'); + $('#PaymentTerms').focus(); + return false; + + } + + if(document.getElementById('ImportTax').rows.length <3) + { + // alert(); + // die(); + alert('Please Select Line item to Create PO'); + $('#Deliverydt').focus(); + return false; + } + + + + else + { + return true; + } +} + @@ -3853,9 +3926,10 @@ var txtDeletedRow = $('#txtDeletedRow').val(); //exit(); if(validate()) { - if(document.getElementById('ImportTax').rows.length <= 0) + if(document.getElementById('ImportTax').rows.length <3) { - + // alert(); + // die(); alert('Please Select Line item to Create PO'); $('#Deliverydt').focus(); return false;