diff --git a/application/controllers/employeedetails.php b/application/controllers/employeedetails.php
index da0299fd..b9cbdd28 100755
--- a/application/controllers/employeedetails.php
+++ b/application/controllers/employeedetails.php
@@ -172,12 +172,9 @@ class employeedetails extends BaseController
$this->form_validation->set_rules('emailid', 'emailid', 'trim|required|valid_email');
$this->form_validation->set_rules('comemailid', 'emailid', 'trim|required|valid_email');
$this->form_validation->set_rules('gender', 'gender', 'callback_Gender_validate');
- $this->form_validation->set_rules('MartialStatus', 'MartialStatus', 'callback_Martial_validate');
-
+ $this->form_validation->set_rules('MartialStatus', 'MartialStatus', 'callback_Martial_validate');
$this->form_validation->set_rules('bloodgroup', 'bloodgroup', 'callback_Blood_validate');
-
$this->form_validation->set_rules('emergencycontactnumber', 'emergencycontactnumber', 'trim|required|min_length[10]|max_length[10]');
-
$this->form_validation->set_rules('desigination', 'Desigination', 'callback_Des_validate');
$this->form_validation->set_rules('departmentname', 'departmentname', 'callback_Dep_validate');
$this->form_validation->set_rules('eduqualifaction', 'eduqualifaction', 'callback_select_validate');
@@ -216,7 +213,17 @@ class employeedetails extends BaseController
$desigination = $this->input->post('desigination');
$departmentCode = $this->input->post('departmentname');
$dateofjoining = $this->input->post('dateofjoining');
- $Previousexperience = $this->input->post('Previousexperience');
+ $pre_experience = $this->input->post('Previousexperience');
+
+ if($pre_experience == '')
+ {
+ $Previousexperience = null;
+ }
+ else
+ {
+ $Previousexperience = $pre_experience;
+ }
+
$eduqualifaction = $this->input->post('eduqualifaction');
$addqualification = $this->input->post('addqualification');
$referredby = $this->input->post('referredby');
@@ -320,12 +327,22 @@ echo "";
* This function is used to check whether the Employee is existing in the database or not */
function CheckEmail()
{
- $id = $this->input->post('id');
+ $id = $this->input->post('id');
$this->load->model('employeedetails_model');
$query = $this->employeedetails_model->checkMailExists($id );
-
- $query = $query[0]['EmailId'];
- print_r($query);
+ $query = $query[0]['EmailId'];
+ print_r($query);
+
+ }
+
+
+ function CheckAadhar()
+ {
+ $id = $this->input->post('id');
+ $this->load->model('employeedetails_model');
+ $query = $this->employeedetails_model->checkAadharExists($id );
+ $query = $query[0]['AadharNo'];
+ print_r($query);
}
@@ -394,6 +411,7 @@ echo "";
$DesignationConfigID = 'C010';
$BloodGroupConfigID = 'C011';
$this->load->model('employeedetails_model');
+ //print_r('hai');
$data['GenderList'] = $this->employeedetails_model->getConfigValue($GenderConfigID);
$data['MartialList'] = $this->employeedetails_model->getConfigValue($MartialConfigID);
$data['QualificationList'] = $this->employeedetails_model->getConfigValue($QualificationConfigID);
@@ -426,6 +444,23 @@ echo "";
return true;
}
}
+ // function checkAadharEmp()
+ // {
+ // $Empid = $this->input->post('employeeid');
+ // $AadharNo = $this->input->post('aadharno');
+
+ // $this->load->model('employeedetails_model');
+ // $query = $this->employeedetails_model->checkAadharExists($AadharNo,$Empid)
+ // if (count($query)> 0)
+ // {
+ // $this->form_validation->set_message('checkAadharEmp', 'The Entered Aadhar Number is exists in the Database.');
+ // return false;
+ // }
+ // else
+ // {
+ // return true;
+ // }
+ // }
/* To Update the employee details*/
function UpdateEmployee()
{
@@ -497,7 +532,17 @@ echo "";
$desigination = $this->input->post('desigination');
$departmentCode = $this->input->post('departmentname');
$dateofjoining = $this->input->post('dateofjoining');
- $Previousexperience = $this->input->post('Previousexperience');
+ //$Previousexperience = $this->input->post('Previousexperience');
+ $pre_experience = $this->input->post('Previousexperience');
+
+ if($pre_experience == '')
+ {
+ $Previousexperience = null;
+ }
+ else
+ {
+ $Previousexperience = $pre_experience;
+ }
$eduqualifaction = $this->input->post('eduqualifaction');
$addqualification = $this->input->post('addqualification');
$referredby = $this->input->post('referredby');
diff --git a/application/controllers/rawmaterialdetails.php b/application/controllers/rawmaterialdetails.php
index 625e7ed9..ba3bc941 100755
--- a/application/controllers/rawmaterialdetails.php
+++ b/application/controllers/rawmaterialdetails.php
@@ -128,19 +128,52 @@ class rawmaterialdetails extends BaseController
}
else
{
- $MaterialName = $this->input->post('MaterialName');
+ $MaterialName = $this->input->post('MaterialName');//print_r($MaterialName);
$MaterialType = $this->input->post('MaterialType');
$UOM = $this->input->post('UOM');
$MaterialCategory = $this->input->post('MaterialCategory');
$Remarks = $this->input->post('remarks');
- $AssetCode = $this->input->post('Assetcode');
- $CostCenterCode = $this->input->post('Costcenter');
+ $asset = $this->input->post('Assetcode');//print_r($AssetCode);
+ $costcentercode = $this->input->post('Costcenter');//print_r($CostCenterCode);
$ConversionFactor = $this->input->post('conversionfactor');
- $ConversionFactorUOM = $this->input->post('conversionfactorUOM');
- $HSNcode = $this->input->post('HSNcode');
+ $cfuom = $this->input->post('conversionfactorUOM');//print_r( $ConversionFactorUOM);
+ $HSN = $this->input->post('HSNcode');//print_r($HSNcode);
$CreatedBy = $this->session->userdata('userId');
$chked = $this->input->post('isactive');
+ if($asset == '0')
+ {
+ $AssetCode = null;
+ }
+ else
+ {
+ $AssetCode = $asset;
+ }
+ if($costcentercode == '0')
+ {
+ $CostCenterCode = null;
+ }
+ else
+ {
+ $CostCenterCode = $costcentercode;
+ }
+ if($cfuom == '0')
+ {
+ $ConversionFactorUOM = null;
+ }
+ else
+ {
+ $ConversionFactorUOM = $cfuom;
+ }
+ if($HSN == '')
+ {
+ $HSNcode = null;
+ }
+ else
+ {
+ $HSNcode = $HSN;
+ }
+
if( $chked != '')
{
@@ -152,6 +185,7 @@ class rawmaterialdetails extends BaseController
}
$RawMaterial = array('MaterialName'=>$MaterialName, 'MaterialType'=>$MaterialType, 'UOM'=>$UOM,'Category'=>$MaterialCategory, 'CreatedBy'=>$CreatedBy,'IsActive' => $IsActive,'assetcode'=>$AssetCode,'CostCenterCode'=>$CostCenterCode,'ConversionFactorUnit'=>$ConversionFactor,'ConversionFactorUOM'=>$ConversionFactorUOM,'Remarks'=>$Remarks,'HSNCODE'=>$HSNcode);
+ //print_r($RawMaterial);die();
$result = $this->rawmaterialdetails_model->addNewRawMaterial($RawMaterial);
if($result > 0)
@@ -232,13 +266,45 @@ class rawmaterialdetails extends BaseController
$UOM = $this->input->post('UOM');
$rmcode = $this->input->post('RMcode');
$Remarks = $this->input->post('remarks');
- $AssetCode = $this->input->post('Assetcode');
- $CostCenterCode = $this->input->post('Costcenter');
+ $asset = $this->input->post('Assetcode');
+ $costcentercode = $this->input->post('Costcenter');
$ConversionFactor = $this->input->post('conversionfactor');
- $ConversionFactorUOM = $this->input->post('conversionfactorUOM');
- $HSNcode = $this->input->post('HSNcode');
+ $cfuom = $this->input->post('conversionfactorUOM');
+ $HSN = $this->input->post('HSNcode');
$UpdatedBy = $this->session->userdata ('userId');
$chked = $this->input->post('isactive');
+ if($asset == '0')
+ {
+ $AssetCode = null;
+ }
+ else
+ {
+ $AssetCode = $asset;
+ }
+ if($costcentercode == '0')
+ {
+ $CostCenterCode = null;
+ }
+ else
+ {
+ $CostCenterCode = $costcentercode;
+ }
+ if($cfuom == '0')
+ {
+ $ConversionFactorUOM = null;
+ }
+ else
+ {
+ $ConversionFactorUOM = $cfuom;
+ }
+ if($HSN == '')
+ {
+ $HSNcode = null;
+ }
+ else
+ {
+ $HSNcode = $HSN;
+ }
if( $chked != '')
{
@@ -251,7 +317,7 @@ class rawmaterialdetails extends BaseController
$RawMaterial = array();
$RawMaterial = array('MaterialName'=>$MaterialName,'MaterialType'=>$MaterialType,'UpdatedBy'=>$UpdatedBy, 'UOM'=>$UOM,'IsActive' => $IsActive,'Category'=>$MaterialCategory,'ConversionFactorUnit'=>$ConversionFactor,'ConversionFactorUOM'=>$ConversionFactorUOM,'Remarks'=>$Remarks,'assetcode'=>$AssetCode,'CostCenterCode'=>$CostCenterCode,'HSNCODE'=>$HSNcode);//,'RMCode'=>$rmcode);
- //print_r($RawMaterial);//die();
+ print_r($RawMaterial);//die();
$result = $this->rawmaterialdetails_model->editRawmaterial($RawMaterial, $MaterialCode);
if($result == true)
diff --git a/application/controllers/supplier.php b/application/controllers/supplier.php
index 32f8d1d8..4ec8a5aa 100755
--- a/application/controllers/supplier.php
+++ b/application/controllers/supplier.php
@@ -53,7 +53,8 @@ class supplier extends BaseController
function addsupplier()
{
- $data['payment'] = $this->supplier_model->getpayment();
+ //$data['payment'] = $this->supplier_model->getpayment();
+ $data['payment'] = $this->supplier_model->getPaymentTerms();
//$data['users'] = $this->purchaseorder_model->getusers();
$this->global['pageTitle'] = 'siddharth : Add New Supplier';
@@ -199,9 +200,9 @@ class supplier extends BaseController
$GSTRange = $this->input->post('GSTRange');
$CollectrateAddress = $this->input->post('CollectrateAddress');
$UANumber = $this->input->post('UANumber');
- $PaymentTerms = $this->input->post('PaymentTerms');
- $Payment = $this->input->post('Payment');
- $PayableAT = $this->input->post('PayableAT');
+ $PaymentTerms = $this->input->post('paymentname');
+ //$Payment = $this->input->post('Payment');
+ //$PayableAT = $this->input->post('PayableAT');
$CSTNo = $this->input->post('CSTNo');
$CSTDt = $this->input->post('dateofCST');
@@ -224,16 +225,16 @@ class supplier extends BaseController
$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('maintanance');
+ $PaymentId = $this->input->post('paymentid');
- $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);
+ $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,'PaymentID'=>$PaymentId,'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); //,'PaymentDays'=>$Payment,'PayableAT'=>$PayableAT);
//print_r($supplier);die();
$result = $this->supplier_model->addNewsupplier($supplier);
@@ -271,7 +272,6 @@ class supplier extends BaseController
$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_checkPanValidateSupplier');
$this->form_validation->set_rules('GSTNo','GSTNo','trim|requried|max_length[15]|callback_checkGstValidateSupplier');
@@ -297,9 +297,8 @@ class supplier extends BaseController
$GSTRange = $this->input->post('GSTRange');
$CollectrateAddress = $this->input->post('CollectrateAddress');
$UANumber = $this->input->post('UANumber');
- $PaymentTerms = $this->input->post('PaymentTerms');
- $Payment = $this->input->post('Payment');
- //$PayableAT = $this->input->post('PayableAT');
+ $PaymentTerms = $this->input->post('paymentname');
+ //print_r($PaymentTerms);
$UpdatedBy = $this->session->userdata ( 'userId' );
$chked = $this->input->post('isactive');
@@ -336,11 +335,12 @@ class supplier extends BaseController
$service = $this->input->post('service');
$rawmaterial =$this->input->post('rawmaterial');
$maintanance = $this->input->post('maintanance');
+ $PaymentId = $this->input->post('paymentid');
$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);
+ $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,'PaymentID'=>$PaymentId,'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); //'PaymentDays'=>$Payment);
//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();
+ // print_r($supplier);die();
$result = $this->supplier_model->UpdateSupplier($supplier, $supplierID);
@@ -375,7 +375,8 @@ class supplier extends BaseController
$data['supplier'] = $this->supplier_model->getSupplierInfo($supplierID);
- $data['payment'] = $this->supplier_model->getpayment($Payment );
+ //$data['payment'] = $this->supplier_model->getpayment($Payment );
+ $data['payment'] = $this->supplier_model->getPaymentTerms($Payment);
$this->global['pageTitle'] = 'Siddharth : Edit Supplier';
$this->loadViews("editSupplier", $this->global,$data, NULL);
diff --git a/application/models/costcenter_model.php b/application/models/costcenter_model.php
index ebb5f2a8..ad685cc1 100755
--- a/application/models/costcenter_model.php
+++ b/application/models/costcenter_model.php
@@ -11,17 +11,18 @@ class costcenter_model extends CI_Model
* @return array $result : This is result
*/
function CostListing()
- {
- $this->db->select('Cost.CostCenterCode as code,Cost.CostCenterName as CostCenterName , Cost.ApprovedBy as ApprovedBy,Emp.FirstName as FirstName,Emp.Designation as Designation ');
- $this->db->from('T_CostCenter_Master as Cost');
- $this->db->join('T_Employee_Details as Emp', 'Emp.EmpID=Cost.ApprovedBy');
+ {
+ $this->db->select('Cost.CostCenterCode as code,Cost.CostCenterName as CostCenterName , Cost.ApprovedBy as ApprovedBy,Emp.FirstName as FirstName,Emp.Designation as Designation ,Cost.CreatedDate,Cost.IsActive');
+ $this->db->from('T_CostCenter_Master as Cost');
+ $this->db->join('T_Employee_Details as Emp', 'Emp.EmpID=Cost.ApprovedBy');
- $query = $this->db->get();
- $result = $query->result();
-
- return $result;
- }
+
+ $query = $this->db->get();
+ $result = $query->result();
+
+ return $result;
+ }
/**
* This function used to get user information by id
* @param number $userId : This is user id
diff --git a/application/models/employeedetails_model.php b/application/models/employeedetails_model.php
index 776b62bc..43fc60ec 100755
--- a/application/models/employeedetails_model.php
+++ b/application/models/employeedetails_model.php
@@ -135,6 +135,22 @@ function addNewemployee($Employee)
}
}
+ function checkAadharExists($AadharNo='',$Empid='')
+ {
+ $this->db->select('AadharNo');
+ $this->db->from('T_Employee_Details');
+ $this->db->where('AadharNo',$AadharNo);
+ if ($Empid != '')
+ {
+ $this->db->where('EmpID !=',$Empid);
+ }
+ $query = $this->db->get();
+ //print_r($this->db->last_query());
+ if ($query->num_rows > 0) {
+ return $query->result_array();
+ }
+ }
+
function checkPhotoExists($Pic)
{
$this->db->select('ProfilePic');
diff --git a/application/models/supplier_model.php b/application/models/supplier_model.php
index e7c8f41f..ee01924c 100755
--- a/application/models/supplier_model.php
+++ b/application/models/supplier_model.php
@@ -12,9 +12,10 @@ class supplier_model extends CI_Model
*/
function supplierListing()
{
- $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->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,BaseT.PaymentID');//,pmt.Details');
$this->db->from('T_SupplierDetailsN as BaseT');
-
+ //$this->db->join('T_PaymentTerms as pmt', 'pmt.PaymentID = BaseT.PaymentTerms','left');
+
$query = $this->db->get();
$result = $query->result();
@@ -41,8 +42,16 @@ class supplier_model extends CI_Model
return $query->result();
}
-
-
+
+ function getPaymentTerms($payment = '')
+ {
+ $this->db->select('*');
+ $this->db->from('T_PaymentTerms');
+ $query = $this->db->get();
+ $result = $query->result();
+ return $result;
+ }
+
function checkPAN($PAN,$SID = '')
{
$this->db->select('PAN');
@@ -106,7 +115,8 @@ function addNewsupplier($supplier)
function getSupplierInfo($supplierID='')
{
$this->db->select('*');
- $this->db->from('T_SupplierDetailsN');
+ $this->db->from('T_SupplierDetailsN');
+ //$this->db->join('T_PaymentTerms ')
$this->db->where('SupplierID', $supplierID);
$query = $this->db->get();
// print_r($this->db->last_query());
@@ -166,8 +176,5 @@ function addNewsupplier($supplier)
/*SUPPLIER */
/*SUPPLIER TYPE */
-
-
-
}
?>
\ No newline at end of file
diff --git a/application/views/addemployee.php b/application/views/addemployee.php
index 8e21f3a1..2ea036ee 100755
--- a/application/views/addemployee.php
+++ b/application/views/addemployee.php
@@ -162,21 +162,33 @@ function validatecomEmail() {
}
function ValidateAadhar(){
- var reg = /(?=.*[0-9]).{12}$/;
- var aadhar = $('aadharno').val();
- if(aadhar != '')
+ //alert('validation entered');
+ var reg = /^\d{12}$/
+ var aadhar = $('#aadharno').val();
+ var aadhar_count = $('#aadharno').val().length;
+
+ if(aadhar != '' && aadhar_count != '')
{
- if(reg.test()== false)
+ //alert('this is aadhar :'+aadhar);
+ if(aadhar_count < 12)
{
- alert('Please Enter Valid Aadhar Number');
- }
- else
- {
- return true;
+ //alert(aadhar1);
+ alert('Aadhar card should be in 12 digits');
}
+ else if(reg.test(aadhar)== false)
+ {
+ //alert('alskdjsakjf');
+ alert('Please Enter Valid Aadhar Number');
+ }
+ else
+ {
+ //alert('value inserted into database');
+ return true;
+ }
}
else
{
+ //alert('aadhar is blank');
alert('please Enter Aadhar number');
}
diff --git a/application/views/addsupplier.php b/application/views/addsupplier.php
index 5dbc40a1..99b4006d 100755
--- a/application/views/addsupplier.php
+++ b/application/views/addsupplier.php
@@ -18,12 +18,7 @@ function validateEmail() {
return true;
}
}
-}
-
-
-
-
-
+}
function blockKeyPress(evt)
{
@@ -212,6 +207,12 @@ $(function() {
});
});
+ $(document).ready(function(){
+ $("#PaymentTerms").select2();
+
+ });
+
+