Supplier Bug fixes : ps
This commit is contained in:
parent
bec17ca02a
commit
ed22d87e1f
@ -87,19 +87,28 @@ class Supplier extends BaseController
|
||||
'Address' => [
|
||||
'label' => 'Address',
|
||||
'rules' => 'trim|required'
|
||||
],
|
||||
'ContactNumber' => [
|
||||
'label' => 'Contact Number',
|
||||
'rules' => 'trim|required|max_length[13]'
|
||||
],
|
||||
'AlternateContactNumber' => [
|
||||
'label' => 'Alternate Contact Number',
|
||||
'rules' => 'trim|max_length[13]'
|
||||
],
|
||||
'emailid' => [
|
||||
'label' => 'Email',
|
||||
'rules' => 'valid_email|max_length[128]|required'
|
||||
],'accno' => [
|
||||
'label' => 'accno',
|
||||
'rules' => 'trim|required'
|
||||
],'ifsc' => [
|
||||
'label' => 'ifsc',
|
||||
'rules' => 'trim|required'
|
||||
],'Payment' => [
|
||||
'label' => 'Payment',
|
||||
'rules' => 'trim|required'
|
||||
]
|
||||
// 'ContactNumber' => [
|
||||
// 'label' => 'Contact Number',
|
||||
// 'rules' => 'trim|required|max_length[13]'
|
||||
// ],
|
||||
// 'AlternateContactNumber' => [
|
||||
// 'label' => 'Alternate Contact Number',
|
||||
// 'rules' => 'trim|max_length[13]'
|
||||
// ],
|
||||
// 'emailid' => [
|
||||
// 'label' => 'Email',
|
||||
// 'rules' => 'valid_email|max_length[128]|required'
|
||||
// ]
|
||||
];
|
||||
|
||||
$messages = [
|
||||
@ -109,18 +118,27 @@ class Supplier extends BaseController
|
||||
'Address' => [
|
||||
'required' => 'Please enter an address.'
|
||||
],
|
||||
'ContactNumber' => [
|
||||
'required' => 'Please enter a contact number.',
|
||||
'max_length' => 'The contact number cannot exceed {param} characters.'
|
||||
'accno' => [
|
||||
'required' => 'Please enter an Account Number.'
|
||||
],
|
||||
'AlternateContactNumber' => [
|
||||
'max_length' => 'The alternate contact number cannot exceed {param} characters.'
|
||||
'ifsc' => [
|
||||
'required' => 'Please enter a Bank IFSC Code.'
|
||||
],
|
||||
'emailid' => [
|
||||
'required' => 'Please enter an email address.',
|
||||
'valid_email' => 'Please enter a valid email address.',
|
||||
'max_length' => 'The email address cannot exceed {param} characters.'
|
||||
]
|
||||
'Payment' => [
|
||||
'required' => 'Please Select the Payment option.'
|
||||
],
|
||||
// 'ContactNumber' => [
|
||||
// 'required' => 'Please enter a contact number.',
|
||||
// 'max_length' => 'The contact number cannot exceed {param} characters.'
|
||||
// ],
|
||||
// 'AlternateContactNumber' => [
|
||||
// 'max_length' => 'The alternate contact number cannot exceed {param} characters.'
|
||||
// ],
|
||||
// 'emailid' => [
|
||||
// 'required' => 'Please enter an email address.',
|
||||
// 'valid_email' => 'Please enter a valid email address.',
|
||||
// 'max_length' => 'The email address cannot exceed {param} characters.'
|
||||
// ]
|
||||
// 'panno' => [
|
||||
// 'required' => 'Please enter an panno address.',
|
||||
// 'max_length' => 'The panno cannot exceed {param} characters.'
|
||||
@ -253,6 +271,7 @@ class Supplier extends BaseController
|
||||
$file1 = $this->request->getFile('Cert_MSME');
|
||||
$file2 = $this->request->getFile('Cert_GST');
|
||||
$file3 = $this->request->getFile('Cert_BANK');
|
||||
$file4 = $this->request->getFile('Cert_PAN');
|
||||
$path = ROOTPATH.'public/uploads/images/';
|
||||
|
||||
if($PAN){ $supplier['PAN'] = $PAN;}
|
||||
@ -287,6 +306,16 @@ class Supplier extends BaseController
|
||||
$supplier['Cert_BANK'] = $this->request->getPost('hidden_Cert_BANK') ? $this->request->getPost('hidden_Cert_BANK') : NULL;
|
||||
}
|
||||
|
||||
if ($file4 && $file4->isValid() && !$file4->hasMoved()) {
|
||||
if(!is_dir($path)) { mkdir($path, 0777, true); }
|
||||
$PAN_DOC = $file4->getName();
|
||||
$file4->move($path,$PAN_DOC);
|
||||
$supplier['Cert_PAN'] = $PAN_DOC;
|
||||
}
|
||||
else{
|
||||
$supplier['Cert_PAN'] = $this->request->getPost('hidden_Cert_PAN') ? $this->request->getPost('hidden_Cert_PAN') : NULL;
|
||||
}
|
||||
|
||||
$result = $this->supplier_model->UpdateSupplier($supplier, $SupplierID);
|
||||
|
||||
if ($result == True) {
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="EmailAddress">Email ID</label>
|
||||
<input type="email" name="emailid" id="emailid" maxlength="100" class="form-control">
|
||||
<input type="email" name="emailid" id="emailid" maxlength="100" class="form-control" onchange="validateEmail();">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
@ -174,34 +174,37 @@
|
||||
|
||||
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Payment Details</legend>
|
||||
<!-- Text input-->
|
||||
|
||||
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="col-md-3">
|
||||
<label for="payablefrom">Payable Terms <span class="text-danger">*</span></label>
|
||||
<select class="form-control required select2" id="Payment" name="Payment"
|
||||
onchange="payment_hidden();" required >
|
||||
<option value="">Select Payment method</option>
|
||||
<?php
|
||||
if (!empty($payment)) {
|
||||
foreach ($payment as $pmt) {
|
||||
?>
|
||||
<option value="<?php echo $pmt->PaymentID ?>"><?php echo $pmt->PaymentTerms ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="hidden" id="paymentid" name="paymentid" value="">
|
||||
<!--<input type="hidden" id="paymentname" name="paymentname" value=""> -->
|
||||
<div class="form-row">
|
||||
<div class=" col-md-4">
|
||||
<label for="payablefrom">Payable Terms <span class="text-danger">*</span></label>
|
||||
<select class="form-control required select2" id="Payment" name="Payment"
|
||||
onchange="payment_hidden();" required >
|
||||
<option value="">Select Payment method</option>
|
||||
<?php
|
||||
if (!empty($payment)) {
|
||||
foreach ($payment as $pmt) {
|
||||
?>
|
||||
<option value="<?php echo $pmt->PaymentID ?>"><?php echo $pmt->PaymentTerms ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="hidden" id="paymentid" name="paymentid" value="">
|
||||
</div>
|
||||
</div>
|
||||
</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="button" id="addSupplierBtnId" value="Submit" class="btn btn-success">
|
||||
@ -246,10 +249,7 @@
|
||||
$("#ContactNumber").focus();
|
||||
return false;
|
||||
}
|
||||
if (!validateEmail()) {
|
||||
$('#emailid').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if ($("#Address").val().length < 1) {
|
||||
alert('Please Enter Address');
|
||||
@ -257,12 +257,24 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!validateEmail()) {
|
||||
alert('Please Enter Valid Email Address');
|
||||
$('#emailid').focus();
|
||||
if ($("#accno").val().length < 1) {
|
||||
alert('Please Enter Account number');
|
||||
$("#accno").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($("#ifsc").val().length < 1) {
|
||||
alert('Please Enter Bank IFSC code');
|
||||
$("#ifsc").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($("#Payment").val().length < 1) {
|
||||
alert('Please select the Payment option');
|
||||
$("#Payment").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
@ -311,21 +323,6 @@
|
||||
});
|
||||
});
|
||||
|
||||
//Email Validate
|
||||
function validateEmail() {
|
||||
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
|
||||
|
||||
var email = $('#EmailAddress').val();
|
||||
if (email != "") {
|
||||
if (reg.test(email) == false) {
|
||||
alert('Please Enter Valid Email Address');
|
||||
return (false);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function alphaNumberic(e) {
|
||||
var k;
|
||||
document.all ? k = e.keyCode : k = e.which;
|
||||
@ -480,9 +477,10 @@
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
alert('Please Enter email id');
|
||||
}
|
||||
}
|
||||
// else {
|
||||
// alert('Please Enter email id');
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@ $IsRawMaterial = '';
|
||||
$PaymentId = '';
|
||||
$hidden_Cert_MSME = '';
|
||||
$hidden_Cert_GST = '';
|
||||
$hidden_Cert_PAN = '';
|
||||
$hidden_Cert_BANK = '';
|
||||
|
||||
if (!empty($supplier)) {
|
||||
@ -51,6 +52,7 @@ if (!empty($supplier)) {
|
||||
$PaymentId = $uf->PaymentID;
|
||||
$hidden_Cert_MSME = $uf->Cert_MSME;
|
||||
$hidden_Cert_GST = $uf->Cert_GST;
|
||||
$hidden_Cert_PAN = $uf->Cert_PAN;
|
||||
$hidden_Cert_BANK = $uf->Cert_BANK;
|
||||
}
|
||||
}
|
||||
@ -175,9 +177,10 @@ if (!empty($supplier)) {
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
alert('Please Enter email id');
|
||||
}
|
||||
}
|
||||
// else {
|
||||
// alert('Please Enter email id');
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -282,7 +285,7 @@ if (!empty($supplier)) {
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Edit Supplier Details</h4>
|
||||
<h4 class="page-title">Edit Supplier Details <?php echo $SupplierID; ?></h4>
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">
|
||||
<span class="bold">Cancel</span>
|
||||
</button>
|
||||
@ -311,57 +314,37 @@ if (!empty($supplier)) {
|
||||
<!-- Supplier Information -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row" style="margin-bottom:10px;">
|
||||
<div class="col-md-2">
|
||||
<label class="col-form-label" for="SupplierID">Supplier ID<span
|
||||
class="badge">*</span></label>
|
||||
<input type="text" name="SupplierID" id="SupplierID" class="form-control" readonly
|
||||
value="<?php echo $SupplierID; ?>">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="SupplierName">Supplier Name<span
|
||||
class="badge">*</span></label>
|
||||
<input type="text" name="SupplierName" maxlength="100" id="supplierName"
|
||||
class="form-control" required value="<?php echo $SupplierName; ?>">
|
||||
<input type="hidden" name="SupplierID" id="SupplierID" value="<?php echo $SupplierID; ?>">
|
||||
<div class=" col-md-3">
|
||||
<label class="col-form-label" for="SupplierName">Supplier Name<span class="badge">*</span></label>
|
||||
<input type="text" name="SupplierName" maxlength="100" id="supplierName" class="form-control" required value="<?php echo $SupplierName; ?>">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="ContactNumber">Contact Number</label>
|
||||
<input type="text" name="ContactNumber" onchange="return getContactNumberValidation();"
|
||||
id="ContactNumber" maxlength="13" class="form-control"
|
||||
value="<?php echo $ContactNumber; ?>"
|
||||
title="Please Enter Mobile Number (or) Telephone Number"
|
||||
onkeypress="return isNumberKey(event)">
|
||||
<input type="text" name="ContactNumber" onchange="return getContactNumberValidation();" id="ContactNumber" maxlength="13" class="form-control" title="Please Enter Mobile Number (or) Telephone Number" value="<?php echo $ContactNumber; ?>" onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="AlternateContactNumber">Alternate Contact Number</label>
|
||||
<input type="text" name="AlternateContactNumber"
|
||||
onchange="return getValidAlternateNumber();" id="AlternateContactNumber" maxlength="13"
|
||||
class="form-control" value="<?php echo $AlternateContactNumber; ?>"
|
||||
title="Please Enter Mobile Number (or) Telephone Number"
|
||||
onkeypress="return isNumberKey(event)">
|
||||
<input type="text" name="AlternateContactNumber" onchange="return getValidAlternateNumber();" id="AlternateContactNumber" maxlength="13" class="form-control" title="Please Enter Mobile Number (or) Telephone Number" onkeypress="return isNumberKey(event)" value="<?php echo $AlternateContactNumber; ?>">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="EmailAddress">Email ID</label>
|
||||
<input type="email" name="emailid" id="emailid" maxlength="100"
|
||||
class="form-control" value="<?php echo $EmailAddress; ?>"
|
||||
title="Please Enter valid mail address" onchange="validateEmail();">
|
||||
<input type="email" name="emailid" id="emailid" maxlength="100" class="form-control" value="<?php echo $EmailAddress; ?>" title="Please Enter valid mail address" onchange="validateEmail();">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="col-md-12" style="margin-top:5px">
|
||||
<label for="SupplierType">Supplier Type</label>
|
||||
 
|
||||
</div>
|
||||
<div class="col-md-1" style="margin-top:5px">
|
||||
<input type="checkbox" id="service" <?php echo $IsService; ?> name="service" value="1">
|
||||
<b>SERVICE</b>
|
||||
<input type="checkbox" id="service" name="service" <?php echo $IsService; ?> value="1"> <b>SERVICE  </b>
|
||||
</div>
|
||||
<div class="col-md-1.5" style="margin-top:5px">
|
||||
<input type="checkbox" id="rawmaterial" <?php echo $IsRawMaterial; ?> name="rawmaterial"
|
||||
value="1"> <b>RAW MATERIALS</b>
|
||||
<input type="checkbox" id="rawmaterial" name="rawmaterial" <?php echo $IsRawMaterial; ?> value="1"> <b>RAW MATERIALS  </b>
|
||||
</div>
|
||||
<div class="col-md-2" style="margin-top:5px">
|
||||
<input type="checkbox" id="maintanance" <?php echo $IsMaintanance; ?> name="maintanance"
|
||||
value="1"> <b>MAINTENANCE</b>
|
||||
<input type="checkbox" id="maintanance" name="maintanance" <?php echo $IsMaintanance; ?> value="1"> <b>MAINTENANCE  </b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -370,64 +353,66 @@ if (!empty($supplier)) {
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Address Details</legend>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<label for="Address2">Address<span class="badge">*</span></label>
|
||||
<textarea type="text" class="form-control" id="Address" name="Address" maxlength="500"
|
||||
required rows="3"><?php echo $Address; ?></textarea>
|
||||
<div class=" col-md-6">
|
||||
<label class="col-form-label" for="Address2">Address<span class="badge">*</span></label>
|
||||
<textarea type="text" class="form-control required" id="Address" name="Address" maxlength="500" required rows="3"><?php echo $Address; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tax Related Data -->
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Tax Related Data</legend>
|
||||
<!-- Text input-->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row" style="margin-bottom: 20px;">
|
||||
<div class="col-md-3">
|
||||
<label for="GSTNo">GST Number</label>
|
||||
<input type="text" id="GSTNo" name="GSTNo" onchange="validateGST();" maxlength="15"
|
||||
class="form-control" value="<?php echo $GSTNO; ?>"
|
||||
pattern="([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-9]){1}"
|
||||
style="text-transform:uppercase;"
|
||||
title="Please Enter 2 Digit Number and 5 Character and 4 Digit Numbers and 1 Character and 1 Number and 'Z' Character and 1 Number (or) Character "
|
||||
onkeypress="return alphaNumberic(event)">
|
||||
<div class="form-row">
|
||||
<div class=" col-md-4">
|
||||
<label class="col-form-label" for="GSTNo">GST Number</label>
|
||||
<input type="text" id="GSTNo" name="GSTNo" class="form-control" maxlength="15" onchange="validateGST();" style="text-transform:uppercase;" pattern="([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-9]){1}" title="Please Enter 2 Digit Number and 5 Character and 4 Digit Numbers and 1 Character and 1 Number and 'Z' and 1 Number or Character" onkeypress="return alphaNumberic(event)" value="<?php echo $GSTNO; ?>">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="PAN">PAN</label>
|
||||
<input type="text" id="panno" maxlength="10" name="panno" onchange="validatePAN();"
|
||||
class="form-control" value="<?php echo $PAN; ?>"
|
||||
title="Please Enter 5 Character and 4 digit numbers and 1 Character format (Character must be in caps format)"
|
||||
pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}" onkeypress="return alphaNumberic(event)"
|
||||
style="text-transform:uppercase;">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label style="margin-bottom: 1px !important;" for="Cert_GST">Select GST
|
||||
Document<br /><small>(only .pdf, .doc, .png, .jpg)</small></label>
|
||||
<input type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_GST"
|
||||
name="Cert_GST" />
|
||||
<div class=" col-md-4">
|
||||
<label class="col-form-label" for="Cert_GST">Select GST Document<small> (only .pdf, .doc, .png, .jpg)</small></label>
|
||||
<input style="margin-top: 5px;" type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_GST" name="Cert_GST"/>
|
||||
<input type="hidden" id="hidden_Cert_GST" name="hidden_Cert_GST"
|
||||
value="<?php echo $hidden_Cert_GST; ?>" />
|
||||
|
||||
</div>
|
||||
<?php if ($hidden_Cert_GST) { ?>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-4">
|
||||
<u><a title="previously uploaded GST Document"
|
||||
href="<?php echo base_url() . 'public/uploads/images/' . $hidden_Cert_GST ?>"><span>previously
|
||||
uploaded GST Document - </span><small><?= $hidden_Cert_GST; ?></small></a></u>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row" style="margin-bottom: 20px;">
|
||||
<div class=" col-md-6">
|
||||
<label class="col-form-label" for="MSME">MSME</label>
|
||||
<input type="text" id="MSMENo" name="MSME" class="form-control" maxlength="30" value="<?=$MSME?>">
|
||||
<div class="form-row">
|
||||
<div class=" col-md-4">
|
||||
<label class="col-form-label" for="PAN">PAN</label>
|
||||
<input type="text" id="panno" maxlength="10" pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}" name="panno" style="text-transform:uppercase;" onchange="validatePAN();" class="form-control" title="Please Enter 5 Character and 4 digit numbers and 1 Character format (Character should be in caps)" onkeypress="return alphaNumberic(event)" value="<?php echo $PAN; ?>">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label style="margin-bottom: 1px !important;" for="Cert_MSME">Select MSME
|
||||
Document<br /><small>(only .pdf, .doc, .png, .jpg)</small></label>
|
||||
<input type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_MSME"
|
||||
name="Cert_MSME" />
|
||||
<div class=" col-md-4">
|
||||
<label class="col-form-label" for="Cert_PAN">Select PAN Document<small> (only .pdf, .doc, .png, .jpg)</small></label>
|
||||
<input style="margin-top: 5px;" type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_PAN" name="Cert_PAN" />
|
||||
<input type="hidden" id="hidden_Cert_PAN" name="hidden_Cert_PAN"
|
||||
value="<?php echo $hidden_Cert_PAN; ?>" />
|
||||
|
||||
|
||||
</div>
|
||||
<?php if ($hidden_Cert_PAN) { ?>
|
||||
<div class="col-md-4">
|
||||
<u><a title="previously uploaded PAN Document"
|
||||
href="<?php echo base_url() . 'public/uploads/images/' . $hidden_Cert_PAN ?>"><span>previously
|
||||
uploaded PAN Document - </span><small><?= $hidden_Cert_PAN; ?></small></a></u>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class=" col-md-4">
|
||||
<label class="col-form-label" for="MSME">MSME</label>
|
||||
<input type="text" id="MSMENo" name="MSME" class="form-control" maxlength="30" value="<?php echo $MSME; ?>">
|
||||
</div>
|
||||
<div class=" col-md-4">
|
||||
<label class="col-form-label" for="Cert_MSME">Select MSME Document<small> (only .pdf, .doc, .png, .jpg)</small></label>
|
||||
<input style="margin-top: 5px;" type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_MSME" name="Cert_MSME" />
|
||||
<input type="hidden" id="hidden_Cert_MSME" name="hidden_Cert_MSME"
|
||||
value="<?php echo $hidden_Cert_MSME; ?>" />
|
||||
</div>
|
||||
@ -441,42 +426,31 @@ if (!empty($supplier)) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
|
||||
|
||||
<!-- Bank Details-->
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Bank Details</legend>
|
||||
|
||||
<!-- Bank Details Inputs -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row" style="margin-bottom: 20px;">
|
||||
<div class="col-md-4">
|
||||
<label for="accno">Account Number <span class="badge">*</span></label>
|
||||
<input type="text" id="accno" maxlength="20" name="accno" value="<?php echo $accno; ?>"
|
||||
class="form-control" onkeypress="return isNumberKey(event)" required>
|
||||
<div class="form-row">
|
||||
<div class=" col-md-4">
|
||||
<label class="col-form-label" for="Account_number">Account Number<span class="badge">*</span></label>
|
||||
<input type="text" id="accno" name="accno" maxlength="20" class="form-control" onkeypress="return isNumberKey(event)" required value="<?php echo $accno; ?>">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="ifsc">IFSC Code <span class="badge">*</span></label>
|
||||
<input type="text" id="ifsc" name="ifsc" value="<?php echo $IFSCCode; ?>"
|
||||
class="form-control" maxlength="12" style="text-transform: uppercase" required>
|
||||
<div class=" col-md-4">
|
||||
<label class="col-form-label" for="IFSC_Code">IFSC Code<span class="badge">*</span></label>
|
||||
<input type="text" id="ifsc" name="ifsc" maxlength="12" class="form-control" onkeypress="return alpha(event)" style="text-transform: uppercase" required value="<?php echo $IFSCCode; ?>">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="branchname">Bank Branch Name</label>
|
||||
<input type="text" id="branchname" name="branchname" value="<?php echo $branchname; ?>"
|
||||
class="form-control" maxlength="200">
|
||||
<div class=" col-md-4">
|
||||
<label class="col-form-label" for="Bank_Branch_Name">Bank Branch Name</label>
|
||||
<input type="text" id="branchname" name="branchname" maxlength="200" class="form-control" value="<?php echo $branchname; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Bank Document Upload -->
|
||||
<div class="form-row" style="margin-bottom: 27px;">
|
||||
<div class="col-md-4">
|
||||
<label for="bankaddress">Bank Address</label>
|
||||
<input type="text" id="bankaddress" name="bankaddress" value="<?php echo $bankaddress; ?>"
|
||||
class="form-control" maxlength="200">
|
||||
<div class="form-row" style="margin-top:20px">
|
||||
<div class=" col-md-4">
|
||||
<label class="col-form-label" for="Bank_Address">Bank Address</label>
|
||||
<input type="text" id="bankaddress" name="bankaddress" maxlength="200" class="form-control" value="<?php echo $bankaddress; ?>">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="col-form-label" for="Cert_BANK">Select Bank Document<small> (only .pdf, .doc,
|
||||
.png, .jpg)</small></label>
|
||||
<input type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_BANK"
|
||||
name="Cert_BANK" />
|
||||
<div class=" col-md-4">
|
||||
<label class="col-form-label" for="Cert_BANK">Select Bank Document<small> (only .pdf, .doc, .png, .jpg)</small></label>
|
||||
<input style="margin-top: 5px;" type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_BANK" name="Cert_BANK" />
|
||||
<input type="hidden" id="hidden_Cert_BANK" name="hidden_Cert_BANK"
|
||||
value="<?php echo $hidden_Cert_BANK; ?>" />
|
||||
</div>
|
||||
@ -491,39 +465,37 @@ if (!empty($supplier)) {
|
||||
</u>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Payment Details -->
|
||||
<legend style="margin-left:-10px;color: #4f7c97;">Payment Details</legend>
|
||||
|
||||
<!-- Payable Terms Selection -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row" style="margin-bottom: 20px;">
|
||||
<div class="col-md-4">
|
||||
<div class="form-row">
|
||||
<div class=" col-md-4">
|
||||
<label for="payablefrom">Payable Terms <span class="text-danger">*</span></label>
|
||||
<select class="form-control required select2" id="PaymentTerms" name="PaymentTerms"
|
||||
onchange="payment_hidden();" required>
|
||||
<option value="<?php echo $PaymentTerms; ?>"><?php echo $PaymentTerms; ?></option>
|
||||
<?php
|
||||
if (!empty($payment)) {
|
||||
foreach ($payment as $pm) { ?>
|
||||
<option value="<?php echo $pm->PaymentID; ?>"><?php echo $pm->PaymentTerms; ?></option>
|
||||
<?php
|
||||
<select class="form-control required select2" id="PaymentTerms" name="PaymentTerms"
|
||||
onchange="payment_hidden();" required>
|
||||
<option value="<?php echo $PaymentTerms; ?>"><?php echo $PaymentTerms; ?></option>
|
||||
<?php
|
||||
if (!empty($payment)) {
|
||||
foreach ($payment as $pmt) { ?>
|
||||
<option value="<?php echo $pmt->PaymentID; ?>"><?php echo $pmt->PaymentTerms; ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="hidden" id="paymentid" name="paymentid" value="<?php echo $PaymentId; ?>">
|
||||
<!-- Uncomment the next line if you need the payment name in hidden input -->
|
||||
<!-- <input type="hidden" id="paymentname" name="paymentname" value="<?php echo $PaymentId; ?>"> -->
|
||||
?>
|
||||
</select>
|
||||
<input type="hidden" id="paymentid" name="paymentid" value="<?php echo $PaymentId; ?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
<div class="col-md-12">
|
||||
<br />
|
||||
<div class="col-md-12">
|
||||
<div class="form-group row text-right">
|
||||
<div class="col-12">
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">
|
||||
@ -532,9 +504,9 @@ if (!empty($supplier)) {
|
||||
<button type="button" id="updateSupplierBtnId" class="btn btn-info pull-right">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div> <!-- end col -->
|
||||
</div> <!-- end row -->
|
||||
@ -565,14 +537,6 @@ if (!empty($supplier)) {
|
||||
$("#supplierName").focus();
|
||||
return false;
|
||||
}
|
||||
if (!getContactNumberValidation) {
|
||||
$("#ContactNumber").focus();
|
||||
return false;
|
||||
}
|
||||
if (!validateEmail()) {
|
||||
$('#emailid').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($("#Address").val().length < 1) {
|
||||
alert('Please Enter Address');
|
||||
@ -580,6 +544,24 @@ if (!empty($supplier)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($("#accno").val().length < 1) {
|
||||
alert('Please Enter Account number');
|
||||
$("#accno").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($("#ifsc").val().length < 1) {
|
||||
alert('Please Enter Bank IFSC code');
|
||||
$("#ifsc").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($("#PaymentTerms").val().length < 1) {
|
||||
alert('Please select the Payment option');
|
||||
$("#PaymentTerms").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user