diff --git a/app/Views/addSupplier.php b/app/Views/addSupplier.php
index 70d0f87d..3e3b367f 100755
--- a/app/Views/addSupplier.php
+++ b/app/Views/addSupplier.php
@@ -199,7 +199,7 @@
@@ -560,11 +561,7 @@ if (!empty($supplier)) {
}
function Validate() {
- // if(!validatePAN())
- // {
- // return false;
- // $('#panno').focus();
- // }
+
if ($("#supplierName").val().length < 1) {
alert('Please Enter Supplier Name');
$("#supplierName").focus();
@@ -585,17 +582,12 @@ if (!empty($supplier)) {
return false;
}
- /*
- if(!validateGST())
- {
- $('#GSTNo').focus();
- return false;
- }*/
+ return true;
}
//Call to ajax existing PAN
- $('#supplierName').change(function () {
+ $('#updateSupplierBtnId').click(function () {
var supplierName = $('#supplierName').val().trim();
var supplierId = $('#SupplierID').val();
@@ -626,6 +618,9 @@ if (!empty($supplier)) {
$("#supplierName").focus();
} else {
$('#loader').hide();
+ if (Validate()) {
+ $('#UpdateSupplier').submit();
+ }
}
},