export xl for cost center and date format for employee,supplier and asset screen

This commit is contained in:
venbatechnologies@gmail.com 2017-08-19 10:25:02 +05:30
parent b78adf1e67
commit 3bebd53661
14 changed files with 119 additions and 113 deletions

View File

@ -453,10 +453,6 @@ class CostCenter extends BaseController
);
$this->excel->getActiveSheet()->setTitle('Cost Master');
$this->excel->getActiveSheet()->setCellValue('G3', 'SIDDHARTH INDUSTRIES Cost Master');
@ -468,14 +464,13 @@ class CostCenter extends BaseController
$this->excel->getActiveSheet()->setCellValue('G5', 'IMPORT');
$this->excel->getActiveSheet()->setCellValue('H5', 'SERVICE');
$this->excel->getActiveSheet()->setCellValue('I5', 'BudgetYear');
$this->excel->getActiveSheet()->setCellValue('J5', 'DEPName');
$this->excel->getActiveSheet()->setCellValue('K5', 'IsActive');
$this->excel->getActiveSheet()->setCellValue('L5', 'Remarks');
$this->excel->getActiveSheet()->setCellValue('M5', 'CreatedBy');
$this->excel->getActiveSheet()->setCellValue('N5', 'UpdatedBy');
$this->excel->getActiveSheet()->setCellValue('O5', 'IsApproved');
$this->excel->getActiveSheet()->setCellValue('P5', 'ApprovedBy');
$this->excel->getActiveSheet()->setCellValue('J5', 'DepartmentName');
//$this->excel->getActiveSheet()->setCellValue('K5', 'IsActive');
$this->excel->getActiveSheet()->setCellValue('K5', 'Remarks');
$this->excel->getActiveSheet()->setCellValue('L5', 'CreatedBy');
$this->excel->getActiveSheet()->setCellValue('M5', 'UpdatedBy');
$this->excel->getActiveSheet()->setCellValue('N5', 'IsApproved');
$this->excel->getActiveSheet()->setCellValue('O5', 'ApprovedBy');
@ -510,16 +505,16 @@ class CostCenter extends BaseController
$this->excel->getActiveSheet()->getStyle('N5')->getFont()->setBold(true);
$this->excel->getActiveSheet()->getStyle('O5')->getFont()->setSize(12);
$this->excel->getActiveSheet()->getStyle('O5')->getFont()->setBold(true);
$this->excel->getActiveSheet()->getStyle('P5')->getFont()->setSize(12);
$this->excel->getActiveSheet()->getStyle('P5')->getFont()->setBold(true);
$this->excel->getActiveSheet()->getStyle('Q5')->getFont()->setSize(12);
$this->excel->getActiveSheet()->getStyle('Q5')->getFont()->setBold(true);
// $this->excel->getActiveSheet()->getStyle('P5')->getFont()->setSize(12);
// $this->excel->getActiveSheet()->getStyle('P5')->getFont()->setBold(true);
// $this->excel->getActiveSheet()->getStyle('Q5')->getFont()->setSize(12);
// $this->excel->getActiveSheet()->getStyle('Q5')->getFont()->setBold(true);
$exportData = $this->costcenter_model->export_excel();
// print_r($exportData);die();
if ($exportData) {
$i = 6;
$s = 1;
@ -535,13 +530,12 @@ class CostCenter extends BaseController
$this->excel->getActiveSheet()->setCellValue('H'. $i,$data['service']);
$this->excel->getActiveSheet()->setCellValue('I'. $i,$data['BudgetYear']);
$this->excel->getActiveSheet()->setCellValue('J'. $i,$data['DepartmentName']);
$this->excel->getActiveSheet()->setCellValue('K'. $i,$data['IsActive']);
$this->excel->getActiveSheet()->setCellValue('L'. $i,$data['Remarks']);
$this->excel->getActiveSheet()->setCellValue('M'. $i,$data['firstname']);
$this->excel->getActiveSheet()->setCellValue('N'. $i,$data['Updated_By']);
$this->excel->getActiveSheet()->setCellValue('O'. $i,$data['IsApproved']);
$this->excel->getActiveSheet()->setCellValue('P'. $i,$data['firstname']);
//$this->excel->getActiveSheet()->setCellValue('K'. $i,$data['IsActive']);
$this->excel->getActiveSheet()->setCellValue('K'. $i,$data['Remarks']);
$this->excel->getActiveSheet()->setCellValue('L'. $i,$data['firstname']);
$this->excel->getActiveSheet()->setCellValue('M'. $i,$data['Updated_By']);
$this->excel->getActiveSheet()->setCellValue('N'. $i,$data['IsApproved']);
$this->excel->getActiveSheet()->setCellValue('O'. $i,$data['firstname']);

View File

@ -68,7 +68,7 @@ class assetdetails extends BaseController
$PO= $this->input->post('PONO');
$data = $this->assetdetails_model->getpodetails($PO);
//print_r($data);
//print_r($data);die();
$HTML = "<option value='0'>SelectMaterialCode</option>";
if(count($data) > 0)
@ -212,11 +212,18 @@ class assetdetails extends BaseController
$SupplierName = $this->input->post('SupplierName');
$DateOfCommission = $this->input->post('DateOfCommission');
$CreatedBy = $this->session->userdata('userId');
$DateOfPurchase = $this->input->post('DateOfPurchase');
echo $DateOfPurchase;
echo $DateOfCommission;
if($DateOfPurchase != '')
{
$DOpurchase = $this->getDateformat($DateOfPurchase);
}
$AssetValue = $this->input->post('Assetvalue');
if($DateOfCommission != '')
{
$DOCommission= $this->dateformat($DateOfCommission);
$DOCommission= $this->getDateformat($DateOfCommission);
//$DOCommission= $this->getDateformat($DateOfCommission);
}
$AssetStatus = $this->input->post('AssetStatus');
@ -242,10 +249,9 @@ class assetdetails extends BaseController
$asset = array();
$asset = array('AssetName'=>$AssetName, 'Description'=>$Description,'DEPCode'=>$Department,'Location'=>$Location,'UserName'=>$User,'SupplierCode'=>$SupplierName,'DateOfCommison'=>$DOCommission,'AssetValue'=>$AssetValue,'AssetStatus'=>$AssetStatus,'IsActive'=>$IsActive,'Remarks'=>$Remarks,'CreatedBy'=>$CreatedBy,'PONO'=>$PONO,'POLineItem'=>$lineitem,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity);
//print_r($asset);die();
$result = $this->assetdetails_model->addNewasset($asset);
// print_r($result);die();
$asset = array('AssetName'=>$AssetName, 'Description'=>$Description,'DEPCode'=>$Department,'Location'=>$Location,'UserName'=>$User,'SupplierCode'=>$SupplierName,'DateOfPurchase'=>$DOpurchase,'DateOfCommison'=>$DOCommission,'AssetValue'=>$AssetValue,'AssetStatus'=>$AssetStatus,'IsActive'=>$IsActive,'Remarks'=>$Remarks,'CreatedBy'=>$CreatedBy,'PONO'=>$PONO,'POLineItem'=>$lineitem,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity);
print_r($asset);die(); $result = $this->assetdetails_model->addNewasset($asset);
//
if($result > 0)
{
// $this->session->set_flashdata('success', 'New Asset created successfully');
@ -377,9 +383,9 @@ class assetdetails extends BaseController
$asset = array('AssetName'=>$AssetName, 'Description'=>$Description,'DEPCode'=>$Department,'Location'=>$Location,'UserName'=>$User,'SupplierCode'=>$SupplierName,'DateOfPurchase'=>$DOpurchase,'DateOfCommison'=>$DOCommission,'AssetValue'=>$Assetvalue,'AssetStatus'=>$AssetStatus,'IsActive'=>$IsActive,'Remarks'=>$Remarks,'UpdatedBy'=>$UpdatedBy,'PONO'=>$PONO,'POLineItem'=>$lineitem,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity);
print_r($asset);die();
$result = $this->assetdetails_model->editasset($asset, $Asset_Code);
if($result == true)
{
redirect('assetListing','refresh');

View File

@ -55,7 +55,7 @@ class employeedetails extends BaseController
/*
Validation for Gender status Dropdown
*/
function Gender_validate($selectValue)
function Gender_validate($selectValue)
{
//echo 'select_validate method called';
// 'none' is the first option and the text says something like "-Choose one-"
@ -236,7 +236,7 @@ class employeedetails extends BaseController
{
//echo 'Validate not method called';
$Picture = $this->add();
$Profile = $this->input->post('photo');
$FirstName = $this->input->post('FirstName');
$LastName = $this->input->post('LastName');
$FatherName = $this->input->post('FatherName');
@ -278,7 +278,7 @@ class employeedetails extends BaseController
$passportno = $this->input->post('passportno');
$ValidTill = $this->input->post('ValidTill');
$addinfo = $this->input->post('addinfo');
$IsActive = '1';
$IsActive = '1';
$driverlicense = $this->input->post ( 'driverlicense' );
$licenseExpiryDate = $this->input->post ( 'licenseExpiryDate' );
$VoterID = $this->input->post ( 'voterID' );
@ -286,18 +286,21 @@ class employeedetails extends BaseController
if($licenseExpiryDate != '')
{
$License_ExpiryDate = $this->dateformat($licenseExpiryDate);
//$License_ExpiryDate = $this->dateformat($licenseExpiryDate);
$License_ExpiryDate = $this->getDateformat($licenseExpiryDate);
}
else
{
$License_ExpiryDate = null;
}
$DOB = $this->dateformat($DateofBirth);
$DOJ = $this->dateformat($dateofjoining);
$DOB = $this->getDateformat($DateofBirth);
$DOJ = $this->getDateformat($dateofjoining);
if($ValidTill != '')
{
$Valid = $this->dateformat($ValidTill);
$Valid = $this->getDateformat($ValidTill);
}
else
{
@ -305,9 +308,21 @@ class employeedetails extends BaseController
}
//echo $DOB;
$Employee = array('FirstName'=>$FirstName, 'LastName'=>$LastName,'FatherName'=>$FatherName,'Gender'=>$Gender,'DateofBirth'=>$DOB,'ContactNumber'=>$ContactNumber,'EmailId'=>$EmailId,'BloodGroup'=>$BloodGroup,'MartialStatus'=>$MartialStatus,'DateofJoining'=>$DOJ,'PreviousYearsOfExp'=>$Previousexperience,'Designation'=>$desigination,'Departmentcode'=>$departmentCode,'PresentAddress'=>$CurrentAddress,'PermanentAddress'=>$permanentaddress,'EmergencyContactName'=>$emergencycontactname,'EmergencyContactNumber'=>$emergencycontactnumber,'Edu_Qualification'=>$eduqualifaction,'Additional_Qualification'=>$addqualification,'AadharNo'=>$aadharno,'PANNo'=>$panno,'BankAccountNo'=>$accountno,'IFSCCode'=>$ifsccode,'BankBranchName'=>$bankbranchname,'BankAddress'=>$bankaddress,'PassportNo'=>$passportno,'Passport_Valid_till'=>$Valid,'IsActive'=>$IsActive,'ProfilePic'=>$Picture,'Reference_Name'=>$referredby,'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'CreatedBy'=>$createdby,'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,'LicenseValidtill'=>$License_ExpiryDate,'VoterID'=>$VoterID);
//print_r($Employee);die();
$this->load->model('employeedetails_model');
$Employee = array('FirstName'=>$FirstName, 'LastName'=>$LastName,'FatherName'=>$FatherName,
'Gender'=>$Gender,'DateofBirth'=>$DOB,'ContactNumber'=>$ContactNumber,'EmailId'=>$EmailId,
'BloodGroup'=>$BloodGroup,'MartialStatus'=>$MartialStatus,'DateofJoining'=>$DOJ,
'PreviousYearsOfExp'=>$Previousexperience,'Designation'=>$desigination,
'Departmentcode'=>$departmentCode,'PresentAddress'=>$CurrentAddress,
'PermanentAddress'=>$permanentaddress,'EmergencyContactName'=>$emergencycontactname,
'EmergencyContactNumber'=>$emergencycontactnumber,'Edu_Qualification'=>$eduqualifaction,
'Additional_Qualification'=>$addqualification,'AadharNo'=>$aadharno,'PANNo'=>$panno,
'BankAccountNo'=>$accountno,'IFSCCode'=>$ifsccode,'BankBranchName'=>$bankbranchname,
'BankAddress'=>$bankaddress,'PassportNo'=>$passportno,'Passport_Valid_till'=>$Valid,
'IsActive'=>$IsActive,'ProfilePic'=>$Profile,'Reference_Name'=>$referredby,
'Reference_ContactNumber'=>$referrercontno,'Remarks'=>$addinfo,'CreatedBy'=>$createdby,
'personalEmailId'=>$comEmailId,'DriverLicense'=>$driverlicense,
'LicenseValidtill'=>$License_ExpiryDate,'VoterID'=>$VoterID);
$this->load->model('employeedetails_model');
$result = $this->employeedetails_model->addNewemployee($Employee);
if($result > 0)
@ -339,7 +354,7 @@ echo "<script>alert('Record Not Saved!');</script>";
//this function used to dateformat to store in db
function dateformat($DateValue)
{
$date = DateTime::createFromFormat('d/m/Y', $DateValue);//we should give the date as per DatePicker format.
$date = DateTime::createFromFormat('d-m-Y', $DateValue);//we should give the date as per DatePicker format.
//if the date picker format is mismatched means it display as invalid date so that we can use this "IF" Conditions (i.e) If the above format returns false then the date is not formatted correctly
if ($date === false) {
@ -461,23 +476,20 @@ echo "<script>alert('Record Not Saved!');</script>";
$this->loadViews("404", $this->global, NULL, NULL);
}
function add(){
$picture = '';
//Check whether user upload picture
function add()
{
$picture = '';
if(!empty($_FILES['photo']['name']))
{
$config['upload_path'] = 'uploads/images/';
$config['upload_path'] = 'uploads/images/';
$config['allowed_types'] = 'jpg|jpeg|png|gif';
$config['file_name'] = $_FILES['photo']['name'];
//Load upload library and initialize configuration
$this->load->library('upload',$config);
$this->upload->initialize($config);
if($this->upload->do_upload('photo'))
{
$uploadData = $this->upload->data();
@ -555,7 +567,7 @@ echo "<script>alert('Record Not Saved!');</script>";
}
/* To Update the employee details*/
function UpdateEmployee()
function UpdateEmployee()
{
if($this->isAdmin() == TRUE)
{

19
application/controllers/supplier.php Executable file → Normal file
View File

@ -207,12 +207,8 @@ class supplier extends BaseController
$GSTRange = $this->input->post('GSTRange');
$CollectrateAddress = $this->input->post('CollectrateAddress');
$UANumber = $this->input->post('UANumber');
//$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');
$CSTNo = $this->input->post('CSTNo');
$CSTDt = $this->input->post('dateofCST');
if($CSTDt != '' ){
if($CSTDt == '30/11/-0001'){
@ -220,8 +216,8 @@ class supplier extends BaseController
}
else{
$CSTDate = $this->dateformat($CSTDt);
//$CSTDate = $this->getDateformat($CSTDt);
//$CSTDate = $this->dateformat($CSTDt);
$CSTDate = $this->getDateformat($CSTDt);
}
}
else{
@ -247,6 +243,7 @@ class supplier extends BaseController
$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,'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); //,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$Payment,'PayableAT'=>$PayableAT);
$result = $this->supplier_model->addNewsupplier($supplier);
@ -352,8 +349,8 @@ class supplier extends BaseController
$CSTDt = $this->input->post('dateofCST');
if($CSTDt != '')
{$CSTDate = $this->dateformat($CSTDt);
//$CSTDate = $this->getDateformat($CSTDt);
{//$CSTDate = $this->dateformat($CSTDt);
$CSTDate = $this->getDateformat($CSTDt);
}
else
{
@ -377,7 +374,7 @@ class supplier extends BaseController
$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,'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); //'PaymentTerms'=>$PaymentTerms,'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);
$result = $this->supplier_model->UpdateSupplier($supplier, $supplierID);

0
application/models/assetdetails_model.php Executable file → Normal file
View File

View File

@ -336,23 +336,24 @@ function addNewcost($Cost)
}
function export_excel(){
$this->db->select('Mas.*,bud.*,part.DepartmentName,emp.firstname,emp1.firstname as Updated_By');
$where = null;
$this->db->select('Mas.*,bud.*,emp.firstname,emp1.firstname as Updated_By');//count(dep.DEPCode) AS ctvalue');
$this->db->select('sum(if(budgettype="CAPITAL",budgetamount,0)) as capital',FALSE);
$this->db->select('sum(if(budgettype="REVENUE",budgetamount,0)) as revenue',FALSE);
$this->db->select('sum(if(budgettype="SERVICE",budgetamount,0)) as service',FALSE);
$this->db->select('sum(if(budgettype="IMPORT",budgetamount,0)) as import',FALSE);
$this->db->join('T_CostCenter_Budget as Mas',' Mas.CostCenterCode=bud.CostCenterCode','left');
$this->db->select('GROUP_CONCAT(distinct part.DepartmentName) as DepartmentName');
//$this->db->select('GROUP_CONCAT(DISTINCT part.DepartmentName SEPARATOR "/" ');
$this->db->join('T_CostCenter_Budget as Mas','Mas.CostCenterCode=bud.CostCenterCode','left');
$this->db->join('T_CostCenter_Departments as dep',' dep.CostCenterCode=Mas.CostCenterCode','left');
$this->db->join('T_DepartmentDetails as part','part.DEPCode=dep.DEPCode','left');
$this->db->group_by('bud.CostCenterCode');
$this->db->group_by(array('bud.CostCenterCode','Mas.BudgetYear'));
$this->db->join('tbl_users as tbl',' bud.createdby = tbl.userid','left');
$this->db->join('T_Employee_Details as emp', 'emp.empid=tbl.empid','left');
$this->db->join('tbl_users as tbl1',' bud.UpdatedBy = tbl1.userid','left');
$this->db->join('T_Employee_Details as emp1', 'emp1.empid=tbl1.empid','left');
$this->db->where('Mas.BudgetYear !=""');
return $this->db->get('T_CostCenter_Master as bud')->result_array();
}

View File

@ -16,11 +16,8 @@ class employeedetails_model extends CI_Model
{
$this->db->select(' Emp.*,Dep.DepartmentName as DepartmentName');
$this->db->from('T_Employee_Details Emp');
$this->db->join('T_DepartmentDetails Dep', 'Emp.Departmentcode = Dep.DEPCode','left');
$this->db->join('T_DepartmentDetails Dep', 'Emp.Departmentcode = Dep.DEPCode','left');
$this->db->order_by("Emp.EmpID", "asc");
$query = $this->db->get();

View File

@ -17,7 +17,7 @@ $(function() {
$("#DateOfCommission").datepicker({
minDate : new Date(year-SIAStartYear,1,1),
maxDate :'now',
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,
@ -25,7 +25,7 @@ $(function() {
$("#DateOfPurchase").datepicker({
minDate : new Date(year-SIAStartYear,1,1),
maxDate :'now',
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,
@ -413,7 +413,7 @@ $(function() {
if(item.DeliveryDate != null )
{
var date = new Date(item.DeliveryDate);
var date1 = (date.getDate()+ '/' + (date.getMonth() + 1)+ '/' + date.getFullYear());
var date1 = (date.getDate()+ '-' + (date.getMonth() + 1)+ '-' + date.getFullYear());
if(item.DeliveryDate == '0000-00-00' || item.DeliveryDate == '30-11--0001')
{
@ -446,7 +446,7 @@ $(function() {
$('#Assetvalue').val(item.TotalValue);
var date = new Date(item.PODate);
var date3 = (date.getDate()+ '/' + (date.getMonth() + 1)+ '/' + date.getFullYear());
var date3 = (date.getDate()+ '-' + (date.getMonth() + 1)+ '-' + date.getFullYear());
$("#DateOfPurchase").val(date3);
}

View File

@ -255,11 +255,11 @@ function getAge() {
mm='0'+mm;
}
var today = dd+'/'+mm+'/'+yyyy;
var today = dd+'-'+mm+'-'+yyyy;
var ageyear = yyyy - dateString.split("/")[2];
var agemonth = mm - dateString.split("/")[1];
var agedate = dateString.split("/")[0];
var ageyear = yyyy - dateString.split("-")[2];
var agemonth = mm - dateString.split("-")[1];
var agedate = dateString.split("-")[0];
if (agemonth < 0 || (agemonth == 0 && dd < agedate )) {
ageyear--;
@ -283,22 +283,22 @@ $(function() {
$("#DateofBirth").datepicker({
minDate : new Date(mindt,1,1),
maxDate : new Date(maxdt,1,1),
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
});
$("#dateofjoining").datepicker({
minDate : new Date(year-SIAStartYear,1,1),
maxDate :'now',
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,
});
$("#ValidTill").datepicker({dateFormat: 'dd/mm/yy',minDate :'now',changeMonth: true, changeYear: true,yearRange: '-0:+100'
$("#ValidTill").datepicker({dateFormat: 'dd-mm-yy',minDate :'now',changeMonth: true, changeYear: true,yearRange: '-0:+100'
});
$("#LicenseExpiryDate").datepicker({
dateFormat: 'dd/mm/yy',
dateFormat: 'dd-mm-yy',
minDate :'now',
changeMonth: true,
changeYear: true,

View File

@ -255,7 +255,7 @@ $(function() {
$("#dateofCST").datepicker({
minDate : new Date(mindt,1,1),
maxDate : 'now',
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
});

View File

@ -42,7 +42,7 @@
<td><?php echo $record->FirstName ?></td>
<td align="right"><?php
$date = new DateTime($record->CreatedDate);
echo $date->format('d/m/Y'); ?></td>
echo $date->format('d-m-Y'); ?></td>
<td><?php
$R='';

View File

@ -55,14 +55,14 @@ if(!empty($EmpDetails))
$from = new DateTime($DateofBirth);
$to = new DateTime('today');
$Age = $from->diff($to)->y;
$DOB = $from ->format('d/m/Y');
$DOB = $from ->format('d-m-Y');
$ContactNumber = $Emp->ContactNumber;
$EmailId = $Emp->EmailId;
$BloodGroup = $Emp->BloodGroup;
$MartialStatus =$Emp->MartialStatus;
$DateofJoining = $Emp->DateofJoining;
$dtDOJ = new DateTime($DateofJoining);
$DOJ = $dtDOJ ->format('d/m/Y');
$DOJ = $dtDOJ ->format('d-m-Y');
$PreviousYearsOfExp = $Emp->PreviousYearsOfExp;
$Designation = $Emp->Designation;
$Departmentcode = $Emp->Departmentcode;
@ -84,7 +84,7 @@ if(!empty($EmpDetails))
if($Passport_Valid_till != '' && $Passport_Valid_till != '0000-00-00 00:00:00')
{
$dtpassport = new DateTime($Passport_Valid_till);
$DOPassport = $dtpassport ->format('d/m/Y');
$DOPassport = $dtpassport ->format('d-m-Y');
}
else {
@ -103,7 +103,7 @@ if(!empty($EmpDetails))
if($Emp->LicenseValidtill != '' && $Emp->LicenseValidtill != '0000-00-00 00:00:00')
{
$License = new DateTime($Emp->LicenseValidtill);
$LicenseValidtill = $License ->format('d/m/Y');
$LicenseValidtill = $License ->format('d-m-Y');
}
else
{
@ -452,11 +452,11 @@ function getAge() {
mm='0'+mm;
}
var today = dd+'/'+mm+'/'+yyyy;
var today = dd+'-'+mm+'-'+yyyy;
var ageyear = yyyy - dateString.split("/")[2];
var agemonth = mm - dateString.split("/")[1];
var agedate = dateString.split("/")[0];
var ageyear = yyyy - dateString.split("-")[2];
var agemonth = mm - dateString.split("-")[1];
var agedate = dateString.split("-")[0];
if (agemonth < 0 || (agemonth == 0 && dd < agedate )) {
ageyear--;
@ -480,20 +480,20 @@ $(function() {
$("#DateofBirth").datepicker({
minDate : new Date(mindt,1,1),
maxDate : new Date(maxdt,1,1),
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
});
$("#dateofjoining").datepicker({
minDate : new Date(year-SIAStartYear,1,1),
maxDate :'now',
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,
});
$("#ValidTill").datepicker({dateFormat: 'dd/mm/yy',minDate :'now',changeMonth: true, changeYear: true,yearRange: '-0:+100'
$("#ValidTill").datepicker({dateFormat: 'dd-mm-yy',minDate :'now',changeMonth: true, changeYear: true,yearRange: '-0:+100'
});
$("#LicenseExpiryDate").datepicker({dateFormat: 'dd/mm/yy',minDate :'now',changeMonth: true, changeYear: true,yearRange: '-0:+100'
$("#LicenseExpiryDate").datepicker({dateFormat: 'dd-mm-yy',minDate :'now',changeMonth: true, changeYear: true,yearRange: '-0:+100'
});
});

View File

@ -41,7 +41,7 @@ if(!empty($assetList))
$DateOfPurchase = $Asset->DateOfPurchase;//print_r($Asset->DateOfPurchase);
if($DateOfPurchase != '' && $DateOfPurchase != '0000-00-00 00:00:00' ) {
$PODate = new DateTime($DateOfPurchase);
$DateOfPurchase = $PODate->format('d/m/Y');
$DateOfPurchase = $PODate->format('d-m-Y');
}
else {
$DateOfPurchase = '';
@ -49,7 +49,7 @@ if(!empty($assetList))
$DateOfCommison = $Asset->DateOfCommison;
if($DateOfCommison != '' && $DateOfCommison != '0000-00-00 00:00:00' ) {
$DateOfCommission= new DateTime($Asset->DateOfCommison, new DateTimeZone('Asia/Kolkata'));
$DateOfCommison = $DateOfCommission->format('d/m/Y');
$DateOfCommison = $DateOfCommission->format('d-m-Y');
}
else {
$DateOfCommison = '';
@ -65,10 +65,9 @@ if(!empty($assetList))
$MaterialName = $Asset->MaterialName;
$UOM = $Asset->UOM;
$DDt = $Asset->DeliveryDate;
if($DDate != '' && $DDate != '0000-00-00 00:00:00'){
if($DDt != '' && $DDt != '0000-00-00 00:00:00'){
$DDate = new DateTime($DDt, new DateTimeZone('Asia/Kolkata'));
$DeliveryDate = $DDate->format('d/m/Y');
$DeliveryDate = $DDate->format('d-m-Y');
}
else
{
@ -121,7 +120,7 @@ $(function() {
$("#DateOfCommission").datepicker({
minDate : new Date(year-SIAStartYear,1,1),
maxDate :'now',
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,
@ -129,7 +128,7 @@ $(function() {
$("#DateOfPurchase").datepicker({
minDate : new Date(year-SIAStartYear,1,1),
maxDate :'now',
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,
@ -504,7 +503,7 @@ $(function() {
if(item.DeliveryDate != null )
{
var date = new Date(item.DeliveryDate);
var date1 = (date.getDate()+ '/' + (date.getMonth() + 1)+ '/' + date.getFullYear());
var date1 = (date.getDate()+ '-' + (date.getMonth() + 1)+ '-' + date.getFullYear());
if(item.DeliveryDate == '0000-00-00' || item.DeliveryDate == '30-11--0001')
{
@ -542,7 +541,7 @@ $(function() {
// var date1 = (date.getDate()+ '/' + (date.getMonth() + 1)+ '/' + date.getFullYear());
var date = new Date(item.PODate);
var date3 = (date.getDate()+ '/' + (date.getMonth() + 1)+ '/' + date.getFullYear());
var date3 = (date.getDate()+ '-' + (date.getMonth() + 1)+ '-' + date.getFullYear());
$("#DateOfPurchase").val(date3);
}

View File

@ -58,7 +58,7 @@ if(!empty($supplier))
if($CSTDt != '' && $CSTDt != '0000-00-00 00:00:00' )
{
$dtCST = new DateTime($CSTDt);
$CSTDate = $dtCST ->format('d/m/Y');
$CSTDate = $dtCST ->format('d-m-Y');
}
else
{
@ -359,7 +359,7 @@ function onlyAlphabets(evt) {
$("#dateofCST").datepicker({
//minDate : new Date(year-SIAStartYear,1,1),
maxDate :'now',
dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
});
});