materialmater,cost,employee and supplier changes code

This commit is contained in:
venbatechnologies@gmail.com 2017-07-26 17:47:20 +05:30
parent 9c6f5ca3af
commit 93ca8a5bcd
12 changed files with 306 additions and 109 deletions

View File

@ -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 "<script>alert('Record Not Saved!');</script>";
* 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 "<script>alert('Record Not Saved!');</script>";
$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 "<script>alert('Record Not Saved!');</script>";
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 "<script>alert('Record Not Saved!');</script>";
$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');

View File

@ -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)

View File

@ -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);

View File

@ -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

View File

@ -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');

View File

@ -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 */
}
?>

View File

@ -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');
}

View File

@ -18,12 +18,7 @@ function validateEmail() {
return true;
}
}
}
}
function blockKeyPress(evt)
{
@ -212,6 +207,12 @@ $(function() {
});
});
$(document).ready(function(){
$("#PaymentTerms").select2();
});
</script>
<style>
@ -408,19 +409,21 @@ $(function() {
<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">
<select class="form-control required select2" id="PaymentTerms" name="PaymentTerms" onchange="payment_hidden();" > <!-- onchange="storeVal(this,'hiddenVal');"> -->
<option value="Date of invoice" >Select Payment method</option>
<?php
if(!empty($payment))
{
foreach ($payment as $rl)
foreach ($payment as $pmt)
{
?>
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
<option value="<?php echo $pmt->PaymentID ?>"><?php echo $pmt->PaymentTerms ?></option>
<?php
}
}
?>
<input type="hidden" id="paymentid" name="paymentid" value="" >
<input type="hidden" id="paymentname" name="paymentname" value="">
</select>
</div>
</div>
@ -472,6 +475,16 @@ $(function() {
</div>
<script>
function payment_hidden()
{
var term = document.getElementById("PaymentTerms");
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())

View File

@ -20,32 +20,39 @@
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" >
<thead>
<tr>
<th>Cost Center ID</th>
<th>Cost Name</th>
<th>Description</th>
<th>Create Date</th>
<th>Action</th>
<th>Cost Center Code</th>
<th>Cost Center Name</th>
<th>Created By</th>
<th>Create Date</th>
<th>Active</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($userRecords))
{
foreach($userRecords as $record)
{
?>
<tr>
<td><?php echo $record->code ?></td>
<td><?php echo $record->CostCenterName ?></td>
<td><?php echo $record->ApprovedBy ?></td>
<?php
if(!empty($userRecords))
{
foreach($userRecords as $record)
{
?>
<tr>
<td><?php echo $record->code ?></td>
<td><?php echo $record->CostCenterName ?></td>
<!-- <td><?php echo $record->ApprovedBy ?></td> -->
<td><?php echo $record->FirstName ?></td>
<td align="right"><?php
$date = new DateTime($record->CreatedDate);
echo $date->format('d/m/Y'); ?></td>
<td><?php
$R='';
$record->IsActive == 1?$R='ACTIVE':$R='INACTIVE';
echo $R;
?></td>
<td>
<a href="<?php echo base_url().'CostCenter/editOldcost?CostCode='.$record->code; ?>"><i class="fa fa-pencil"></i>&nbsp;&nbsp;&nbsp;</a>
<a href="<?php echo base_url().'CostCenter/viewcost?CostCode='.$record->code; ?>"><i class="fa fa-eye"></i>&nbsp;&nbsp;&nbsp;</a>
<a href="<?php echo base_url().'CostCenter/viewcost?CostCode='.$record->code; ?>"><i class="fa fa-eye"></i>&nbsp;&nbsp;&nbsp;</a>
</td>
</tr>
<?php

View File

@ -217,7 +217,7 @@ function changeTextBox() {
<div class="col-md-3">
<div class="form-group">
<label for="assetcode">Asset Code</label>
<select class="form-control select2" id="Assetcode" name="Assetcode" disabled="disabled">
<select class="form-control select2" id="Assetcode" name="Assetcode" disabled="disabled" placeholder="Select ">
<option value="<?php echo $Assetcode;?>"><?php echo $Assetcode;?></option>
<?php
if(!empty($assetcode))

View File

@ -13,8 +13,8 @@ $GSTRange = '';
$CollectrateAddress = '';
$UANumber = '';
$PaymentTerms = '';
$PaymentDays = '';
$PayableAT = '';
//$PaymentDays = '';
//$PayableAT = '';
$IsActive = '';
$CSTNO = '';
$CSTDate = '';
@ -30,6 +30,7 @@ $bankaddress = '';
$IsService = '';
$IsMaintanance = '';
$IsRawMaterial = '';
$PaymentId = '';
if(!empty($supplier))
{
@ -111,14 +112,18 @@ if(!empty($supplier))
$IFSCCode = $uf->IFSCCode;
$branchname = $uf->BranchName;
$bankaddress = $uf->BankAddress;
$PaymentId = $uf->PaymentID;
}
}
?>
<script>
$(document).ready(function(){
$("#PaymentTerms").select2();
});
function blockKeyPress(evt)
@ -350,6 +355,7 @@ function onlyAlphabets(evt) {
<!-- Form Name -->
<legend>Supplier Information</legend>
<div class="col-md-12">
<div class="col-md-2 pad">
<span for="SupplierID">Supplier ID</span>
<input type="text" name="SupplierID" id="SupplierID" class="form-control" readonly value="<?php echo $SupplierID;?>">
@ -374,6 +380,7 @@ function onlyAlphabets(evt) {
<span for="EmailAddress">Email ID</span><span class="badge">*</span>
<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>
<div class="col-md-12">
<div class="col-md-6"><span for="CollectrateAddress">Supplier Type :</span><span class="badge">*</span>
@ -388,15 +395,18 @@ function onlyAlphabets(evt) {
<legend>Address Details</legend>
<!-- Text input-->
<div class="col-md-12"><span for="Address2">Address</span><span class="badge">*</span>
<div class="col-md-12" >
<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 value="<?php echo $Address;?>">
</div>
</div>
<legend>Tax Related Data</legend>
<!-- Text input-->
<div class="col-md-12">
<div class="col-md-3 pad">
<span for="PAN">PAN</span> <span class="badge">*</span>
@ -415,6 +425,9 @@ function onlyAlphabets(evt) {
<span for="Exciseregistration">Excise Registration</span>
<input type="text" class="form-control required" onchange="validateECCNumber();" id="Exciseregistration" name="Exciseregistration" minlength="15" maxlength="15" value="<?php echo $Exiseregistration;?>" style="text-transform:uppercase;" title="Please enter PAN Number and EM/ED option and 3 digit Numbers format" pattern="(?=.*[A-Z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Z]).{1,}(?=.*[A-Z]).{2,}(?=.*[0-9]).{3,}">
</div>
</div>
<div class="col-md-12">
<div class="col-md-3 pad">
<span for="GSTNo">CST Number</span>
<input type="text" class="form-control " value="<?php echo $CSTNO;?>" id="CSTNo" name="CSTNo" maxlength="15">
@ -431,15 +444,18 @@ function onlyAlphabets(evt) {
<span for="Range">GST Range</span><span class="badge">*</span>
<input type="text" class="form-control " id="GSTRange" requried value="<?php echo $GSTRange;?>" name="GSTRange" maxlength="10">
</div>
<!-- Text input-->
</div>
<div class="col-md-12">
<div class="col-md-6 pad"><span for="CollectrateAddress">Collectrate Address</span>
<input type="text" class="form-control " id="CollectrateAddress" value="<?php echo $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-12">
<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" >
@ -468,9 +484,9 @@ function onlyAlphabets(evt) {
<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">
<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" >
@ -481,31 +497,35 @@ function onlyAlphabets(evt) {
<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>
<!-- 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">
<select class="form-control required select2" id="PaymentTerms" name="PaymentTerms" onchange="payment_hidden();"><!-- placeholder="Select ">-->
<option value="<?php echo $PaymentTerms;?>" ><?php echo $PaymentTerms;?></option>
<?php
if(!empty($payment))
{
foreach ($payment as $rl)
foreach ($payment as $pm)
{
?>
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
<option value="<?php echo $pm->PaymentID ?>"><?php echo $pm->PaymentTerms ?></option>
<?php
}
}
?>
<input type="hidden" id="paymentid" name="paymentid" value="<?php echo $PaymentTerms;?>" >
<input type="hidden" id="paymentname" name="paymentname" value="<?php echo $PaymentId;?>">
</select>
</div>
</div>
</div>
</div>
<div class="box-footer" style="text-align:right">
<input type="submit" onclick="validate();" value="Submit" class="btn btn-primary">
@ -553,6 +573,17 @@ function onlyAlphabets(evt) {
</div>
<script>
function payment_hidden()
{
var term = document.getElementById("PaymentTerms");
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())

View File

@ -22,7 +22,7 @@
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:12px;" >
<thead>
<tr>
<th >Supplier ID</th>
<th>Supplier ID</th>
<th>Supplier Name</th>
<th>Address</th>
<th>Contact Number</th>
@ -48,14 +48,12 @@
<td><?php echo $record->SupplierName ?></td>
<td><?php echo $record->Address ?></td>
<td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->EmailAddress ?></td>
<td><?php echo $record->Exiseregistration ?></td>
<td><?php echo $record->TIN ?></td>
<td><?php echo $record->PAN ?></td>
<td><?php echo $record->GSTNO ?></td>
<td><?php echo $record->GSTRange ?></td>
<td><?php echo $record->UANumber ?></td>
<td><?php echo $record->PaymentTerms ?></td>