diff --git a/application/controllers/CostCenter.php b/application/controllers/CostCenter.php index a1481f94..5343dbde 100755 --- a/application/controllers/CostCenter.php +++ b/application/controllers/CostCenter.php @@ -467,8 +467,8 @@ class CostCenter extends BaseController $this->excel->getActiveSheet()->setCellValue('H5', 'SERVICE'); $this->excel->getActiveSheet()->setCellValue('I5', 'BudgetYear'); $this->excel->getActiveSheet()->setCellValue('J5', 'DepartmentName'); - //$this->excel->getActiveSheet()->setCellValue('K5', 'IsActive'); - $this->excel->getActiveSheet()->setCellValue('K5', 'Remarks'); + $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'); @@ -532,8 +532,8 @@ 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('K'. $i,$data['Remarks']); + $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']); diff --git a/application/controllers/employeedetails.php b/application/controllers/employeedetails.php index b9351a71..2b0372e1 100755 --- a/application/controllers/employeedetails.php +++ b/application/controllers/employeedetails.php @@ -212,13 +212,13 @@ class employeedetails extends BaseController $this->form_validation->set_rules('ContactNumber', 'ContactNumber', 'trim|required|min_length[10]|max_length[10]'); $this->form_validation->set_rules('emailid', 'emailid', 'trim|required|valid_email'); - $this->form_validation->set_rules('gender', 'gender', 'callback_Gender_validate'); + $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('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('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'); + $this->form_validation->set_rules('eduqualifaction', 'eduqualifaction', 'callback_select_validate'); $this->form_validation->set_rules('referrercontno', 'referrercontno', 'trim|min_length[10]|max_length[10]'); $this->form_validation->set_rules('aadharno', 'aadharno', 'trim|min_length[14]|max_length[14]'); $this->form_validation->set_rules('panno', 'panno', 'trim|min_length[10]|max_length[10]'); @@ -273,14 +273,14 @@ class employeedetails extends BaseController $bankbranchname = $this->input->post('bankbranchname'); $bankaddress = $this->input->post('bankaddress'); $aadharno = $this->input->post('aadharno'); - $panno =strtoupper($this->input->post('panno')); - $passportno = $this->input->post('passportno'); + $panno = strtoupper($this->input->post('panno')); + $passportno = strtoupper($this->input->post('passportno')); $ValidTill = $this->input->post('ValidTill'); $addinfo = $this->input->post('addinfo'); $IsActive = '1'; - $driverlicense = $this->input->post ( 'driverlicense' ); + $driverlicense = strtoupper($this->input->post ( 'driverlicense' )); $licenseExpiryDate = $this->input->post ( 'licenseExpiryDate' ); - $VoterID = $this->input->post ( 'voterID' ); + $VoterID = strtoupper($this->input->post ( 'voterID' )); $createdby = $this->session->userdata ( 'userId' ); if($licenseExpiryDate != '') @@ -604,7 +604,7 @@ echo "";redirect('employeeListing',' $this->load->model('employeedetails_model'); $EmpId = $this->input->post('employeeid'); - $PictureName = $this->input->post('photo'); + $PictureName = $this->input->post('Image'); if ($PictureName != '') { @@ -656,12 +656,12 @@ echo "";redirect('employeeListing',' $bankaddress = $this->input->post('bankaddress'); $aadharno = $this->input->post('aadharno'); $panno = strtoupper($this->input->post('panno')); - $passportno = $this->input->post('passportno'); + $passportno = strtoupper($this->input->post('passportno')); $ValidTill = $this->input->post('ValidTill'); $addinfo = $this->input->post('addinfo'); - $driverlicense = $this->input->post ( 'Driverlicense' ); + $driverlicense = strtoupper($this->input->post ( 'Driverlicense' )); $licenseExpiryDate = $this->input->post ( 'LicenseExpiryDate' ); - $VoterID = $this->input->post ( 'VoterID' ); + $VoterID = strtoupper($this->input->post ( 'VoterID' )); $chked = $this->input->post('isactive'); // echo 'chkvalue'. $chked ; if( $chked != '') diff --git a/application/controllers/rawmaterialdetails.php b/application/controllers/rawmaterialdetails.php index 0e3ce77a..c1de646b 100755 --- a/application/controllers/rawmaterialdetails.php +++ b/application/controllers/rawmaterialdetails.php @@ -343,11 +343,13 @@ class rawmaterialdetails extends BaseController $this->load->library('excel'); - $this->excel->setActiveSheetIndex(0)->mergeCells('D3:J3'); + //$this->excel->setActiveSheetIndex(0)->mergeCells('D3:J3'); + $this->excel->setActiveSheetIndex(0)->mergeCells('F3:M3'); + $this->excel->setActiveSheetIndex(0)->getStyle('F3')->getAlignment()->applyFromArray(array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,)); $this->excel->getActiveSheet()->setTitle('Material Master'); - $this->excel->getActiveSheet()->setCellValue('D3', 'SIDDHARTH INDUSTRIES Material Master'); + $this->excel->getActiveSheet()->setCellValue('F3', 'SIDDHARTH INDUSTRIES Material Master'); $this->excel->getActiveSheet()->setCellValue('C5', 'MaterialCode'); $this->excel->getActiveSheet()->setCellValue('D5', 'MaterialName'); $this->excel->getActiveSheet()->setCellValue('E5', 'MaterialType'); @@ -366,8 +368,8 @@ class rawmaterialdetails extends BaseController - $this->excel->getActiveSheet()->getStyle('D3')->getFont()->setSize(14); - $this->excel->getActiveSheet()->getStyle('D3')->getFont()->setBold(true); + $this->excel->getActiveSheet()->getStyle('F3')->getFont()->setSize(14); + $this->excel->getActiveSheet()->getStyle('F3')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('C5')->getFont()->setSize(12); $this->excel->getActiveSheet()->getStyle('C5')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('D5')->getFont()->setSize(12); diff --git a/application/controllers/supplier.php b/application/controllers/supplier.php index 76c61e02..6713c535 100755 --- a/application/controllers/supplier.php +++ b/application/controllers/supplier.php @@ -464,7 +464,8 @@ class supplier extends BaseController - + $this->excel->getActiveSheet()->getStyle('J3')->getFont()->setSize(12); + $this->excel->getActiveSheet()->getStyle('J3')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('A5')->getFont()->setSize(12); $this->excel->getActiveSheet()->getStyle('A5')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('B5')->getFont()->setSize(12); diff --git a/application/models/assetdetails_model.php b/application/models/assetdetails_model.php index 99e88001..6f434e99 100755 --- a/application/models/assetdetails_model.php +++ b/application/models/assetdetails_model.php @@ -197,7 +197,8 @@ function addNewasset($asset) $this->db->trans_start(); $this->db->insert('T_Asset_Details', $asset); - $Asset_Code = $this->db->insert_id(); + //$Asset_Code = $this->db->insert_id(); + $Asset_Code = $this->db->affected_rows(); $this->db->trans_complete(); diff --git a/application/models/costcenter_model.php b/application/models/costcenter_model.php index ef1deaa2..7ca4e2ce 100755 --- a/application/models/costcenter_model.php +++ b/application/models/costcenter_model.php @@ -339,23 +339,22 @@ function addNewcost($Cost) $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->select('sum(distinct case when Mas.budgettype="CAPITAL" then budgetamount else 0 end) as capital',FALSE); + $this->db->select('sum(distinct case when Mas.budgettype="REVENUE" then budgetamount else 0 end) as revenue',FALSE); + $this->db->select('sum(distinct case when Mas.budgettype="SERVICE" then budgetamount else 0 end) as service',FALSE); + $this->db->select('sum(distinct case when Mas.budgettype="IMPORT" then budgetamount else 0 end) as import',FALSE); $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(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->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(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(); - + } //get exist budget year details function CheckExistBudget($BudgetType,$BudgetYear,$CostCode){ diff --git a/application/models/dahsboard_model.php b/application/models/dahsboard_model.php index f7d20217..1caf5e7c 100755 --- a/application/models/dahsboard_model.php +++ b/application/models/dahsboard_model.php @@ -337,13 +337,13 @@ case Cost_Center_Budget.BudgetType when 'IMPORT' then ifnull((sum((PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0) when 'CAPITAL' -then - case po.CapitalRange - when '0' - then ifnull((sum((PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0) - else ifnull((sum(PO_Line_Item.Quantity * PO_Line_Item.Rate)),0) - end -when 'SERVICE' +then + case po.CapitalRange + when '0' + then ifnull((sum((PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0) + else ifnull((sum(PO_Line_Item.Quantity * PO_Line_Item.Rate)),0) + end +when 'SERVICE' then ifnull((sum(PO_Line_Item.Quantity * PO_Line_Item.Rate)),0) when 'REVENUE' then ifnull((sum(PO_Line_Item.Quantity * PO_Line_Item.Rate) - sum(T_Rev_Tax.AfterDiscount)),0) @@ -352,23 +352,23 @@ end as Util_Amount, case Cost_Center_Budget.BudgetType when 'IMPORT' -then ifnull((Cost_Center_Budget.BudgetAmount - (sum((PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate))),0) +then (Cost_Center_Budget.BudgetAmount - ifnull((sum((PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0)) when 'CAPITAL' -then - case po.CapitalRange - when '0' - then ifnull((Cost_Center_Budget.BudgetAmount - (sum((PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate))),0) - else ifnull((Cost_Center_Budget.BudgetAmount - (sum(PO_Line_Item.Quantity * PO_Line_Item.Rate))),0) - end -when 'SERVICE' -then ifnull((Cost_Center_Budget.BudgetAmount - (sum(PO_Line_Item.Quantity * PO_Line_Item.Rate))),0) +then + case po.CapitalRange + when '0' + then (Cost_Center_Budget.BudgetAmount - ifnull((sum((PO_Line_Item.Quantity * PO_Line_Item.Rate) * po.ExchangeRate)),0)) + else (Cost_Center_Budget.BudgetAmount - ifnull((sum(PO_Line_Item.Quantity * PO_Line_Item.Rate)),0)) + end +when 'SERVICE' +then (Cost_Center_Budget.BudgetAmount - ifnull((sum(PO_Line_Item.Quantity * PO_Line_Item.Rate)),0)) when 'REVENUE' -then ifnull((Cost_Center_Budget.BudgetAmount - (sum(PO_Line_Item.Quantity * PO_Line_Item.Rate) - sum(T_Rev_Tax.AfterDiscount))),0) +then (Cost_Center_Budget.BudgetAmount - ifnull((sum(PO_Line_Item.Quantity * PO_Line_Item.Rate) - sum(T_Rev_Tax.AfterDiscount)),0)) end as Avlbl_Amt from T_CostCenter_Budget Cost_Center_Budget left join T_PurchaseOrder_LineItem PO_Line_Item on Cost_Center_Budget.CostCenterCode=PO_Line_Item.CostCenterCode -left JOIN T_PurchaseOrder_Master po on po.PONO=PO_Line_Item.PONO and po.Status !='ST030' +left JOIN T_PurchaseOrder_Master po on po.PONO=PO_Line_Item.PONO left JOIN T_Revenue_Tax T_Rev_Tax on PO_Line_Item.LineItemNo=T_Rev_Tax.LineItemNo JOIN T_CostCenter_Master Cost_Mast on Cost_Center_Budget.CostCenterCode=Cost_Mast.CostCenterCode JOIN T_CostCenter_Departments CostCentDept on CostCentDept.CostCenterCode=Cost_Mast.CostCenterCode diff --git a/application/views/Report_costcenter.php b/application/views/Report_costcenter.php index 73b04c96..cdcc59fe 100755 --- a/application/views/Report_costcenter.php +++ b/application/views/Report_costcenter.php @@ -78,14 +78,32 @@ if(!empty($ccrpt)) foreach($ccrpt as $rel) { ?> - + Cost_Center_Code?> Cost_Center_Name?> - Dept_Name?> - BudgetType?> - BudgetYear?> - Util_Amount?> - Avlbl_Amt?> + Dept_Name?> + BudgetType?> + BudgetYear?> + Util_Amount); + //echo number_format($rel->Util_Amount, 2) + ?> + + Avlbl_Amt < 0 ){ + setlocale(LC_MONETARY, 'en_IN.UTF-8'); + echo money_format('%n', $avlamount); + //echo number_format($avlamount,2); + } + else{ + setlocale(LC_MONETARY, 'en_IN.UTF-8'); + echo money_format('%n', $rel->Avlbl_Amt); + //echo number_format($rel->Avlbl_Amt, 2); + } + ?> + 31 + if (charCode != 46 && charCode != 32 && charCode >= 33 && (charCode < 48 || charCode > 57)) return false; @@ -85,130 +89,51 @@ $(function(){ function alpha(evt) { var k; document.all ? k = evt.keyCode : k = evt.which; - return ((k > 64 && k < 91) || (k > 96 && k < 123) || k == 8 || k == 32 || (k >= 48 && k <= 57)); + return ((k > 64 && k < 91) || (k > 96 && k < 123) || k == 8 || k == 33 || (k >= 48 && k <= 57)); } - + //PAN Validate function validatePAN() { var reg = /(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]).{1,}$/; - var PAN = $('#panno').val(); - - if(PAN != '') - { - if (reg.test(PAN) == false) - { - alert('Please Enter Valid PAN Number'); - return (false); - } - else - { - return true; - } - } - + var PAN = $('#panno').val(); + + if(PAN != '') + { + if (reg.test(PAN) == false) + { + alert('Please Enter Valid PAN Number'); + return (false); + } + else + { + return true; + } + } + } -function getMobileValidation() { - var contactNumber = $('#ContactNumber').val().length; - if(contactNumber < 10) - { - alert('Please Enter valid Contact Number'); - return false; - } - else - { - return true; - } -} -function getValidEmergencyNumber() { - var contactNumber = $('#emergencycontactnumber').val().length; - if(contactNumber < 10) - { - alert('Please Enter valid Emergency Contact Number'); - return false; - } - else - { - return true; - } -} -function getValidReferNumber() { - var contactNumber = $('#referrercontno').val().length; - if(contactNumber > 0 && contactNumber < 10) - { - alert('Please Enter valid Refernce Contact Number'); - return false; - } - else - { - return true; - } -} -function validateEmail() { - var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; - - var email = $('#emailid').val(); - - if(email != '') - { - if (reg.test(email) == false) - { - alert('Please Enter Valid Personal Email Address'); - return (false); - } - else - { - return true; - } - } - else - { - alert('Please Enter email id'); - } - -} -function validatecomEmail() { - var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; - - var email = $('#mail').val(); - - if(email != '') - { - if (reg.test(email) == false) - { - alert('Please Enter Valid Company Email Address'); - return (false); - } - else - { - return true; - } - } - else - { - alert('Please Enter email id'); - } - -} function ValidateAadhar(){ //alert('validation entered'); - var reg = /^\d{12}$/ + //var reg = /^\d{12}$/ + var reg = /^\d{4}\s\d{4}\s\d{4}$/ var aadhar = $('#aadharno').val(); - var aadhar_count = $('#aadharno').val().length; + //var aadhar_count = $('#aadharno').val().length; - if(aadhar != '' && aadhar_count != '') + if(aadhar != '' )// && aadhar_count != '') { //alert('this is aadhar :'+aadhar); - if(aadhar_count < 12) - { - //alert(aadhar1); - alert('Aadhar card should be in 12 digits'); - } - else if(reg.test(aadhar)== false) + // if(aadhar_count < 12) + // { + // //alert(aadhar1); + // alert('Aadhar card should be in 12 digits'); + // } + // else + if(reg.test(aadhar)== false) { //alert('alskdjsakjf'); alert('Please Enter Valid Aadhar Number'); + return (false); } else { @@ -216,33 +141,117 @@ function ValidateAadhar(){ return true; } } - else - { - //alert('aadhar is blank'); - alert('please Enter Aadhar number'); + // else + // { + // //alert('aadhar is blank'); + // alert('please Enter Aadhar number'); - } + // } } + + +function getMobileValidation() { + var contactNumber = $('#ContactNumber').val().length; + if(contactNumber < 10) + { + alert('Please Enter valid Contact Number'); + return false; + } + else + { + return true; + } +} +function getValidEmergencyNumber() { + var contactNumber = $('#emergencycontactnumber').val().length; + if(contactNumber < 10) + { + alert('Please Enter valid Emergency Contact Number'); + return false; + } + else + { + return true; + } +} +function getValidReferNumber() { + var contactNumber = $('#referrercontno').val().length; + if(contactNumber > 0 && contactNumber < 10) + { + alert('Please Enter valid Refernce Contact Number'); + return false; + } + else + { + return true; + } +} +function validateEmail() { + var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; + + var email = $('#emailid').val(); + + if(email != '') + { + if (reg.test(email) == false) + { + alert('Please Enter Valid Personal Email Address'); + return (false); + } + else + { + return true; + } + } + else + { + alert('Please Enter email id'); + } + +} +function validatecomEmail() { + var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; + + var email = $('#mail').val(); + + if(email != '') + { + if (reg.test(email) == false) + { + alert('Please Enter Valid Company Email Address'); + return (false); + } + else + { + return true; + } + } + else + { + alert('Please Enter email id'); + } + +} function validateDriverLicense() { - - - var reg = /^[A-Z]{2}[0-9]{2}\s[0-9]{11}$/; + + + var reg = /^[A-Z]{2}[0-9]{2}\s[0-9]{11}$/; // alert(); - var VehicleNo = $('#Driverlicense').val(); - if(VehicleNo != "") - { + var VehicleNo = $('#Driverlicense').val(); + if(VehicleNo != "") + { if (reg.test(VehicleNo) == false) { alert('Please Enter Valid Driver License Number'); return (false); } - else - { - return true; - } - } - + else + { + return true; + } + } + } function getAge() { @@ -277,31 +286,31 @@ $("#age").val(ageyear); } $(function() { - var d = new Date(); + var d = new Date(); - var month = d.getMonth(); - var day = d.getDate(); - var year = d.getFullYear() ; - var SIAStartYear = year - 2015; - var mindt = year-70; - var maxdt = year-15; - + var month = d.getMonth(); + var day = d.getDate(); + var year = d.getFullYear() ; + var SIAStartYear = year - 2015; + var mindt = year-70; + var maxdt = year-15; + $("#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' + minDate : new Date(mindt,1,1), + maxDate : new Date(maxdt,1,1), + 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, + $("#dateofjoining").datepicker({ + minDate : new Date(year-SIAStartYear,1,1), + maxDate :'now', + 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', @@ -313,7 +322,7 @@ $(function() { }); // $( ".selector" ).datepicker({ // dateFormat: 'yy-mm-dd' }); - + }); function resetphoto() @@ -323,14 +332,18 @@ function resetphoto() function ValidatePassport() { - var regsaid = /^[A-PR-WY][1-9]\d\s?\d{4}[1-9]$/ig; - var passport = $("#passportno").val(); - //alert(passport); + var regsaid = /^[aA-prPR-wyWY][1-9]\d\s?\d{4}[1-9]$/ig; + var passport = $("#passportno").val(); + //alert(passport); if(regsaid.test(passport) == false) { alert('You have entered invalid Passport.'); - return; + return (false); } + else + { + return true; + } } @@ -361,14 +374,14 @@ function onlyAlphabets(evt) { } .form-group { - padding-bottom:4%; + padding-bottom:4%; } .pad{ - padding-bottom:1%; + padding-bottom:1%; } .badge { - color:red; background-color:#fff; + color:red; background-color:#fff; } @@ -379,38 +392,38 @@ function onlyAlphabets(evt) {
Siddharth Industries Employee Profile
- +
-
+
Back -
-
+
+
- + - - + +
- + Personal Information -
-
+
+
-
+
your image
@@ -419,14 +432,14 @@ function onlyAlphabets(evt) { -
+
-
+
- First Name* + First Name*
@@ -435,20 +448,20 @@ function onlyAlphabets(evt) {
-
Father / Husband Name* +
Father / Husband Name* + class="form-control" required>
-
Date Of Birth* +
Date Of Birth*
-
-
Age +
+
Age
Contact Number* - +
@@ -460,7 +473,7 @@ function onlyAlphabets(evt) {
Gender*
-
-
- - Blood group* - + - -
-
Marital Status* + +
+
Marital Status*
-
+
Current address same as permanent address
@@ -555,23 +568,23 @@ function onlyAlphabets(evt) {
Emergency Contact Number* - +
- + Work Profile - +
Designation* -
Department* - +
Date Of Joining*
-
Previous Years of Experience +
Previous Years of Experience
- -
+ +
Qualification* - +
Additional Qualification @@ -633,15 +646,15 @@ function onlyAlphabets(evt) {
Referred By
-
Referrer Contact Number +
Referrer Contact Number + maxlength="10" onkeypress="return isNumberKey(event)" class="form-control">
Bank Details - +
Account Number @@ -652,24 +665,24 @@ function onlyAlphabets(evt) {
Bank Branch Name
-
Bank Address +
Bank Address
- - ID Proof + + ID Proof - +
Aadhar Number - +
PAN Number
Passport Number - +
Passport Expiry Date @@ -678,10 +691,10 @@ function onlyAlphabets(evt) {
Voter ID - +
Driving License - +
Driving License Expiry Date @@ -689,9 +702,9 @@ function onlyAlphabets(evt) {
- - - + + +
@@ -705,7 +718,7 @@ function onlyAlphabets(evt) {
- +
@@ -748,163 +761,167 @@ function onlyAlphabets(evt) { function Validate() { if($("#FirstName").val().length < 1) - { - alert('Please Enter FirstName'); + { + alert('Please Enter FirstName'); $("#FirstName").focus(); - return false; - } - if($("#LastName").val().length < 1) - { - alert('Please Enter LastName'); - return false; - } - if($("#FatherName").val().length < 1) - { - alert('Please Enter FatherName'); - return false; - } - if($("#DateofBirth").val().length < 1) - { - alert('Please Enter Date of Birth'); - return false; - } - if ( $('#ContactNumber').val().length < 1 ) - { - alert('Please Enter Contact Number'); - return false; - } - else if(!getMobileValidation()) - { return false; } - - - - - if($("#emailid").val().length < 1) - { - alert('Please Enter Personal Email ID'); - return false; - } - else if(!validateEmail()) - { - return; - } - - if($("#mail").val().length < 1) - { - alert('Please Enter Company Email ID'); - return false; - } - else if(!validatecomEmail()) - { - return; - } - - if($("option:selected", $("#gender")).val() == '-1') - { - alert('Please Select Gender'); + return false; + } + if($("#LastName").val().length < 1) + { + alert('Please Enter LastName'); + return false; + } + if($("#FatherName").val().length < 1) + { + alert('Please Enter FatherName'); + return false; + } + if($("#DateofBirth").val().length < 1) + { + alert('Please Enter Date of Birth'); + return false; + } + if ( $('#ContactNumber').val().length < 1 ) + { + alert('Please Enter Contact Number'); + return false; + } + else if(!getMobileValidation()) + { return false; } + + + + + if($("#emailid").val().length < 1) + { + alert('Please Enter Personal Email ID'); + return false; + } + else if(!validateEmail()) + { + return; + } + + if($("#mail").val().length < 1) + { + alert('Please Enter Company Email ID'); + return false; + } + else if(!validatecomEmail()) + { + return; + } + + if($("option:selected", $("#gender")).val() == '-1') + { + alert('Please Select Gender'); $('#gender').focus(); - return false; - } - - if($("option:selected", $("#MartialStatus")).val() == "-1") - { - alert('Please Select Martial Status'); + return false; + } + + if($("option:selected", $("#MartialStatus")).val() == "-1") + { + alert('Please Select Martial Status'); $('#MartialStatus').focus(); - return false; - } - - if($("option:selected", $("#bloodgroup")).val() == "-1") - { - alert('Please Select Blood group '); + return false; + } + + if($("option:selected", $("#bloodgroup")).val() == "-1") + { + alert('Please Select Blood group '); $("#bloodgroup").focus(); - return false; - } - if($("#currentaddress").val().length < 1) - { - alert('Please Enter Current Address'); - return false; - } - if($("#permanentaddress").val().length < 1) - { - alert('Please Enter Permanent Address'); - return false; - } - if($("#emergencycontactname").val().length < 1) - { - alert('Please Enter Emergency Contact Name'); - return false; - } - if($("#emergencycontactnumber").val().length < 1) - { - alert('Please Enter Emergency Contact Number'); - return false; - } - else if(!getValidEmergencyNumber()) - { return false;} - - - if($("option:selected", $("#desigination")).val() == "-1") - { - alert('Please Select Desigination '); + return false; + } + if($("#currentaddress").val().length < 1) + { + alert('Please Enter Current Address'); + return false; + } + if($("#permanentaddress").val().length < 1) + { + alert('Please Enter Permanent Address'); + return false; + } + if($("#emergencycontactname").val().length < 1) + { + alert('Please Enter Emergency Contact Name'); + return false; + } + if($("#emergencycontactnumber").val().length < 1) + { + alert('Please Enter Emergency Contact Number'); + return false; + } + else if(!getValidEmergencyNumber()) + { return false;} + + + if($("option:selected", $("#desigination")).val() == "-1") + { + alert('Please Select Desigination '); $("#desigination").focus(); - return false; - } - if($("option:selected", $("#departmentname")).val() == "-1") - { - alert('Please Select Department name'); + return false; + } + if($("option:selected", $("#departmentname")).val() == "-1") + { + alert('Please Select Department name'); $("#departmentname").focus(); - return false; - } - if($("option:selected", $("#eduqualifaction")).val() == "-1") - { - alert('Please Select Qualification'); + return false; + } + if($("option:selected", $("#eduqualifaction")).val() == "-1") + { + alert('Please Select Qualification'); $("#eduqualifaction").focus(); - return false; - } - - if($("#referrercontno").val().length > 0) - { - getValidReferNumber(); - } - - if($("#passportno").val().length > 1) - { - ValidatePassport(); - - } - - + return false; + } + + if($("#referrercontno").val().length > 0) + { + getValidReferNumber(); + } + + if($("#passportno").val().length > 1) + { + ValidatePassport(); + + } + + } $("#emailid").change(function () { var id = $('#emailid').val(); - if(validateEmail()) - { - $.ajax({ - data:{id:id}, - - type:"POST", - url:"employeedetails/CheckEmail", - success:function(data) { - if(data) - { - - var answer = confirm(data+""+" Employee already exists in the database.Do you want to change the Email id ?") - if (answer) { - $('#emailid').val(''); - $('#emailid').focus(); - } - else - { - window.location = 'employeedetails/employeeListing'; - } - - } - - } - - }); - } + if(validateEmail()) + { + $.ajax({ + data:{id:id}, + + type:"POST", + url:"employeedetails/CheckEmail", + success:function(data) { + if(data) + { + // alert(data+""+" Employee already exists in the database.Please Change the Email id") + // $('#emailid').val(''); + // $('#emailid').focus(); + + var answer = confirm(data+""+" Employee already exists in the database.Do you want to change the Email id ?") + if (answer) { + $('#emailid').val(''); + $('#emailid').focus(); + } + else + { + alert('please edit the emailid in the edit employee screen'); + window.location = 'employeedetails/employeeListing'; + } + + } + + } + + }); + } }); @@ -921,6 +938,9 @@ function Validate() success:function(data) { if(data) { + // alert( data+""+" Employee already exists in the database.Please Change the Pan Card Number"); + // $('#panno').val(''); + // $('#panno').focus(); var answer = confirm(data + " " +" Employee details is already exists in the database.Do you want to change the Employee details?") if (answer) @@ -931,7 +951,8 @@ function Validate() } else { - window.location = 'employeedetails/employeeListing'; + alert('please edit the PAN number in the Edit employee screen'); + window.location = 'employeedetails/employeeListing'; } } @@ -941,13 +962,14 @@ function Validate() } else { + //alert(); alert('Please enter the PAN Number'); $('#panno').focus(); return false; } }); - + // $('#aadharno').change(function() { var id = $('#aadharno').val(); @@ -955,35 +977,42 @@ function Validate() { $.ajax({ data:{id:id}, + type:"POST", url:"employeedetails/checkAadharNo", success:function(data) { - if(data) + if(data) { + // alert( data+""+" Employee already exists in the database.Please Change the Aadhar card Number"); + // $('#aadharno').val(''); + // $('#aadharno').focus(); - var answer = confirm(data + " " +" employee details is already exists in the database.Do you want to change the Employee details?") + var answer = confirm(data + " " +" employee details is already exists in the database.Do you want to change the Employee details?") if (answer) { $('#aadharno').val(''); $('#aadharno').focus(); return false; - } - else + } + else { + alert('please edit the aadhar number in the edit employee screen'); window.location = 'employeedetails/employeeListing'; } - } + } } }); } else { + //alert(); alert('Please enter the Aadhar Number'); - $('#aadharno').focus(); + $('#aadharno').focus(); return false; } }); + \ No newline at end of file diff --git a/application/views/addsupplier.php b/application/views/addsupplier.php index 78053a20..291ee57a 100755 --- a/application/views/addsupplier.php +++ b/application/views/addsupplier.php @@ -40,11 +40,11 @@ function alpha(e) { return false; } } - +//charCode <= 31 && charCode != 32 && charCode => 33 function isNumberKey(evt) { var charCode = (evt.which) ? evt.which : evt.keyCode; - if (charCode != 46 && charCode > 31 + if (charCode != 46 && charCode != 32 && charCode >= 33 && (charCode < 48 || charCode > 57)) return false; @@ -340,11 +340,11 @@ $(function() {
Contact Number* - +
Alternate Contact Number - +
@@ -380,7 +380,7 @@ $(function() {
PAN - +
TIN* @@ -388,7 +388,7 @@ $(function() {
UA Number - +
@@ -398,15 +398,15 @@ $(function() {
- CST Number - + CST Number +
CST Registration Date
GST Number* - +
GST Range @@ -453,7 +453,7 @@ $(function() {
IFSC Code - +
Bank Branch Name @@ -662,7 +662,7 @@ if(!validateEmail()) } else { - alert('Please edit the supplier details in the Edit screen and change the supplier status to Active'); + alert('Please edit the supplier details in the Edit screen and change the supplier status to Active'); window.location = 'supplier/supplierListing'; } diff --git a/application/views/editEmployee.php b/application/views/editEmployee.php index 62401845..670b5026 100755 --- a/application/views/editEmployee.php +++ b/application/views/editEmployee.php @@ -164,7 +164,7 @@ $(function(){ function isNumberKey(evt) { var charCode = (evt.which) ? evt.which : evt.keyCode; - if (charCode != 46 && charCode > 31 + if (charCode != 46 && charCode != 32 && charCode >= 33 && (charCode < 48 || charCode > 57)) return false; @@ -205,24 +205,27 @@ function validatePAN() { } + function ValidateAadhar(){ //alert('validation entered'); - var reg = /^\d{12}$/ + var reg = /^\d{4}\s\d{4}\s\d{4}$/ var aadhar = $('#aadharno').val(); var aadhar_count = $('#aadharno').val().length; - if(aadhar != '' && aadhar_count != '') + if(aadhar != '' )// && aadhar_count != '') { //alert('this is aadhar :'+aadhar); - if(aadhar_count < 12) - { - //alert(aadhar1); - alert('Aadhar card should be in 12 digits'); - } - else if(reg.test(aadhar)== false) + // if(aadhar_count < 14) + // { + // //alert(aadhar1); + // alert('Aadhar card should be in 12 digits'); + // } + // else + if(reg.test(aadhar)== false) { //alert('alskdjsakjf'); alert('Please Enter Valid Aadhar Number'); + return (false); } else { @@ -230,12 +233,12 @@ function ValidateAadhar(){ return true; } } - else - { + //else + //{ //alert('aadhar is blank'); - alert('please Enter Aadhar number'); + //alert('please Enter Aadhar number'); - } + //} } @@ -530,6 +533,9 @@ $(document).ready(function(){ // $("#desigination").select2(); // $("#departmentname").select2(); // $("#eduqualifaction").select2(); + document.getElementById('aadharno').addEventListener('input', function (e) { + e.target.value = e.target.value.replace(/[^\d]/g, '').replace(/(.{4})/g, '$1 ').trim(); + }); }); function onlyAlphabets(evt) { @@ -609,7 +615,7 @@ function onlyAlphabets(evt) { - + name="isactive" value="1"> IS ACTIVE @@ -641,7 +647,7 @@ function onlyAlphabets(evt) {
Contact Number* - +
@@ -755,7 +761,7 @@ function onlyAlphabets(evt) {
Emergency Contact Number* - +
@@ -863,20 +869,20 @@ function onlyAlphabets(evt) {
- ID Proof + ID Proof
Aadhar Number - +
-
PAN Number - +
PAN Number +
Passport Number - +
Passport Expiry Date @@ -885,10 +891,13 @@ function onlyAlphabets(evt) {
Voter ID - +
Driving License - + + +
Driving License Expiry Date @@ -898,6 +907,7 @@ function onlyAlphabets(evt) {
+ @@ -992,7 +1002,9 @@ function onlyAlphabets(evt) { success:function(data) { if(data) {alert( data+""+" Employee already exists in the database.Please Change the Pan Card Number"); - return false; + $('#panno').val(''); + $('#panno').focus(); + //return false; //window.location = 'Employeedetails/employeeListing'; } @@ -1014,7 +1026,9 @@ function onlyAlphabets(evt) { if(data) { alert( data+""+" Employee already exists in the database.Please Change the Aadhar card Number"); - return false; + $('#aadharno').val(''); + $('#aadharno').focus(); + //return false; //window.location = 'Employeedetails/employeeListing'; } } diff --git a/application/views/editOldcost.php b/application/views/editOldcost.php index 11be89fa..0a9282b1 100755 --- a/application/views/editOldcost.php +++ b/application/views/editOldcost.php @@ -386,9 +386,8 @@ $(function() {
- - - + +
@@ -524,8 +523,9 @@ $(function() { Budget Year :
+ - +
@@ -416,44 +416,44 @@ function onlyAlphabets(evt) {

- + Supplier Information
-
- Supplier ID +
+ Supplier ID -
+
- Supplier Name* + Supplier Name* - -
+ +
- Contact Number* - + Contact Number* +
- -
- Alternate Contact Number - + +
+ Alternate Contact Number +
- -
- Email ID* - + +
+ Email ID* +
-
Supplier Type : +
Supplier Type : - name="service" value="1"> SERVICE    - name="rawmaterial" value="1"> RAW MATERIALS    - name="maintanance" value="1"> MAINTENANCE + name="service" value="1"> SERVICE    + name="rawmaterial" value="1"> RAW MATERIALS    + name="maintanance" value="1"> MAINTENANCE -
-
name="isactive" > IsActive
+
+
name="isactive" > IsActive
Address Details @@ -461,7 +461,7 @@ function onlyAlphabets(evt) {
- Address* + Address*
@@ -470,42 +470,42 @@ function onlyAlphabets(evt) { Tax Related Data -
+
-
- PAN - -
-
- TIN* +
+ PAN + +
+
+ TIN*
-
- UA Number +
+ UA Number
- -
- Excise Registration + +
+ Excise Registration
-
- CST Number - +
+ CST Number +
-
CST Registration Date +
CST Registration Date
- GST Number* - + GST Number* +
- -
- GST Range + +
+ GST Range
@@ -514,88 +514,88 @@ function onlyAlphabets(evt) {
- - + + - Certification Details -
-
-
EMS Number - -
-
TS Number - -
-
-
-
- IMS Number - -
-
- ISO Number - -
-
-
- OHSAS Number - - -
-
+ Certification Details +
+
+
EMS Number + +
+
TS Number + +
+
+
+
+ IMS Number + +
+
+ ISO Number + +
+
+
+ OHSAS Number + + +
+
- Bank Details + Bank Details - +
Account Number
IFSC Code - +
Bank Branch Name
-
Bank Address +
Bank Address
- Payment Details + Payment Details - +
- Payable Terms - - - - -
+ Payable Terms + + + + +
- @@ -641,7 +641,7 @@ function onlyAlphabets(evt) {