master module 3 vadivel J 27-12-2024
This commit is contained in:
parent
3aa1a384a4
commit
abe5758e00
@ -237,6 +237,7 @@
|
||||
return false;
|
||||
}
|
||||
if (!getContactNumberValidation) {
|
||||
alert('Please Enter Valid Contact Number');
|
||||
$("#ContactNumber").focus();
|
||||
return false;
|
||||
}
|
||||
@ -252,6 +253,7 @@
|
||||
}
|
||||
|
||||
if (!validateEmail()) {
|
||||
alert('Please Enter Valid Email Address');
|
||||
$('#emailid').focus();
|
||||
return false;
|
||||
}
|
||||
@ -287,13 +289,12 @@
|
||||
$.each(data, function(i, obj) {
|
||||
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
||||
});
|
||||
alert("'" + suppliername + "' - related supplier are , " + " \n \n" + related_supplier);
|
||||
$("#supplierName").val('');
|
||||
alert("'" + supplierName + "' - related supplier are , " + " \n \n" + related_supplier);
|
||||
$("#supplierName").focus();
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
if (Validate()) {
|
||||
$('#UpdateSupplier').submit();
|
||||
$('#addsupplier').submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<div class="card-body" style="padding: 1rem 2rem !important;">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<form role="form" id="adddepartment" action="<?php echo base_url() ?>savedepartment" method="post">
|
||||
<form role="form" id="addDepartment" action="<?php echo base_url() ?>savedepartment" method="post">
|
||||
<div class="box-body">
|
||||
<!-- Supplier Information -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
@ -64,7 +64,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="deptBtnId" value="Submit" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -107,54 +107,11 @@
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// function blockKeyPress(evt)
|
||||
// {
|
||||
// var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
// alert(charCode);
|
||||
// if(charCode == 8 || charCode == 46 )
|
||||
//
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
|
||||
// function isNumberKey(evt)
|
||||
// {
|
||||
// var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
// if (charCode != 46 && charCode > 31
|
||||
// && (charCode < 48 || charCode > 57))
|
||||
// return false;
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
|
||||
|
||||
// function onlyAlphabets(evt) {
|
||||
// var charCode;
|
||||
// if (window.event)
|
||||
// charCode = window.event.keyCode; //for IE
|
||||
// else
|
||||
// charCode = evt.which; //for firefox
|
||||
// if (charCode == 32) //for <space> symbol
|
||||
// return true;
|
||||
// if (charCode > 31 && charCode < 65) //for characters before 'A' in ASCII Table
|
||||
// return false;
|
||||
// if (charCode > 90 && charCode < 97) //for characters between 'Z' and 'a' in ASCII Table
|
||||
// return false;
|
||||
// if (charCode > 122) //for characters beyond 'z' in ASCII Table
|
||||
// return false;
|
||||
// return true;
|
||||
// }
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$("#DepartmentName").on('change',function(){
|
||||
$("#deptBtnId").on('click',function(){
|
||||
let departmentName = $("#DepartmentName").val().trim();
|
||||
let depCode =$("#DEPCode").val()??'';
|
||||
$('#loader').show();
|
||||
@ -165,13 +122,15 @@
|
||||
success:function(data){
|
||||
|
||||
if(data && data.length >0){
|
||||
let isActive = data[0].IsActive;
|
||||
let isActive = data[0]. IsActive;
|
||||
if(isActive == 1){
|
||||
alert("Department name already Exists ..!! ");
|
||||
}else{
|
||||
alert("Department Name already Existing in the deleted section.!!");
|
||||
}
|
||||
window.location.reload();
|
||||
}else{
|
||||
console.log("submitting the form..!!")
|
||||
$("#addDepartment").submit();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@ -561,7 +561,7 @@ if (!empty($supplier)) {
|
||||
}
|
||||
|
||||
function Validate() {
|
||||
|
||||
|
||||
if ($("#supplierName").val().length < 1) {
|
||||
alert('Please Enter Supplier Name');
|
||||
$("#supplierName").focus();
|
||||
@ -614,7 +614,6 @@ if (!empty($supplier)) {
|
||||
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
||||
});
|
||||
alert("'" + supplierName + "' - supplier details are , " + " \n \n" + related_supplier);
|
||||
$("#supplierName").val('');
|
||||
$("#supplierName").focus();
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
|
||||
@ -104,7 +104,7 @@
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body" style="padding: 1rem 2rem !important;">
|
||||
<form role="form" id="Updatedepartment" action="<?php echo base_url() ?>editdepartment" method="post">
|
||||
<form role="form" id="updateDepartment" action="<?php echo base_url() ?>editdepartment" method="post">
|
||||
<div class="box-body">
|
||||
<!-- Department Information -->
|
||||
<legend>Department Information</legend>
|
||||
@ -136,7 +136,7 @@
|
||||
<div class="form-row" style="margin-top:10px">
|
||||
<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" value="Update" class="btn btn-success">
|
||||
<input type="button" id="deptBtnId" value="Update" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -173,7 +173,7 @@
|
||||
|
||||
<script>
|
||||
|
||||
$("#DepartmentName").on('change',function(){
|
||||
$("#deptBtnId").on('click',function(){
|
||||
let departmentName = $("#DepartmentName").val().trim();
|
||||
let depCode =$("#DEPCode").val();
|
||||
$('#loader').show();
|
||||
@ -190,7 +190,8 @@ $("#DepartmentName").on('change',function(){
|
||||
}else{
|
||||
alert("Department Name already Existing in the deleted section.!!");
|
||||
}
|
||||
window.location.reload();
|
||||
}else{
|
||||
$("#updateDepartment").submit();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user