supplierdetails
This commit is contained in:
parent
6dde00aa26
commit
3c5073b34d
@ -18,7 +18,7 @@ class supplier extends BaseController
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('supplier_model');
|
||||
$this->load->library('form_validation');
|
||||
$this->load->library('form_validation');
|
||||
$this->load->library('pagination');
|
||||
$this->load->library('Excel');
|
||||
$this->isLoggedIn();
|
||||
@ -40,8 +40,7 @@ class supplier extends BaseController
|
||||
{
|
||||
|
||||
$this->load->model('supplier_model');
|
||||
|
||||
|
||||
|
||||
$data['userRecords'] = $this->supplier_model->supplierListing();
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth Industries : Supplier Listing';
|
||||
@ -122,13 +121,10 @@ class supplier extends BaseController
|
||||
|
||||
$this->form_validation->set_rules('SupplierName','Supplier Name','trim|required');
|
||||
$this->form_validation->set_rules('Address','Address','trim|required|');
|
||||
|
||||
$this->form_validation->set_rules('ContactNumber','Contact Number','trim|required|numeric|max_length[10]');
|
||||
$this->form_validation->set_rules('AlternateContactNumber','Alternate Contact Number','trim|numeric|max_length[10]');
|
||||
$this->form_validation->set_rules('emailid','emailid', 'valid_email|max_length[128]|required');
|
||||
|
||||
$this->form_validation->set_rules('TIN','TIN','trim|required|max_length[11]');
|
||||
|
||||
$this->form_validation->set_rules('panno', 'panno', 'trim|required|max_length[10]|callback_checkPanValidate');
|
||||
|
||||
|
||||
@ -153,7 +149,7 @@ class supplier extends BaseController
|
||||
$PaymentTerms = $this->input->post('PaymentTerms');
|
||||
$Payment = $this->input->post('Payment');
|
||||
$PayableAT = $this->input->post('PayableAT');
|
||||
$CSTNo = $this->input->post('CSTNo');
|
||||
$CSTNo = $this->input->post('CSTNo');
|
||||
|
||||
$CSTDt = $this->input->post('dateofCST');
|
||||
|
||||
@ -165,11 +161,29 @@ class supplier extends BaseController
|
||||
{
|
||||
$CSTDate = null;
|
||||
}
|
||||
|
||||
$EMSNo = $this->input->post('EMSNo');
|
||||
$TSNo = $this->input->post('TSNo');
|
||||
$IMSNo = $this->input->post('IMSNo');
|
||||
$ISONo = $this->input->post('ISONo');
|
||||
$OSHASNo = $this->input->post('OSHASNo');
|
||||
$accno = $this->input->post('accno');
|
||||
$ifsc = $this->input->post('ifsc');
|
||||
$branchname = $this->input->post('branchname');
|
||||
$bankaddress = $this->input->post('bankaddress');
|
||||
|
||||
$Createdby = $this->session->userdata ( 'userId' );
|
||||
$date = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$createddate = $date->format('Y-m-d H:i:s');
|
||||
$service = $this->input->post('service');
|
||||
$rawmaterial =$this->input->post('rawmaterial');
|
||||
$maintenance = $this->input->post('maintenance');
|
||||
|
||||
|
||||
$supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'Exiseregistration'=>$Exiseregistration,'TIN'=>$TIN,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$Payment,'PayableAT'=>$PayableAT,'CSTNo'=>$CSTNo,'CSTDate'=>$CSTDate,'Createdby'=>$Createdby);
|
||||
$supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'Exiseregistration'=>$Exiseregistration,'TIN'=>$TIN,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$Payment,'PayableAT'=>$PayableAT,'CSTNo'=>$CSTNo,'CSTDate'=>$CSTDate,'CSTNo'=>$CSTNo,'CSTDate'=>$CSTDate,'Cert_EMS'=>$EMSNo, 'Cert_TS'=>$TSNo, 'Cert_IMS'=>$IMSNo, 'Cert_ISO'=>$ISONo, 'Cert_OSHAS'=>$OSHASNo, 'BankAcNumber'=>$accno, 'IFSCCode'=>$ifsc, 'BranchName'=>$branchname, 'BankAddress'=>$bankaddress,'Createdby'=>$Createdby,'IsService'=>$service,'IsMaintanance'=>$maintenance,'IsRawMaterial'=>$rawmaterial);
|
||||
|
||||
$result = $this->supplier_model->addNewsupplier($supplier);
|
||||
|
||||
|
||||
if($result > 0)
|
||||
{
|
||||
@ -206,16 +220,17 @@ class supplier extends BaseController
|
||||
$this->form_validation->set_rules('emailid','emailid','valid_email|max_length[128]|required');
|
||||
|
||||
$this->form_validation->set_rules('TIN','TIN','trim|required|max_length[11]');
|
||||
|
||||
|
||||
$this->form_validation->set_rules('panno', 'panno', 'trim|required|max_length[10]|callback_checkPanValidateSupplier');
|
||||
|
||||
|
||||
|
||||
if($this->form_validation->run() == FALSE)
|
||||
{
|
||||
$this->viewsupplier($supplierID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
$SupplierName = $this->input->post('SupplierName');
|
||||
$Address = $this->input->post('Address');
|
||||
$ContactNumber = $this->input->post('ContactNumber');
|
||||
@ -230,7 +245,7 @@ class supplier extends BaseController
|
||||
$UANumber = $this->input->post('UANumber');
|
||||
$PaymentTerms = $this->input->post('PaymentTerms');
|
||||
$Payment = $this->input->post('Payment');
|
||||
$PayableAT = $this->input->post('PayableAT');
|
||||
//$PayableAT = $this->input->post('PayableAT');
|
||||
$UpdatedBy = $this->session->userdata ( 'userId' );
|
||||
$chked = $this->input->post('isactive');
|
||||
|
||||
@ -244,9 +259,8 @@ class supplier extends BaseController
|
||||
}
|
||||
|
||||
$CSTNo = $this->input->post('CSTNo');
|
||||
|
||||
$CSTDt = $this->input->post('dateofCST');
|
||||
|
||||
|
||||
if($CSTDt != '')
|
||||
{
|
||||
$CSTDate = $this->getDateformat($CSTDt);
|
||||
@ -255,11 +269,27 @@ class supplier extends BaseController
|
||||
{
|
||||
$CSTDate = null;
|
||||
}
|
||||
$supplier = array();
|
||||
|
||||
$supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'Exiseregistration'=>$Exiseregistration,'TIN'=>$TIN,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$Payment,'PayableAT'=>$PayableAT,'UpdatedBy'=>$UpdatedBy,'IsActive'=>$IsActive,'CSTNo'=>$CSTNo,'CSTDate'=>$CSTDate);
|
||||
|
||||
$result = $this->supplier_model->UpdateSupplier($supplier, $supplierID);
|
||||
|
||||
$EMSNo = $this->input->post('EMSNo');
|
||||
$TSNo = $this->input->post('TSNo');
|
||||
$IMSNo = $this->input->post('IMSNo');
|
||||
$ISONo = $this->input->post('ISONo');
|
||||
$OSHASNo = $this->input->post('OSHASNo');
|
||||
$accno = $this->input->post('accno');
|
||||
$ifsc = $this->input->post('ifsc');
|
||||
$branchname = $this->input->post('branchname');
|
||||
$bankaddress = $this->input->post('bankaddress');
|
||||
$service = $this->input->post('service');
|
||||
$rawmaterial =$this->input->post('rawmaterial');
|
||||
$maintanance = $this->input->post('maintanance');
|
||||
|
||||
$supplier = array();
|
||||
$supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'Exiseregistration'=>$Exiseregistration,'TIN'=>$TIN,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$Payment,'CSTNo'=>$CSTNo,'CSTDate'=>$CSTDate,'Cert_EMS'=>$EMSNo, 'Cert_TS'=>$TSNo, 'Cert_IMS'=>$IMSNo, 'Cert_ISO'=>$ISONo, 'Cert_OSHAS'=>$OSHASNo, 'BankAcNumber'=>$accno, 'IFSCCode'=>$ifsc, 'BranchName'=>$branchname, 'BankAddress'=>$bankaddress,'UpdatedBy'=>$UpdatedBy,'IsActive'=>$IsActive,'IsService'=>$service,'IsMaintanance'=>$maintanance,'IsRawMaterial'=>$rawmaterial);
|
||||
//SupplierID, SupplierName, Address, ContactNumber, AlternateContactNumber, EmailAddress, Exiseregistration, TIN, PAN, CSTNO, CSTDate, GSTNO, GSTRange, CollectrateAddress, UANumber, PaymentTerms, PaymentDays, PayableAT, Cert_EMS, Cert_TS, Cert_IMS, Cert_ISO, Cert_OSHAS, BankAcNumber, IFSCCode, BranchName, BankAddress, Createdby, UpdatedBy, Updatedon, CreatedOn, IsActive);
|
||||
print_r($supplier);
|
||||
//die();
|
||||
$result = $this->supplier_model->UpdateSupplier($supplier, $supplierID);
|
||||
|
||||
|
||||
if($result == True)
|
||||
{
|
||||
@ -307,7 +337,6 @@ class supplier extends BaseController
|
||||
$this->excel->setActiveSheetIndex(0);
|
||||
|
||||
$this->excel->getActiveSheet()->setTitle('supplier details');
|
||||
|
||||
$this->excel->getActiveSheet()->setCellValue('A1', 'SupplierID');
|
||||
$this->excel->getActiveSheet()->setCellValue('B1', 'SupplierName');
|
||||
$this->excel->getActiveSheet()->setCellValue('C1', 'Address');
|
||||
@ -405,10 +434,6 @@ class supplier extends BaseController
|
||||
$this->excel->getActiveSheet()->setCellValue('S' . $i,$data['firstname']);
|
||||
$this->excel->getActiveSheet()->setCellValue('T' . $i,$data['Update_by']);
|
||||
$this->excel->getActiveSheet()->setCellValue('U' . $i,$data['IsActive']);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$i++;
|
||||
$s++;
|
||||
|
||||
@ -15,7 +15,6 @@ class supplier_model extends CI_Model
|
||||
$this->db->select('BaseT.SupplierID, BaseT.SupplierName, BaseT.Address, BaseT.ContactNumber, BaseT.AlternateContactNumber,BaseT.EmailAddress,BaseT.Exiseregistration, BaseT.TIN, BaseT.PAN,,BaseT.GSTNO,BaseT.GSTRange,BaseT.CollectrateAddress,BaseT.UANumber,BaseT.PaymentTerms,BaseT.PaymentDays,BaseT.PayableAT,BaseT.CreatedOn');
|
||||
$this->db->from('T_SupplierDetailsN as BaseT');
|
||||
|
||||
|
||||
$query = $this->db->get();
|
||||
|
||||
$result = $query->result();
|
||||
@ -67,12 +66,17 @@ class supplier_model extends CI_Model
|
||||
|
||||
function addNewsupplier($supplier)
|
||||
{
|
||||
|
||||
$this->db->insert('T_SupplierDetailsN', $supplier);
|
||||
|
||||
$SID = $this->db->affected_rows();
|
||||
|
||||
return $SID;
|
||||
$this->db->insert('T_SupplierDetailsN', $supplier);
|
||||
$SID = $this->db->affected_rows();
|
||||
|
||||
if($SID>0)
|
||||
{
|
||||
$subQuery = 'select max(SupplierID) as suppid from T_SupplierDetailsN';
|
||||
$query = $this->db->query($subQuery);
|
||||
return $query->result();
|
||||
}
|
||||
//return $SID;
|
||||
|
||||
}
|
||||
|
||||
@ -95,7 +99,7 @@ function addNewsupplier($supplier)
|
||||
{
|
||||
$this->db->select('Address');
|
||||
$this->db->from('T_SupplierDetailsN');
|
||||
$this->db->where('SupplierID', $supplierID);
|
||||
$this->db->where('SupplierID', $supplierID);
|
||||
$query = $this->db->get();
|
||||
return $query->result_array();
|
||||
}
|
||||
@ -103,9 +107,15 @@ function addNewsupplier($supplier)
|
||||
{
|
||||
$this->db->where('SupplierID', $supplierID);
|
||||
$this->db->update('T_SupplierDetailsN', $supplier);
|
||||
|
||||
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function viewsupplier($supplier, $supplierID)
|
||||
{
|
||||
@ -114,17 +124,29 @@ function addNewsupplier($supplier)
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
function SupplierCertification($cerificate)
|
||||
{
|
||||
$this->db->insert_id('T_Supplier_Certification',$cerificate);
|
||||
$insert_id = $this->db->affected_rows();
|
||||
|
||||
return $insert_id;
|
||||
|
||||
}
|
||||
|
||||
function export_excel(){
|
||||
|
||||
$this->db->select('det.SupplierID,SupplierName,det.Address,det.ContactNumber,det.AlternateContactNumber,det.EmailAddress,det.Exiseregistration,det.TIN,
|
||||
det.PAN,det.CSTNO,det.CSTDate,det.GSTNO,det.GSTRange,det.CollectrateAddress,det.UANumber,det.PaymentTerms,det.PaymentDays,det.PayableAT,emp.firstname ,emp1.firstname as Update_by,,det.IsActive');
|
||||
det.PAN,det.CSTNO,det.CSTDate,det.GSTNO,det.GSTRange,det.CollectrateAddress,det.UANumber,det.PaymentTerms,det.PaymentDays,det.PayableAT,emp.firstname ,emp1.firstname as Update_by,,det.IsActive');
|
||||
$this->db->join('tbl_users as tbl',' det.createdby = tbl.userid','left');
|
||||
$this->db->join('T_Employee_Details as emp', 'emp.empid=tbl.empid','left');
|
||||
$this->db->join('tbl_users as tbl1',' det.UpdatedBy = tbl1.userid','left');
|
||||
$this->db->join('T_Employee_Details as emp1', 'emp1.empid=tbl1.empid','left');
|
||||
return $this->db->get('T_SupplierDetailsN as det')->result_array();
|
||||
}
|
||||
|
||||
/*SUPPLIER */
|
||||
/*SUPPLIER TYPE */
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<script>
|
||||
|
||||
<script>
|
||||
|
||||
//Email Validate
|
||||
function validateEmail() {
|
||||
@ -183,6 +184,7 @@ $(function() {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@ -197,6 +199,9 @@ $(function() {
|
||||
{
|
||||
color:red; background-color:#fff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
@ -232,47 +237,56 @@ $(function() {
|
||||
<!-- Form Name -->
|
||||
<legend>Supplier Information</legend>
|
||||
|
||||
<div class="col-md-3 pad">
|
||||
<div class="col-md-12" style="padding:0px;">
|
||||
<div class="col-md-5" style="padding:0px;">
|
||||
|
||||
<div class="col-md-7">
|
||||
<span for="SupplierName">Supplier Name</span><span class="badge">*</span>
|
||||
<input type="text" name="SupplierName" onkeypress="return onlyAlphabets(event);" maxlength="100" id="supplierName" class="form-control" required>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 pad">
|
||||
<div class="col-md-5"><span for="CollectrateAddress">Supplier Type</span><span class="badge">*</span> <br/>
|
||||
|
||||
<input type="checkbox" id="service" name="service" value="<?php echo $service = (isset($_POST['service'])) ? 0 : 1;?>"> <b>SERVICE </b><br/>
|
||||
<input type="checkbox" id="rawmaterial" name="rawmaterial" value="<?php echo $rawmaterial = (isset($_POST['rawmaterial'])) ? 0 : 1;?>"> <b>RAW MATERIALS </b><br/>
|
||||
<input type="checkbox" id="maintanance" name="maintanance" value="<?php echo $maintanance = (isset($_POST['maintanance'])) ? 0 : 1;?>"> <b>MAINTENANCE </b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5" style="padding:0px;">
|
||||
<div class="col-md-6">
|
||||
<span for="ContactNumber">Contact Number</span><span class="badge">*</span>
|
||||
<input type="text" name="ContactNumber" onchange="return getContactNumberValidation();" onkeypress="return event.charCode >= 48 && event.charCode <= 57" id="ContactNumber" required pattern="(.){10,10}" maxlength="10" class="form-control" title="Please Enter 10 digit Number">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 pad">
|
||||
<div class="col-md-6">
|
||||
<span for="AlternateContactNumber">Alternate Contact Number</span>
|
||||
<input type="text" name="AlternateContactNumber" onchange="return getValidAlternateNumber();" onkeypress="return event.charCode >= 48 && event.charCode <= 57" id="AlternateContactNumber" pattern="(.){10,10}" maxlength="10" class="form-control" title="Please Enter 10 digit Number">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 pad">
|
||||
</div>
|
||||
<div class="col-md-2" style="padding:0px;">
|
||||
<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>
|
||||
|
||||
<!-- Address Section -->
|
||||
<!-- Form Name -->
|
||||
<legend>Address Details</legend>
|
||||
<!-- Text input-->
|
||||
|
||||
<div class="col-md-12" style="padding:0px;">
|
||||
<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="padding:0px;">
|
||||
<div class="col-md-3 pad">
|
||||
<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,}" style="text-transform:uppercase;" name="panno" required onchange="validatePAN();" class="form-control" title="Please Enter 5 Character and 4 digit numbers and 1 Character format">
|
||||
<input type="text" id="panno" maxlength="10" pattern="(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]).{1,}" style="text-transform:uppercase;" name="panno" onchange="validatePAN();" requried class="form-control" title="Please Enter 5 Character and 4 digit numbers and 1 Character format">
|
||||
</div>
|
||||
<div class="col-md-3 pad">
|
||||
<span for="TIN">TIN</span><span class="badge">*</span>
|
||||
@ -287,39 +301,79 @@ $(function() {
|
||||
<span for="Exciseregistration">Excise Registration</span>
|
||||
<input type="text" class="form-control required" onchange="validateECCNumber();" id="Exciseregistration" name="Exciseregistration" minlength="15" maxlength="15" pattern="(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]).{1,}(?=.*[A-Za-z]).{2,}(?=.*[0-9]).{3,}" title="Please enter PAN Number and EM/ED option and 3 digit Numbers format" style="text-transform:uppercase;">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-3 pad">
|
||||
</div>
|
||||
<div class="col-md-12" style="padding:0px;">
|
||||
<div class="col-md-3 pad">
|
||||
<span for="GSTNo">CST Number</span>
|
||||
<input type="text" class="form-control " id="CSTNo" name="CSTNo" maxlength="15">
|
||||
</div>
|
||||
<div class="col-md-3 pad"><span>CST Registration Date</span>
|
||||
<input id="dateofCST" name="dateofCST" onkeypress="return false;" maxlength="10" class="form-control">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 pad">
|
||||
<span for="GSTNo">GST Number</span>
|
||||
<input type="text" class="form-control " id="GSTNo" name="GSTNo" maxlength="10">
|
||||
</div>
|
||||
|
||||
<span for="GSTNo">GST Number</span><span class="badge">*</span>
|
||||
<input type="text" class="form-control " id="GSTNo" name="GSTNo" maxlength="10" required>
|
||||
</div>
|
||||
<div class="col-md-3 pad">
|
||||
<span for="Range">GST Range</span>
|
||||
<input type="text" class="form-control " id="GSTRange" name="GSTRange" maxlength="10">
|
||||
<span for="Range">GST Range</span><span class="badge">*</span>
|
||||
<input type="text" class="form-control " id="GSTRange" name="GSTRange" maxlength="10" required>
|
||||
</div>
|
||||
<!-- Text input-->
|
||||
|
||||
<div class="col-md-6 pad"><span for="CollectrateAddress">Collectrate Address</span>
|
||||
<!-- Text input-->
|
||||
<div class="col-md-6 pad"><span for="CollectrateAddress">Collectrate Address</span>
|
||||
<input type="text" class="form-control " id="CollectrateAddress" name="CollectrateAddress" maxlength="500" >
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- Text input-->
|
||||
|
||||
<legend>Certification Details</legend>
|
||||
<div class="col-md-12" style="padding:0px;">
|
||||
<div class="col-md-5" style="padding:0px;">
|
||||
<div class="col-md-6 "><span for="EMSNo">EMS Number</span>
|
||||
<input type="text" class="form-control " id="EMSNo" name="EMSNo" maxlength="15">
|
||||
</div>
|
||||
<div class="col-md-6"><span for="TSNo">TS Number</span>
|
||||
<input type="text" class="form-control " id="TSNo" name="TSNo" maxlength="10">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5" style="padding:0px;">
|
||||
<div class="col-md-6">
|
||||
<span for="IMSNo">IMS Number</span>
|
||||
<input type="text" class="form-control " id="IMSNo" name="IMSNo" maxlength="10">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<span for="ISONo">ISO Range</span>
|
||||
<input type="text" class="form-control " id="ISONo" name="ISONo" maxlength="10">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<span for="OSHASNo">OSHAS Number</span>
|
||||
<input type="text" class="form-control " id="OSHASNo" name="OSHASNo" maxlength="10">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<legend>Bank Details</legend>
|
||||
<!-- Text input-->
|
||||
|
||||
<div class="col-md-12" style="padding:0px;">
|
||||
<div class="col-md-3"><span>Account Number</span>
|
||||
<input type="text" id="accno" name="accno" maxlength="20" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3"><span>IFSC Code</span>
|
||||
<input type="text" id="ifsc" name="ifsc" maxlength="12" class="form-control">
|
||||
</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>
|
||||
|
||||
<legend>Payment Details</legend>
|
||||
<!-- Text input-->
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<span for="payablefrom">Payable Terms</span>
|
||||
<select class="form-control required" id="PaymentTerms" name="PaymentTerms">
|
||||
@ -336,26 +390,18 @@ $(function() {
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<span for="PayableAT">Payable AT</span>
|
||||
<input type="text" class="form-control required" id="PayableAT" name="PayableAT">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3"><span>Payment Date</span><br/>
|
||||
<label class="radio-inline"><input type="radio" name="Payment" value="Before">Before</label>
|
||||
<label class="radio-inline"><input type="radio" name="Payment" value="After">After</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3 col-md-offset-9">
|
||||
<div class="pull-right">
|
||||
<input type="reset" id="reset" class="btn btn-info" value="Reset" />
|
||||
<input type="submit" onclick="return Validate();" class="btn btn-primary">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -460,3 +506,4 @@ if(!validateEmail())
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -16,10 +16,21 @@ $PaymentTerms = '';
|
||||
$PaymentDays = '';
|
||||
$PayableAT = '';
|
||||
$IsActive = '';
|
||||
$PaymentBefore = '';
|
||||
$PaymentAfter = '';
|
||||
$CSTNO = '';
|
||||
$CSTDate = '';
|
||||
$EMSNo = '';
|
||||
$TSNo = '';
|
||||
$IMSNo = '';
|
||||
$ISONo = '';
|
||||
$OSHASNo = '';
|
||||
$accno = '';
|
||||
$ifsc = '';
|
||||
$branchname = '';
|
||||
$bankaddress = '';
|
||||
$IsService = '';
|
||||
$IsMaintanance = '';
|
||||
$IsRawMaterial = '';
|
||||
|
||||
if(!empty($supplier))
|
||||
{
|
||||
foreach ($supplier as $uf)
|
||||
@ -42,16 +53,15 @@ if(!empty($supplier))
|
||||
$PayableAT = $uf->PayableAT;
|
||||
$CSTNO = $uf->CSTNO;
|
||||
$CSTDt = $uf->CSTDate;
|
||||
//echo 'CST date:'. $CSTDt ;
|
||||
|
||||
if($CSTDt != '')
|
||||
{
|
||||
$dtCST = new DateTime($CSTDt);
|
||||
$CSTDate = $dtCST ->format('Y-m-d');
|
||||
//echo $CSTDate ;
|
||||
|
||||
}
|
||||
|
||||
$chk = $uf->IsActive;
|
||||
|
||||
$chk = $uf->IsActive;
|
||||
if($chk == 1)
|
||||
{
|
||||
$IsActive = 'checked';
|
||||
@ -60,17 +70,48 @@ if(!empty($supplier))
|
||||
{
|
||||
$IsActive = '';
|
||||
}
|
||||
$Paymentchk = $uf->PaymentDays;
|
||||
if($Paymentchk == 'Before' )
|
||||
{
|
||||
$PaymentBefore = 'checked';
|
||||
$PaymentAfter = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$PaymentAfter = 'checked';
|
||||
$PaymentBefore = '';
|
||||
}
|
||||
|
||||
$sr = $uf->IsService;
|
||||
if($sr == 1)
|
||||
{
|
||||
$IsService = 'checked';
|
||||
}
|
||||
else
|
||||
{
|
||||
$IsService = '';
|
||||
}
|
||||
|
||||
$mt = $uf->IsMaintanance;
|
||||
if($mt == 1)
|
||||
{
|
||||
$IsMaintanance = 'checked';
|
||||
}
|
||||
else
|
||||
{
|
||||
$IsMaintanance = '';
|
||||
}
|
||||
|
||||
$rm = $uf->IsRawMaterial;
|
||||
if($rm == 1)
|
||||
{
|
||||
$IsRawMaterial = 'checked';
|
||||
}
|
||||
else
|
||||
{
|
||||
$IsRawMaterial = '';
|
||||
}
|
||||
|
||||
|
||||
$EMSNo = $uf->Cert_EMS;
|
||||
$TSNo = $uf->Cert_TS;
|
||||
$IMSNo = $uf->Cert_IMS;
|
||||
$ISONo = $uf->Cert_ISO;
|
||||
$OSHASNo = $uf->Cert_OSHAS;
|
||||
$accno = $uf->BankAcNumber;
|
||||
$IFSCCode = $uf->IFSCCode;
|
||||
$branchname = $uf->BranchName;
|
||||
$bankaddress = $uf->BankAddress;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -179,7 +220,7 @@ function getValidAlternateNumber()
|
||||
}
|
||||
|
||||
function validateEmail() {
|
||||
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
|
||||
//var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
|
||||
|
||||
var email = $('#emailid').val();
|
||||
|
||||
@ -307,7 +348,14 @@ function onlyAlphabets(evt) {
|
||||
<input type="email" name="emailid" id="emailid" pattern="([A-Z0-9_\-\.])+\@([A-Z0-9_\-\.])+\.([A-Z]{2,4})" required maxlength="100" class="form-control" value="<?php echo $EmailAddress;?>" title="Please Enter valid mail address" onchange="validateEmail();">
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
</br><input type="checkbox" id="isactive" <?php echo $IsActive;?> name="isactive" > IsActive </div>
|
||||
<div class="col-md-6"><span for="CollectrateAddress">Supplier Type :</span><span class="badge">*</span>
|
||||
|
||||
<input type="checkbox" id="service" <?php echo $IsService;?> name="service" value="1"> <b>SERVICE </b>
|
||||
<input type="checkbox" id="rawmaterial" <?php echo $IsRawMaterial;?> name="rawmaterial" value="1"> <b>RAW MATERIALS </b>
|
||||
<input type="checkbox" id="maintanance" <?php echo $IsMaintanance;?> name="maintanance" value="1"> <b>MAINTENANCE </b>
|
||||
|
||||
</div>
|
||||
<div class="col-md-5"><input type="checkbox" id="isactive" <?php echo $IsActive;?> name="isactive" > IsActive </div></div>
|
||||
<!-- Address Section -->
|
||||
<!-- Form Name -->
|
||||
<legend>Address Details</legend>
|
||||
@ -362,7 +410,51 @@ function onlyAlphabets(evt) {
|
||||
<input type="text" class="form-control " id="CollectrateAddress" value="<?php echo $CollectrateAddress;?>" name="CollectrateAddress" maxlength="500" >
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<legend>Certification Details</legend>
|
||||
<div class="col-md-12" style="padding:0px;">
|
||||
<div class="col-md-5" style="padding:0px;">
|
||||
<div class="col-md-6 "><span for="EMSNo">EMS Number</span>
|
||||
<input type="text" class="form-control " id="EMSNo" name="EMSNo" value="<?php echo $EMSNo;?>" maxlength="15" >
|
||||
</div>
|
||||
<div class="col-md-6"><span for="TSNo">TS Number</span>
|
||||
<input type="text" class="form-control " id="TSNo" name="TSNo" value="<?php echo $TSNo;?>" maxlength="10">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5" style="padding:0px;">
|
||||
<div class="col-md-6">
|
||||
<span for="IMSNo">IMS Number</span>
|
||||
<input type="text" class="form-control " id="IMSNo" name="IMSNo" value="<?php echo $IMSNo;?>"maxlength="10">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<span for="ISONo">ISO Number</span>
|
||||
<input type="text" class="form-control " id="ISONo" name="ISONo" value="<?php echo $ISONo;?>"maxlength="10">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<span for="OSHASNo">OSHAS Number</span>
|
||||
<input type="text" class="form-control " id="OSHASNo" name="OSHASNo" value="<?php echo $OSHASNo;?>" maxlength="15">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<legend>Bank Details</legend>
|
||||
<!-- Text input-->
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3"><span>Account Number</span>
|
||||
<input type="text" id="accno" maxlength="20" name="accno" value="<?php echo $accno;?>" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3"><span>IFSC Code</span>
|
||||
<input type="text" id="ifsc" name="ifsc" value="<?php echo $IFSCCode;?>" class="form-control" maxlength="12" >
|
||||
</div>
|
||||
<div class="col-md-3"><span>Bank Branch Name</span>
|
||||
<input type="text" id="branchname" name="branchname" value="<?php echo $branchname;?>" class="form-control" maxlength="200" >
|
||||
</div>
|
||||
<div class="col-md-3"><span>Bank Address</span>
|
||||
<input type="text" id="bankaddress" name="bankaddress" value="<?php echo $bankaddress;?>" class="form-control" maxlength="200" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Text input-->
|
||||
<legend>Payment Details</legend>
|
||||
@ -387,21 +479,7 @@ function onlyAlphabets(evt) {
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<span for="PayableAT">Payable AT</span>
|
||||
<input type="text" class="form-control required" value="<?php echo $PayableAT;?>" id="PayableAT" name="PayableAT">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3"><span>Payment Date</span><br/>
|
||||
<label class="radio-inline"><input type="radio" name="Payment" <?php echo $PaymentBefore; ?> value="Before">Before</label>
|
||||
<label class="radio-inline"><input type="radio" name="Payment" <?php echo $PaymentAfter; ?> value="After">After</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 col-md-offset-9">
|
||||
<div class="pull-right">
|
||||
<input type="reset" id="reset" class="btn btn-info" value="Reset" />
|
||||
@ -501,4 +579,4 @@ function Validate()
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user