Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
1d04c13287
@ -1,4 +1,329 @@
|
||||
<style>
|
||||
legend {
|
||||
border-bottom: 2px solid #FFF !important;
|
||||
margin-left: -2%;
|
||||
}
|
||||
.form-group {
|
||||
padding-bottom: 4%;
|
||||
}
|
||||
.badge {
|
||||
color: red;
|
||||
background-color: #fff;
|
||||
}
|
||||
.btn-cancel {
|
||||
background-color: grey; /* Red color */
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
margin: 4px 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-cancel:hover {
|
||||
background-color: #d32f2f; /* Darker red on hover */
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<!-- ============================================================== -->
|
||||
<!-- Start Page Content here -->
|
||||
<!-- ============================================================== -->
|
||||
|
||||
<div class="content-page">
|
||||
<div class="content">
|
||||
<?php
|
||||
helper('form');
|
||||
$error = session()->getFlashdata('error');
|
||||
if ($error) {
|
||||
?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo session()->getFlashdata('error'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$success = session()->getFlashdata('success');
|
||||
if ($success) {
|
||||
?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo session()->getFlashdata('success'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
<div class="box box-success">
|
||||
<?php if (!empty($validation)) : ?>
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
<?php foreach ($validation as $error) : ?>
|
||||
<li><?= esc($error) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- form start -->
|
||||
</div>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title"> Add Supplier Details</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
|
||||
<a class="btn btn-cancel" href="<?php echo base_url(); ?>supplierlisting"> <span class="bold">Back</span></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="p-2">
|
||||
<form class="form-horizontal" role="form" id="addsupplier" action="<?php echo base_url() ?>addNewsupplier" method="post" role="form" enctype="multipart/form-data">
|
||||
<div class="box-body">
|
||||
<!-- Supplier Information -->
|
||||
<legend style="margin-left:-10px">Supplier Information</legend>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row">
|
||||
<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>
|
||||
</div>
|
||||
<div class=" col-md-3">
|
||||
<label class="col-form-label" for="ContactNumber">Contact Number<span class="badge">*</span></label>
|
||||
<input type="text" name="ContactNumber" onchange="return getContactNumberValidation();" id="ContactNumber" required maxlength="13" class="form-control" title="Please Enter Mobile Number (or) Telephone Number" 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" title="Please Enter Mobile Number (or) Telephone Number" onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="EmailAddress">Email ID<span class="badge">*</span></label>
|
||||
<input type="email" name="emailid" id="emailid" required maxlength="100" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row" >
|
||||
<div class="col-md-12" style="margin-top:20px">
|
||||
<label for="SupplierType">Supplier Type</label><!--<span class="badge">*</span>-->
|
||||
 
|
||||
</div>
|
||||
<div class="col-md-1" style="margin-top:20px">
|
||||
<input type="checkbox" id="service" name="service" value="<?php echo $service = (isset($_POST['service'])) ? 0 : 1; ?>"> <b>SERVICE  </b>
|
||||
</div>
|
||||
<div class="col-md-1.5" style="margin-top:20px">
|
||||
<input type="checkbox" id="rawmaterial" name="rawmaterial" value="<?php echo $rawmaterial = (isset($_POST['rawmaterial'])) ? 0 : 1; ?>"> <b>RAW MATERIALS  </b>
|
||||
</div>
|
||||
<div class="col-md-2" style="margin-top:20px">
|
||||
<input type="checkbox" id="maintanance" name="maintanance" value="<?php echo $maintanance = (isset($_POST['maintanance'])) ? 0 : 1; ?>"> <b>MAINTENANCE  </b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Address Section -->
|
||||
<legend style="margin-left:-10px">Address Details</legend>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row">
|
||||
<div class=" col-md-6">
|
||||
<label class="col-form-label" for="Address2">Address<span class="badge">*</span></label>
|
||||
<input type="text" class="form-control required" id="Address" name="Address" maxlength="500" style="height: 70px;" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tax Related Data -->
|
||||
<legend style="margin-left:-10px">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-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)">
|
||||
</div>
|
||||
<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)">
|
||||
</div>
|
||||
<div class=" col-md-3">
|
||||
<label 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>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class=" col-md-8">
|
||||
<label class="col-form-label" for="MSME">MSME</label>
|
||||
<input type="text" id="MSMENo" name="MSME" class="form-control" maxlength="30">
|
||||
</div>
|
||||
<div class=" col-md-3">
|
||||
<label 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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bank Details-->
|
||||
<legend style="margin-left:-10px">Bank Details</legend>
|
||||
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<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">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row" style="margin-top:20px">
|
||||
<div class=" col-md-4">
|
||||
<label class="col-form-label" for="Bank_Address">Bank Address<span class="badge">*</span></label>
|
||||
<input type="text" id="bankaddress" name="bankaddress" maxlength="200" class="form-control">
|
||||
</div>
|
||||
<div class=" col-md-4">
|
||||
<label for="Cert_BANK">Select Bank Document<br/><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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<legend style="margin-left:-10px">Payment Details</legend>
|
||||
<!-- Text input-->
|
||||
|
||||
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="col-md-3">
|
||||
<span for="payablefrom">Payable Terms</span>
|
||||
<select class="form-control required select2" id="Payment" name="Payment" onchange="payment_hidden();"> <!-- onchange="storeVal(this,'hiddenVal');"> -->
|
||||
<option value="Date of invoice">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>
|
||||
</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">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end row -->
|
||||
</div>
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
<!-- end row -->
|
||||
</div> <!-- container -->
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
|
||||
<!-- ============================================================== -->
|
||||
<!-- End Page content -->
|
||||
<!-- ============================================================== -->
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function payment_hidden() {
|
||||
var term = document.getElementById("Payment");
|
||||
var termid = term.options[term.selectedIndex].value;
|
||||
var termname = term.options[term.selectedIndex].text;
|
||||
$("#paymentid").val(termid);
|
||||
$("#paymentname").val(termname);
|
||||
}
|
||||
|
||||
function Validate() {
|
||||
if ($("#supplierName").val().length < 1) {
|
||||
alert('Please Enter Supplier Name');
|
||||
$("#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');
|
||||
$("#Address").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!validateEmail()) {
|
||||
$('#emailid').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$('#supplierName').change(function() {
|
||||
var suppliername = $('#supplierName').val();
|
||||
var supplier = suppliername.replace(/ /g, '');
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?= base_url() . 'supplierExist' ?>",
|
||||
data: { id: supplier },
|
||||
success: function(data) {
|
||||
var count = data.length;
|
||||
if (count > 2) {
|
||||
$('#content').loader('hide');
|
||||
alert('supplier already existed ! ');
|
||||
var related_supplier = "";
|
||||
$.each(data, function(i, obj) {
|
||||
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
||||
});
|
||||
alert("'" + suppliername + "' - related supplier are , " + " \n \n" + related_supplier);
|
||||
$("#supplierName").focus();
|
||||
} else {
|
||||
$('#content').loader('hide');
|
||||
// alert('This is New Supplier! ');
|
||||
}
|
||||
console.log(data);
|
||||
},
|
||||
error: function() {
|
||||
$('#content').loader('hide');
|
||||
// alert("Error Occur");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//Email Validate
|
||||
function validateEmail() {
|
||||
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
|
||||
@ -23,9 +348,7 @@
|
||||
function blockKeyPress(evt) {
|
||||
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
alert(charCode);
|
||||
if (charCode == 8 || charCode == 46)
|
||||
|
||||
{
|
||||
if (charCode == 8 || charCode == 46){
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
@ -181,305 +504,3 @@
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
legend {
|
||||
border-bottom: 2px solid #FFF !important;
|
||||
margin-left: -2%;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
padding-bottom: 4%;
|
||||
}
|
||||
|
||||
.badge {
|
||||
color: red;
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center> Add Supplier Details</center>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<a class="btn btn-cancel" href="<?php echo base_url(); ?>supplierlisting"> <span class="bold">Back</span></a>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section class="content" id="content">
|
||||
<br />
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-12">
|
||||
<!-- general form elements -->
|
||||
|
||||
|
||||
<div class="box box-success">
|
||||
<?php if (!empty($validation)) : ?>
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
<?php foreach ($validation as $error) : ?>
|
||||
<li><?= esc($error) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- form start -->
|
||||
|
||||
|
||||
<div class="row" style="font-size:11px; padding-left:38px;">
|
||||
<div class="col-md-12"><br />
|
||||
<form class="form-horizontal" role="form" id="addsupplier" action="<?php echo base_url() ?>addNewsupplier" method="post" role="form" enctype="multipart/form-data">
|
||||
<div class="box-body">
|
||||
<!-- Form Name -->
|
||||
<legend>Supplier Information</legend>
|
||||
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
|
||||
<div class="col-md-3">
|
||||
<span for="SupplierName">Supplier Name</span><span class="badge">*</span>
|
||||
<input type="text" name="SupplierName" maxlength="100" id="supplierName" class="form-control" required>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<span for="ContactNumber">Contact Number</span><span class="badge">*</span>
|
||||
<input type="text" name="ContactNumber" onchange="return getContactNumberValidation();" id="ContactNumber" required maxlength="13" class="form-control" title="Please Enter Mobile Number (or) Telephone Number" onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<span for="AlternateContactNumber">Alternate Contact Number</span>
|
||||
<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)">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<span for="EmailAddress">Email ID</span><span class="badge">*</span>
|
||||
<input type="email" name="emailid" id="emailid" required maxlength="100" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="col-md-12"><span for="SupplierType">Supplier Type</span><!--<span class="badge">*</span>-->
|
||||
 
|
||||
<input type="checkbox" id="service" name="service" value="<?php echo $service = (isset($_POST['service'])) ? 0 : 1; ?>"> <b>SERVICE  </b>
|
||||
<input type="checkbox" id="rawmaterial" name="rawmaterial" value="<?php echo $rawmaterial = (isset($_POST['rawmaterial'])) ? 0 : 1; ?>"> <b>RAW MATERIALS  </b>
|
||||
<input type="checkbox" id="maintanance" name="maintanance" value="<?php echo $maintanance = (isset($_POST['maintanance'])) ? 0 : 1; ?>"> <b>MAINTENANCE  </b>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Address Section -->
|
||||
<!-- Form Name -->
|
||||
<legend>Address Details</legend>
|
||||
<!-- Text input-->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="col-md-12"><span for="Address2">Address</span><span class="badge">*</span>
|
||||
<input type="text" class="form-control required" id="Address" name="Address" maxlength="500" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<legend>Tax Related Data</legend>
|
||||
<!-- Text input-->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="col-md-3">
|
||||
<span for="GSTNo">GST Number</span><!--<span class="badge">*</span> -->
|
||||
<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)">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<span for="PAN">PAN</span> <!--<span class="badge">*</span>-->
|
||||
<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)">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_GST" name="Cert_GST"/>
|
||||
<label for="Cert_GST">Select GST Document<br/><small>(only .pdf, .doc, .png, .jpg)</small></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="col-md-6">
|
||||
<span for="MSME">MSME</span>
|
||||
<input type="text" id="MSMENo" name="MSME" class="form-control" maxlength="30">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_MSME" name="Cert_MSME"/>
|
||||
<label for="Cert_MSME">Select MSME Document<br/><small>(only .pdf, .doc, .png, .jpg)</small></label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Text input-->
|
||||
<legend>Bank Details</legend>
|
||||
<!-- Text input-->
|
||||
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="col-md-3"><span>Account Number</span><span class="badge">*</span>
|
||||
<input type="text" id="accno" name="accno" maxlength="20" class="form-control" onkeypress="return isNumberKey(event)" required>
|
||||
</div>
|
||||
<div class="col-md-3"><span>IFSC Code</span><span class="badge">*</span>
|
||||
<input type="text" id="ifsc" name="ifsc" maxlength="12" class="form-control" onkeypress="return alpha(event)" style="text-transform: uppercase" required>
|
||||
</div>
|
||||
<div class="col-md-3"><span>Bank Branch Name</span>
|
||||
<input type="text" id="branchname" name="branchname" maxlength="200" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3"><span>Bank Address</span>
|
||||
<input type="text" id="bankaddress" name="bankaddress" maxlength="200" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="col-md-3">
|
||||
<input type="file" size="20" accept=".docx,.pdf,.doc,.jpg,.png" id="Cert_BANK" name="Cert_BANK"/>
|
||||
<label for="Cert_BANK">Select Bank Document<br/><small>(only .pdf, .doc, .png, .jpg)</small></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<legend>Payment Details</legend>
|
||||
<!-- Text input-->
|
||||
|
||||
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="col-md-3">
|
||||
<span for="payablefrom">Payable Terms</span>
|
||||
<select class="form-control required select2" id="Payment" name="Payment" onchange="payment_hidden();"> <!-- onchange="storeVal(this,'hiddenVal');"> -->
|
||||
<option value="Date of invoice">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>
|
||||
</div>
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="reset" id="reset" class="btn btn-reset" value="Reset" />
|
||||
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.col-lg-12 -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<?php
|
||||
helper('form');
|
||||
$error = session()->getFlashdata('error');
|
||||
if ($error) {
|
||||
?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo session()->getFlashdata('error'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$success = session()->getFlashdata('success');
|
||||
if ($success) {
|
||||
?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo session()->getFlashdata('success'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
|
||||
?> </div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$listErrors = session()->getFlashdata('listErrors');
|
||||
if($listErrors)
|
||||
{
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo session()->getFlashdata('listErrors'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
function payment_hidden() {
|
||||
var term = document.getElementById("Payment");
|
||||
var termid = term.options[term.selectedIndex].value;
|
||||
var termname = term.options[term.selectedIndex].text;
|
||||
$("#paymentid").val(termid);
|
||||
$("#paymentname").val(termname);
|
||||
//alert(termid);
|
||||
//alert(termname);
|
||||
}
|
||||
|
||||
function Validate() {
|
||||
// if(!validatePAN())
|
||||
// {
|
||||
|
||||
// $('#panno').focus();
|
||||
// return false;
|
||||
// }
|
||||
|
||||
if ($("#supplierName").val().length < 1) {
|
||||
alert('Please Enter Supplier Name');
|
||||
$("#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');
|
||||
$("#Address").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!validateEmail()) {
|
||||
$('#emailid').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
$('#supplierName').change(function() {
|
||||
var suppliername = $('#supplierName').val();
|
||||
var supplier = suppliername.replace(/ /g, '');
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?= base_url() . 'supplierExist' ?>",
|
||||
data: { id: supplier },
|
||||
success: function(data) {
|
||||
var count = data.length;
|
||||
if (count > 2) {
|
||||
$('#content').loader('hide');
|
||||
alert('supplier already existed ! ');
|
||||
var related_supplier = "";
|
||||
$.each(data, function(i, obj) {
|
||||
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
||||
});
|
||||
alert("'" + suppliername + "' - related supplier are , " + " \n \n" + related_supplier);
|
||||
$("#supplierName").focus();
|
||||
} else {
|
||||
$('#content').loader('hide');
|
||||
// alert('This is New Supplier! ');
|
||||
}
|
||||
console.log(data);
|
||||
},
|
||||
error: function() {
|
||||
$('#content').loader('hide');
|
||||
// alert("Error Occur");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user