master module 2 vadivel J 27-12-2024

This commit is contained in:
vadivelJ96 2024-12-27 11:13:23 +05:30
parent 04afc3f7b8
commit 3aa1a384a4
2 changed files with 17 additions and 22 deletions

View File

@ -199,7 +199,7 @@
</div>
<div class="col-md-12 text-right">
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
<input type="button" id="addSupplierBtnId" value="Submit" class="btn btn-success">
</div>
</div>
</form>
@ -256,9 +256,12 @@
return false;
}
return true;
}
$('#supplierName').change(function() {
$('#addSupplierBtnId').click(function() {
var supplierName = $('#supplierName').val().trim();
var supplierId = $('#SupplierID').val();
@ -287,18 +290,15 @@
alert("'" + suppliername + "' - related supplier are , " + " \n \n" + related_supplier);
$("#supplierName").val('');
$("#supplierName").focus();
} else {
} else {
$('#loader').hide();
//4Debug
// alert('This is New Supplier! ');
if (Validate()) {
$('#UpdateSupplier').submit();
}
}
//4Debug
//console.log(data);
},
error: function(error) {
//4Debug
// alert("Error Occur");
$('#loader').hide();
console.error("Error" , error);
}

View File

@ -296,6 +296,7 @@ if (!empty($supplier)) {
<div class="card-body" style="padding: 1rem 2rem !important;">
<div class="row">
<div class="col-12">
<form class="form-horizontal" role="form" id="UpdateSupplier"
action="<?php echo base_url() ?>editsupplier" method="post" enctype="multipart/form-data">
<div class="box-body">
@ -530,7 +531,7 @@ if (!empty($supplier)) {
<button type="button" class="btn btn-secondary" onclick="history.back()">
<span class="bold">Cancel</span>
</button>
<button type="submit" class="btn btn-info pull-right">Submit</button>
<button type="button" id="updateSupplierBtnId" class="btn btn-info pull-right">Submit</button>
</div>
</div>
</div>
@ -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();
}
}
},