diff --git a/application/controllers/CostCenter.php b/application/controllers/CostCenter.php index 43a2ed9a..8946e981 100755 --- a/application/controllers/CostCenter.php +++ b/application/controllers/CostCenter.php @@ -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']); diff --git a/application/controllers/assetdetails.php b/application/controllers/assetdetails.php index c6fe74a0..dd54b935 100755 --- a/application/controllers/assetdetails.php +++ b/application/controllers/assetdetails.php @@ -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 = ""; 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'); diff --git a/application/controllers/employeedetails.php b/application/controllers/employeedetails.php index 853c901a..99886843 100755 --- a/application/controllers/employeedetails.php +++ b/application/controllers/employeedetails.php @@ -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 ""; //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 ""; $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 ""; } /* To Update the employee details*/ - function UpdateEmployee() + function UpdateEmployee() { if($this->isAdmin() == TRUE) { diff --git a/application/controllers/supplier.php b/application/controllers/supplier.php old mode 100755 new mode 100644 index 34b9d1e4..3c70aa6b --- a/application/controllers/supplier.php +++ b/application/controllers/supplier.php @@ -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); diff --git a/application/models/assetdetails_model.php b/application/models/assetdetails_model.php old mode 100755 new mode 100644 diff --git a/application/models/costcenter_model.php b/application/models/costcenter_model.php index e821965b..ef1deaa2 100755 --- a/application/models/costcenter_model.php +++ b/application/models/costcenter_model.php @@ -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(); } diff --git a/application/models/employeedetails_model.php b/application/models/employeedetails_model.php index 6e8cc20d..81900ab7 100755 --- a/application/models/employeedetails_model.php +++ b/application/models/employeedetails_model.php @@ -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(); diff --git a/application/views/addasset.php b/application/views/addasset.php index 553f2884..4b751820 100755 --- a/application/views/addasset.php +++ b/application/views/addasset.php @@ -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); } diff --git a/application/views/addemployee.php b/application/views/addemployee.php index a0c76bef..03111444 100755 --- a/application/views/addemployee.php +++ b/application/views/addemployee.php @@ -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, diff --git a/application/views/addsupplier.php b/application/views/addsupplier.php index 6371bc9b..17624359 100755 --- a/application/views/addsupplier.php +++ b/application/views/addsupplier.php @@ -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' }); diff --git a/application/views/costListing.php b/application/views/costListing.php index 747b3e5f..21fc3090 100755 --- a/application/views/costListing.php +++ b/application/views/costListing.php @@ -42,7 +42,7 @@