From e54ab31105305c285e72c8006aaf7109e7e3ca53 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Mon, 29 Jan 2018 11:22:06 +0530 Subject: [PATCH] code mergedpayroll change requirement completed --- application/config/routes.php | 8 +- application/controllers/companycontroller.php | 5 +- application/controllers/employeedetails.php | 121 +++++- application/controllers/login.php | 152 +------- application/controllers/payslip.php | 4 +- application/controllers/purchaseorder.php | 2 +- application/controllers/requisitionform.php | 362 +++++++++--------- application/controllers/supplier.php | 146 +++---- application/controllers/user.php | 111 ++---- application/models/login_model.php | 81 +++- application/models/payroll_model.php | 3 +- .../models/rawmaterialdetails_model.php | 2 +- application/models/requistion_model.php | 2 +- application/models/user_model.php | 2 +- application/views/addemployee.php | 354 +++++++++-------- application/views/addsupplier.php | 16 +- application/views/bankreportprint.php | 18 +- application/views/companyview.php | 2 +- application/views/editEmployee.php | 75 +++- application/views/editSupplier.php | 50 +-- application/views/editrequisitionform.php | 175 +++++---- application/views/forgotPassword.php | 39 +- application/views/inwardgateregister.php | 29 +- application/views/login.php | 2 +- application/views/payslipgenerateprint.php | 20 +- application/views/purchaseorder.php | 4 +- application/views/supplierListing.php | 12 +- uploads/images/user1-128x128.jpg | Bin 28 files changed, 932 insertions(+), 865 deletions(-) mode change 100644 => 100755 uploads/images/user1-128x128.jpg diff --git a/application/config/routes.php b/application/config/routes.php index a1d03394..ad3bfe77 100644 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -149,8 +149,14 @@ $route['pageNotFound'] = "user/pageNotFound"; //<-----------Application Email & ForgetPassword Routes------------> $route['checkEmailExists'] = "user/checkEmailExists"; - $route['forgotPassword'] = "login/forgotPassword"; +$route['resetPasswordUser'] = "login/resetPasswordUser"; +$route['resetPasswordConfirmUser'] = "login/resetPasswordConfirmUser"; +$route['resetPasswordConfirmUser/(:any)'] = "login/resetPasswordConfirmUser/$1"; +$route['resetPasswordConfirmUser/(:any)/(:any)'] = "login/resetPasswordConfirmUser/$1/$2"; +$route['createPasswordUser'] = "login/createPasswordUser"; + +/** --------------------------Payslip Routes---------------------- */ $route['monthlypay'] = "payslip/monthlyInputs"; $route['ExcelUpload2'] = "payslip/viewUpload2"; $route['FileUpload'] = "payslip/uploadExcel"; diff --git a/application/controllers/companycontroller.php b/application/controllers/companycontroller.php index e65342df..4666847a 100644 --- a/application/controllers/companycontroller.php +++ b/application/controllers/companycontroller.php @@ -93,8 +93,9 @@ class companycontroller extends BaseController */ function add() { - $picture = ''; - if(!empty($_FILES['photo']['name'])) + $picture = ''; + photo[0] + if(!empty($_FILES['photo[0]']['name'])) { $config['upload_path'] = 'uploads/images/'; $config['allowed_types'] = 'jpg|jpeg|png|gif'; diff --git a/application/controllers/employeedetails.php b/application/controllers/employeedetails.php index 0590b69b..a1c63089 100644 --- a/application/controllers/employeedetails.php +++ b/application/controllers/employeedetails.php @@ -18,6 +18,7 @@ class employeedetails extends BaseController { parent::__construct(); $this->load->model('employeedetails_model'); + $this->load->model('companydetailsmodel'); $this->isLoggedIn(); } @@ -180,7 +181,8 @@ class employeedetails extends BaseController } } - + + /** * To save the new Employee form in the database */ @@ -189,13 +191,13 @@ class employeedetails extends BaseController { $this->load->library('form_validation'); - + $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('emailid', 'emailid', 'trim|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('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('emergencycontactnumber', 'emergencycontactnumber', 'trim|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'); @@ -266,7 +268,50 @@ class employeedetails extends BaseController $ESIno = $this->input->post('esino'); $Nominee = $this->input->post('nomineename'); $createdby = $this->session->userdata ( 'userId' ); + $Ddname = $this->input->post('ddName');//dropdown + //print_r($Ddname);die; + //$browseFiles[] = $_FILES['browseFiles']['name']; + $browseFiles = $_FILES['browseFiles']['name']; + // print_r($browseFiles); + // print_r($Ddname); + // echo "dropdown values".$Ddname[0]; + // echo "browse data files".$browseFiles[0]; + //$aadharname = $Ddname[0]."-".$browseFiles[0]; + if($Ddname[0] != '' && $browseFiles[0] != '') + { + $aadharfilename = $Ddname[0]."-".$browseFiles[0]; + } + else + { + $aadharfilename = null; + } + //$panname = $Ddname[1]."-".$browseFiles[1]; + if($Ddname[1] != '' && $browseFiles[1] != '') + { + $panfilename = $Ddname[1]."-".$browseFiles[1]; + } + else + { + $panfilename = null; + } + //$votername = $Ddname[2]."-".$browseFiles[2]; + if($Ddname[2] != '' && $browseFiles[2] != '') + { + $voterfilename = $Ddname[2]."-".$browseFiles[2]; + } + else + { + $voterfilename = null; + } + + //die();//echo count($browseFiles); + + //print_r($browseFiles); + + //$path = 'uploads/images/'; + $oth = $this->do_upload(); + if($licenseExpiryDate != '') { $License_ExpiryDate = $this->getDateformat($licenseExpiryDate); @@ -295,17 +340,23 @@ class employeedetails extends BaseController 'Departmentcode'=>$departmentCode,'PresentAddress'=>$CurrentAddress, 'PermanentAddress'=>$permanentaddress,'EmergencyContactName'=>$emergencycontactname, 'EmergencyContactNumber'=>$emergencycontactnumber,'Edu_Qualification'=>$eduqualifaction, - 'Additional_Qualification'=>$addqualification,'AadharNo'=>$aadharno,'PANNo'=>$panno, + 'Additional_Qualification'=>$addqualification, '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,'PFNO'=>$PFno,'ESI'=>$ESIno, - 'NomineeDetails'=>$Nominee); + 'LicenseValidtill'=>$License_ExpiryDate,'PFNO'=>$PFno,'ESI'=>$ESIno, + 'NomineeDetails'=>$Nominee,'AadharNo'=>$aadharfilename,'PANNo'=>$panfilename,'VoterID'=>$voterfilename); $this->load->model('employeedetails_model'); - + + print_r($Employee); + // echo "\n"; + // print_r($Ddname); + // echo "\n"; + // print_r($browseFiles); + //die(); $result = $this->employeedetails_model->addNewemployee($Employee); if($result > 0) @@ -321,7 +372,54 @@ class employeedetails extends BaseController } } - +function do_upload() +{ + echo "i am a do upload function"; + + $this->load->library('upload'); + + $files = $_FILES; + $cpt = count($_FILES['browseFiles']['name']); + echo $cpt; + + for($i=0; $i<$cpt; $i++) + { + $_FILES['browseFiles']['name']= $files['browseFiles']['name'][$i]; + $_FILES['browseFiles']['type']= $files['browseFiles']['type'][$i]; + $_FILES['browseFiles']['tmp_name']= $files['browseFiles']['tmp_name'][$i]; + $_FILES['browseFiles']['error']= $files['browseFiles']['error'][$i]; + $_FILES['browseFiles']['size']= $files['browseFiles']['size'][$i]; +//echo $_FILES['browseFiles']['name']; + $this->upload->initialize($this->set_upload_options()); + if($this->upload->do_upload('browseFiles')) + { + echo "do_upload function"; + // $uploadData = $this->upload->data(); + // $picture = $uploadData['file_name']; + } + else + { + echo "not upload function"; + // $error = array('error' => $this->upload->display_errors()); + // $picture = ''; + } + } +} + +private function set_upload_options() +{ + //upload an image options + echo "upload an image options"; + //die(); + $config = array(); + //$config['upload_path'] = './Images/'; + $config['upload_path'] = 'uploads/images/'; + $config['allowed_types'] = 'gif|jpg|png'; + $config['max_size'] = '0'; + $config['overwrite'] = FALSE; + + return $config; +} /** * To Convert the dateformat (date with time) and stored into DB */ @@ -369,7 +467,7 @@ class employeedetails extends BaseController $data['Qualification'] = $this->employeedetails_model->getConfigValue($QualificationConfigID); $data['Designation'] = $this->employeedetails_model->getConfigValue($DesignationConfigID); $data['BloodGroup'] = $this->employeedetails_model->getConfigValue($BloodGroupConfigID); - + $data['Department'] = $this->employeedetails_model->getDepartment(); $this->global['pageTitle'] = 'Resico : Add New Employee'; $this->loadViews("addemployee", $this->global, $data, NULL); @@ -469,6 +567,9 @@ class employeedetails extends BaseController */ function add() { + // echo "add files"; + // die(); + //echo $files; $picture = ''; if(!empty($_FILES['photo']['name'])) { diff --git a/application/controllers/login.php b/application/controllers/login.php index ce75d32a..cb4430b7 100644 --- a/application/controllers/login.php +++ b/application/controllers/login.php @@ -53,7 +53,7 @@ class Login extends CI_Controller $this->load->library('form_validation'); - //$this->form_validation->set_rules('email', 'Email', 'required|valid_email|max_length[128]|xss_clean|trim'); + $this->form_validation->set_rules('email', 'Email', 'required|valid_email|max_length[128]|xss_clean|trim'); $this->form_validation->set_rules('password', 'Password', 'required|max_length[32]|'); $designation=''; $role=''; @@ -119,155 +119,15 @@ class Login extends CI_Controller { $this->load->view('forgotPassword'); } - - /** - * To generate reset password request link - */ + + function resetPasswordUser() { - $status = ''; - - $this->load->library('form_validation'); - - $this->form_validation->set_rules('login_email','Email','trim|required|valid_email|xss_clean'); - - if($this->form_validation->run() == FALSE) - { - $this->forgetPasswordUser(); - } - else - { - $email = $this->input->post('login_email'); - - if($this->user_model->checkEmailExist($email)) - { - $encoded_email = urlencode($email); - - $this->load->helper('string'); - $data['email'] = $email; - $data['activation_id'] = random_string('alnum',15); - $data['created_dtm'] = date('Y-m-d H:i:s'); - $data['agent'] = $this->getBrowserAgent(); - $data['client_ip'] = $this->input->ip_address(); - - $save = $this->user_model->resetPasswordUser($data); - - if($save) - { - $config['protocol'] = 'sendmail'; - $config['mailpath'] = '/usr/sbin/sendmail'; - $config['charset'] = 'UTF-8'; - $config['wordwrap'] = TRUE; - $config['mailtype'] = 'html'; - - $this->load->library('email', $config); - - $data1['reset_link'] = base_url() . "resetPasswordConfirmUser/" . $data['activation_id'] . "/" . $encoded_email; - $data1['info'] = $this->user_model->getCustomerInfoByEmail($email); - - $this->email->from(ADMIN_EMAIL_ID, WEBSITE); - $this->email->to($email); - $this->email->subject(RESET_PASSWORD_EMAIL_SUBJECT); - $this->email->message($this->load->view('email', $data1, TRUE)); - - if ($this->email->send()) - { - $status = 'send'; - } - else - { - $status = 'notsend'; - } - } - else - { - $status = 'unable'; - } - } - else - { - $status = 'invalid'; - } - - echo json_encode(array('status'=>$status)); - } + $ContactNo = $this->input->post('phno'); + echo $ContactNo; } - /** - * To reset the password - */ - function resetPasswordConfirmUser() - { - - // Get email and activation code from URL values at index 3-4 - $email = urldecode($this->uri->segment(3)); - $activation_id = $this->uri->segment(2); - - // Check activation id in database - $is_correct = $this->user_model->checkActivationDetails($email, $activation_id); - - $data['email'] = $email; - $data['activation_code'] = $activation_id; - - if ($is_correct == 1) - { - $this->load->view('includes/header'); - $this->load->view('new_password', $data); - $this->load->view('includes/footer'); - } - else - { - redirect('user'); - } - } - - /** - * To create new password - */ - function createPasswordUser() - { - $status = ''; - $message = ''; - - $this->load->library('form_validation'); - - $this->form_validation->set_rules('password','New Password','required|max_length[20]'); - $this->form_validation->set_rules('cpassword','New Re-Password','trim|required|matches[password]|max_length[20]'); - - if($this->form_validation->run() == FALSE) - { - echo json_encode(array('status' => 'validation', 'message' => 'Please validate the fields')); - } - else - { - $password = $this->input->post('password'); - $cpassword = $this->input->post('cpassword'); - $email = $this->input->post('email'); - $activation_id = $this->input->post('activation_id'); - - // Check activation id in database - $is_correct = $this->user_model->checkActivationDetails($email, $activation_id); - - if(($is_correct == 1) && ($password == $cpassword)) - { - $data = array('email_id'=>$email, 'password'=>$password); - - $this->user_model->createPasswordUser($data); - - $status = 'success'; - $message = 'Password changed successfully'; - } - else - { - $status = 'error'; - $message = 'Password changed failed'; - } - - echo json_encode(array('status'=>$status, 'message'=>$message)); - } - } - - + } ?> diff --git a/application/controllers/payslip.php b/application/controllers/payslip.php index 84ea9c06..0b9aef0f 100755 --- a/application/controllers/payslip.php +++ b/application/controllers/payslip.php @@ -475,7 +475,7 @@ class payslip extends BaseController $data['month'] = $this-> monthlypay_model->monthlyListing($current); $data['fresh'] = $this-> monthlypay_model->getEmpPayDetailsforMonthInputs($current); $data['dropdownvalue'] = $current; - $this->global['pageTitle'] = 'Siddharth : Payroll Monthly Inputs'; + $this->global['pageTitle'] = 'Resico : Payroll Monthly Inputs'; $this->loadViews("monthlypayinputs", $this->global,$data,NULL); @@ -651,7 +651,7 @@ class payslip extends BaseController { $pre_monthyear = $this->input->post('month'); - $this->global['pageTitle'] = 'Siddharth : Payslip Listing'; + $this->global['pageTitle'] = 'Resico : Payslip Listing'; $data['PayInfo'] = $this->payroll_model->GetPayslipdata($pre_monthyear); $data['dropdownvalue'] = $pre_monthyear; diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index 1cd50c92..68eff5d5 100644 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -413,7 +413,7 @@ class purchaseorder extends BaseController $data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO); $data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO); $data['WorkStatus']=$this->purchaseorder_model->getStatus(7); - $this->global['pageTitle'] = 'Siddharth : Edit Revenue Purchase order form'; + $this->global['pageTitle'] = 'Resico : Edit Revenue Purchase order form'; $this->loadViews("editRevenuepurchaseorder", $this->global, $data, NULL); } diff --git a/application/controllers/requisitionform.php b/application/controllers/requisitionform.php index c3b4ce6c..0db478e6 100644 --- a/application/controllers/requisitionform.php +++ b/application/controllers/requisitionform.php @@ -27,31 +27,31 @@ class requisitionform extends BaseController */ function requisitionlisting() { - $this->global['pageTitle'] = 'Resico : Requisition Listing'; - $userID = $this->session->userdata ( 'userId' ); - $data['Status'] = $this->requistion_model->CheckDraftStatus($userID); - $data['TotNoOfLine'] =$this->requistion_model->getRequistionList($userID); - $this->loadViews("requisitionlisting", $this->global, $data, NULL); + $this->global['pageTitle'] = 'Resico : Requisition Listing'; + $userID = $this->session->userdata ( 'userId' ); + // $data['ReqList'] = $this->requistion_model->getRequistListUserID($userID); + $data['Status'] = $this->requistion_model->CheckDraftStatus($userID); + $data['TotNoOfLine'] =$this->requistion_model->getRequistionList($userID); + $this->loadViews("requisitionlisting", $this->global, $data, NULL); } /** * To load the requisition Form */ - function requisition() - { - $this->global['pageTitle'] = 'Resico : Raise Requisition'; - - $data['RequestType'] = $this->requistion_model->getConfigValue('C020'); - $data['EmpList'] = $this->requistion_model->getAllEmployees(); - $data['ServiceOption'] = $this->requistion_model->getConfigValue('C022'); - - $userID = $this->session->userdata ( 'userId' ); - - $data['Emp'] = $this->requistion_model->getEmpIdByUserID($userID); - $data['CostCenter'] = $this->requistion_model->getCostCenterUserID($userID); - - $this->loadViews("requisitionform", $this->global, $data,null); - } + function requisition() + { + $this->global['pageTitle'] = 'Resico : Raise Requisition'; + + $data['RequestType'] = $this->requistion_model->getConfigValue('C020'); + $data['EmpList'] = $this->requistion_model->getAllEmployees(); + $data['ServiceOption'] = $this->requistion_model->getConfigValue('C022'); + $userID = $this->session->userdata ( 'userId' ); + + $data['Emp'] = $this->requistion_model->getEmpIdByUserID($userID); + $data['CostCenter'] = $this->requistion_model->getCostCenterUserID($userID); + + $this->loadViews("requisitionform", $this->global, $data,null); + } /** * To load the Requistion List Approval Screen @@ -148,7 +148,7 @@ class requisitionform extends BaseController $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $updateddt = $dt->format('Y-m-d H:i:s'); $Request = array('Status'=>REQ_DELETED,'updatedOn'=>$updateddt); - + $this->requistion_model->UpdateRequistion( $Request,$ReqNo); echo "Successfully Deleted the ".$ReqNo; @@ -158,7 +158,7 @@ class requisitionform extends BaseController /** * To load the Requistion List Approval Screen */ - function SearchRequistList() + function SearchRequistList() { $userID = $this->session->userdata ( 'userId' ); $ReqValue = $this->input->post('SearchDate'); @@ -170,7 +170,7 @@ class requisitionform extends BaseController $Status= ''; if(count( $Dt)>1) { - $FDate = $Dt[0]."-".$Dt[1]."-".$Dt[2]; + $FDate = $Dt[0]."-".$Dt[1]."-".$Dt[2]; $TDate = $Dt[3]."-".$Dt[4]."-".$Dt[5]; $FromDate = $this->getDateformat($FDate); $ToDate = $this->getDateformat($TDate); @@ -211,81 +211,78 @@ class requisitionform extends BaseController /** * To load the Employee details based on the EmpID selection */ - function GetSelectedEmpDetails() - { - $ReqType = $_GET['ReqType']; - $EmpID = $this->input->post('id'); - $empDetails = $this->requistion_model->GetEmployeeDetails( $EmpID ); - $DeptCode = $empDetails[0]['DEPCode']; - $CostList = $this->requistion_model->GetCostCenterByDept( $DeptCode); - $HTML = ""; + function GetSelectedEmpDetails() + { + $ReqType = $_GET['ReqType']; + $EmpID = $this->input->post('id'); + $empDetails = $this->requistion_model->GetEmployeeDetails( $EmpID ); + $DeptCode = $empDetails[0]['DEPCode']; + $CostList = $this->requistion_model->GetCostCenterByDept( $DeptCode); + $HTML = ""; $BudAmount = ""; - - if(count($CostList) > 0) - { - for ($j = 0; $j < count($CostList); $j++) - { - $Code = $CostList[$j]['CostCenterCode']; - $Name = $CostList[$j]['CostCenterName']; - $HTML .=""; - } - } - - if(count($CostList) == 1) + if(count($CostList) > 0) + { + for ($j = 0; $j < count($CostList); $j++) + { + $Code = $CostList[$j]['CostCenterCode']; + $Name = $CostList[$j]['CostCenterName']; + $HTML .=""; + } + } + if(count($CostList) == 1) + { + + $FYStart = ''; + $FYEnd = ''; + $FiscalYear = $this->costcenter_model->getFiscalYear(); + if(!empty($FiscalYear)) + { + foreach ($FiscalYear as $Fy) { + $FYStart =$Fy->StartYear; + $FYEnd =$Fy->EndYear; + } + } - $FYStart = ''; - $FYEnd = ''; - $FiscalYear = $this->costcenter_model->getFiscalYear(); - if(!empty($FiscalYear)) - { - foreach ($FiscalYear as $Fy) - { - $FYStart =$Fy->StartYear; - $FYEnd =$Fy->EndYear; - } - } - - $FYdt = $FYStart." - ".$FYEnd ; - $this->load->model('purchaseorder_model'); - - $result = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType); - - $AvilBudAmt = '0'; - if(count($result)>0) - { - $BudAmount = $result[0]['BudgetAmount'] - $result[0]['Totalvalue']; - } - } - die(json_encode(array('emp' => $empDetails,'Cost' => $HTML,'AvlAmount' => $BudAmount))); - } + $FYdt = $FYStart." - ".$FYEnd ; + $this->load->model('purchaseorder_model'); + + $result = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType); + $AvilBudAmt = '0'; + if(count($result)>0) + { + $BudAmount = $result[0]['BudgetAmount'] - $result[0]['Totalvalue']; + } + } + die(json_encode(array('emp' => $empDetails,'Cost' => $HTML,'AvlAmount' => $BudAmount))); + } /** * To get the costcenter's budget amount by using Request type and Financal year */ - function getAvailableBudAmount() - { - $ReqType = $_GET['ReqType']; - $CostCode= $this->input->post('id'); - $FYStart = ''; - $FYEnd = ''; - $FiscalYear = $this->costcenter_model->getFiscalYear(); - if(!empty($FiscalYear)) - { - foreach ($FiscalYear as $Fy) + function getAvailableBudAmount() + { + $ReqType = $_GET['ReqType']; + $CostCode= $this->input->post('id'); + $FYStart = ''; + $FYEnd = ''; + $FiscalYear = $this->costcenter_model->getFiscalYear(); + if(!empty($FiscalYear)) { - $FYStart =$Fy->StartYear; - $FYEnd =$Fy->EndYear; - } + foreach ($FiscalYear as $Fy) + { + $FYStart =$Fy->StartYear; + $FYEnd =$Fy->EndYear; + } } - + $FYdt = $FYStart." - ".$FYEnd ; $this->load->model('purchaseorder_model'); - + $Cost = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType); - + die(json_encode(array('Cost' =>$Cost))); - } + } /** * To get the Material code based on the Request type @@ -300,8 +297,8 @@ class requisitionform extends BaseController $UOM = ""; $HTML = ""; - if(count($MaterialCode) > 0) - { + if(count($MaterialCode) > 0) + { for ($j = 0; $j < count($MaterialCode); $j++) { $Code = $MaterialCode[$j]['MaterialCode']; @@ -309,11 +306,11 @@ class requisitionform extends BaseController $HTML .=""; } - $MaterialName = $MaterialCode[0]['MaterialName']; - $UOM = $MaterialCode[0]['UOM']; + $MaterialName = $MaterialCode[0]['MaterialName']; + $UOM = $MaterialCode[0]['UOM']; } - die(json_encode(array('Material' =>$HTML,'MaterialName'=>$MaterialName,'UOM'=>$UOM))); + die(json_encode(array('Material' =>$HTML,'MaterialName'=>$MaterialName,'UOM'=>$UOM))); } /** @@ -333,7 +330,7 @@ class requisitionform extends BaseController /** * To add new Requistions to the system */ - function addNewRequistion() + function addNewRequistion() { $this->form_validation->set_rules('RequestType','RequestType','trim|required'); @@ -363,12 +360,12 @@ class requisitionform extends BaseController $noOfService = 1; - $IsExists = $this->requistion_model->RequistionIsExists($Requestedby); + $IsExists = $this->requistion_model->RequistionIsExists($Requestedby); - if(count( $IsExists) == 0) - { - + if(count( $IsExists) == 0) + { + $Request = array('ReqType'=>$RequestType, 'Requestedby'=>$Requestedby,'ReqDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Status'=>$Status,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy,'Schedule_Type'=>$serviceSchedule,'NumberOfService'=>$noOfService,'Service_Period'=>$servicePeriod,'RequestedDept'=>$RequestedbyDept); $Req = $this->requistion_model->addRequistion($Request); } @@ -378,22 +375,21 @@ class requisitionform extends BaseController $UpdateReq = $this->requistion_model->UpdateRequistion($Request,$IsExists[0]['ReqNo']); } $ReqNumber = ''; - - if(count($Req)>0) - { + if(count($Req)>0) + { $ReqNumber = $Req[0]['ReqNo']; - } - else - { + } + else + { $ReqNumber = $IsExists[0]['ReqNo']; - } + } - $SkipInsert = False; - for ($i = 1; $i <= $RowCount; $i++) - { - $SkipInsert = "False"; - if( count($comma_separated) > 0) - { + $SkipInsert = False; + for ($i = 1; $i <= $RowCount; $i++) + { + $SkipInsert = "False"; + if( count($comma_separated) > 0) + { for($j = 1; $j < count($comma_separated); $j++) { $deletedRow = $comma_separated[$j] ; @@ -405,32 +401,32 @@ class requisitionform extends BaseController } } - } + } - if($SkipInsert == "False") - { + if($SkipInsert == "False") + { $MaterialCode = $this->input->post('MaterialCode'.$i); - $Quantity = $this->input->post('Quantity'.$i); - $OtherD = $this->input->post('otherD'.$i); + $Quantity = $this->input->post('Quantity'.$i); + $OtherD = $this->input->post('otherD'.$i); $ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'MaterialDescription'=>$OtherD); - $this->requistion_model->addRequistionDetails($ReqDetails,$ReqNumber); - } + $this->requistion_model->addRequistionDetails($ReqDetails,$ReqNumber); + } - } - if($Status == REQ_DRAFT) - { + } + if($Status == REQ_DRAFT) + { echo 'Successfully Saved the Requistion details.Requistion No is '.$ReqNumber; - } - else - { + } + else + { echo 'Successfully Created the Requistion details.Requistion No is '.$ReqNumber; - } + } } - } - + } + /** @@ -449,7 +445,7 @@ class requisitionform extends BaseController $RowCount = $this->input->post('txtRowCount'); $serviceSchedule = $this->input->post('serviceSchedule'); $servicePeriod = $this->input->post('serviceSchedule'); - + $noOfService = 1; if(strlen($Status) > 1) { @@ -458,70 +454,68 @@ class requisitionform extends BaseController } else { - $Request = array( 'Status'=>REQ_PENDING_APPROVAL,'updatedOn'=>$updatedDate,'CostCenterCode'=>$CostCenter,'Schedule_Type'=>$serviceSchedule,'NumberOfService'=>$noOfService,'Service_Period'=>$servicePeriod); - $UpdateReq = $this->requistion_model->UpdateRequistion($Request, $ReqNumber); + $Request = array( 'Status'=>REQ_PENDING_APPROVAL,'updatedOn'=>$updatedDate,'CostCenterCode'=>$CostCenter,'Schedule_Type'=>$serviceSchedule,'NumberOfService'=>$noOfService,'Service_Period'=>$servicePeriod); + $UpdateReq = $this->requistion_model->UpdateRequistion($Request, $ReqNumber); } $comma_separated = explode(':', $DeletedRow); - - /* Table value update and Insert in the table */ - - $SkipInsert = False; - for ($i = 1; $i <= $RowCount; $i++) - { - $SkipInsert = "False"; - if( count($comma_separated) > 0) - { + + $SkipInsert = False; + for ($i = 1; $i <= $RowCount; $i++) + { + $SkipInsert = "False"; + if( count($comma_separated) > 0) + { for($j = 1; $j < count($comma_separated); $j++) { - $deletedRow = $comma_separated[$j] ; + $deletedRow = $comma_separated[$j] ; if($deletedRow == $i ) { $SkipInsert = "True"; break; } } - } + } - if($SkipInsert == "False") - { + if($SkipInsert == "False") + { $MaterialCode = $this->input->post('MaterialCode'.$i); - $Quantity = $this->input->post('Quantity'.$i); - $otherD =$this->input->post('otherD'.$i); + $Quantity = $this->input->post('Quantity'.$i); + $otherD =$this->input->post('otherD'.$i); $IsExists = $this->requistion_model->LineItemIsExists($ReqNumber,$MaterialCode); if(count( $IsExists) == 0) { - $ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$UpdatedBy,'UpdatedOn'=>$updatedDate,'MaterialDescription'=>$otherD); + $ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$UpdatedBy,'UpdatedOn'=>$updatedDate,'MaterialDescription'=>$otherD); $this->requistion_model->addRequistionDetails($ReqDetails,$ReqNumber); } else { - $ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$UpdatedBy,'UpdatedOn'=>$updatedDate,'MaterialDescription'=>$otherD); + $ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$UpdatedBy,'UpdatedOn'=>$updatedDate,'MaterialDescription'=>$otherD); $this->requistion_model->UpdateRequistionLineItem($ReqDetails,$ReqNumber,$MaterialCode); } - - } + + } - } - echo 'Successfully updated the Requistion details .Requistion No is '.$ReqNumber; - - } - + } + echo 'Successfully updated the Requistion details .Requistion No is '.$ReqNumber; + + } + /** * To Edit the request **/ function ViewRequest() -{ + { - $ReqNo= $this->input->post('id'); - $result = $this->requistion_model->getRequistItemList($ReqNo); - $ReqList = $this->requistion_model->getRequistDetails($ReqNo); - $DepNo = $ReqList[0]['DEPCode']; - - $HTML=""; - for ($i = 0; $i < count($result); $i++) - { + $ReqNo= $this->input->post('id'); + $result = $this->requistion_model->getRequistItemList($ReqNo); + $ReqList = $this->requistion_model->getRequistDetails($ReqNo); + $DepNo = $ReqList[0]['DEPCode']; + + $HTML=""; + for ($i = 0; $i < count($result); $i++) + { $SNo = $i + 1; $MaterialCode = $result[$i]['MaterialCode']; $MaterialName = $result[$i]['MaterialName']; @@ -546,30 +540,30 @@ function ViewRequest() $CostCode = ''; $ReqType = ''; $FYStart = ''; - $FYEnd = ''; - $this->load->model('costcenter_model'); - $FiscalYear = $this->costcenter_model->getFiscalYear(); - if(!empty($FiscalYear)) + $FYEnd = ''; + $this->load->model('costcenter_model'); + $FiscalYear = $this->costcenter_model->getFiscalYear(); + if(!empty($FiscalYear)) { - foreach ($FiscalYear as $Fy) - { - $FYStart =$Fy->StartYear; - $FYEnd =$Fy->EndYear; - } - } + foreach ($FiscalYear as $Fy) + { + $FYStart =$Fy->StartYear; + $FYEnd =$Fy->EndYear; + } + } $FYdt = $FYStart." - ".$FYEnd ; $this->load->model('purchaseorder_model'); if(count($ReqList)>0) { - $ReqType = $ReqList[0]['ReqType']; + $ReqType = $ReqList[0]['ReqType']; $CostCode = $ReqList[0]['CostCenterCode']; } $POType= $this->purchaseorder_model->GetPOType($ReqNo); - $ReqPOType = ''; - if(count($POType) > 0) - { + $ReqPOType = ''; + if(count($POType) > 0) + { for($i=0;$ipurchaseorder_model->GetAvailableCapitalBudgetAmount($CostCode,$FYdt,$RequestType); @@ -596,17 +590,15 @@ function ViewRequest() else { $AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType); - } - - $AvilBudAmt = '0'; + } + $AvilBudAmt = '0'; if(count($AvlBudget)>0) { $AvilBudAmt = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue']; } - + die(json_encode(array('Items' =>$HTML,'Requist'=>$ReqList,'AvilBudAmount'=>number_format($AvilBudAmt,2)))); - } - + } /** * For requistion approval status */ @@ -621,8 +613,8 @@ function ViewRequest() $ApprovedDate = $dt->format('Y-m-d H:i:s'); $Request = array('Status'=>$Status,'Comments'=>$Remarks,'ApprovedOn'=>$ApprovedDate,'Approvedby'=>$ApprovedBy); $this->requistion_model->UpdateRequistion($Request,$ReqNo); - echo "Successfully Updated the Requistion No: ".$ReqNo; - } + echo "Successfully Updated the Requistion No: ".$ReqNo; + } /** * To load pagenotfound view diff --git a/application/controllers/supplier.php b/application/controllers/supplier.php index b443d748..43b8029c 100644 --- a/application/controllers/supplier.php +++ b/application/controllers/supplier.php @@ -209,7 +209,7 @@ class supplier extends BaseController $this->form_validation->set_rules('ContactNumber','Contact Number','trim|required|max_length[13]'); $this->form_validation->set_rules('AlternateContactNumber','Alternate Contact Number','trim|max_length[13]'); $this->form_validation->set_rules('emailid','emailid', 'valid_email|max_length[128]|required'); - $this->form_validation->set_rules('TIN','TIN','trim|max_length[11]'); + //$this->form_validation->set_rules('TIN','TIN','trim|max_length[11]'); if($pan=='') { $this->form_validation->set_rules('panno', 'panno', 'trim|max_length[10]'); @@ -238,27 +238,27 @@ class supplier extends BaseController $ContactNumber = $this->input->post('ContactNumber'); $AlternateContactNumber = $this->input->post('AlternateContactNumber'); $EmailAddress = $this->input->post('emailid'); - $Exiseregistration = $this->input->post('Exciseregistration'); - $TIN = $this->input->post('TIN'); + // $Exiseregistration = $this->input->post('Exciseregistration'); + // $TIN = $this->input->post('TIN'); $PAN = strtoupper($this->input->post('panno')); $GSTNo = strtoupper($this->input->post('GSTNo')); $GSTRange = $this->input->post('GSTRange'); - $CollectrateAddress = $this->input->post('CollectrateAddress'); - $UANumber = $this->input->post('UANumber'); - $CSTNo = $this->input->post('CSTNo'); - $CSTDt = $this->input->post('dateofCST'); + //$CollectrateAddress = $this->input->post('CollectrateAddress'); + //$UANumber = $this->input->post('UANumber'); + //$CSTNo = $this->input->post('CSTNo'); + //$CSTDt = $this->input->post('dateofCST'); - if($CSTDt != '' ){ - if($CSTDt == '30/11/-0001'){ - $CSTDate = null; - } - else{ - $CSTDate = $this->getDateformat($CSTDt); - } - } - else{ - $CSTDate = null; - } + // if($CSTDt != '' ){ + // if($CSTDt == '30/11/-0001'){ + // $CSTDate = null; + // } + // else{ + // $CSTDate = $this->getDateformat($CSTDt); + // } + // } + // else{ + // $CSTDate = null; + // } $EMSNo = $this->input->post('EMSNo'); $TSNo = $this->input->post('TSNo'); @@ -278,7 +278,8 @@ class supplier extends BaseController $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,'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); + $supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'PaymentID'=>$PaymentId,'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); + /*'UANumber'=>$UANumber,'CSTNo'=>$CSTNo,'CSTDate'=>$CSTDate,'CollectrateAddress'=>$CollectrateAddress,'Exiseregistration'=>$Exiseregistration,'TIN'=>$TIN,'PaymentTerms'=>$PaymentTerms,'PaymentDays'=>$Payment,'PayableAT'=>$PayableAT); */ $result = $this->supplier_model->addNewsupplier($supplier); @@ -341,7 +342,7 @@ class supplier extends BaseController $this->form_validation->set_rules('ContactNumber','Contact Number','trim|required|max_length[13]'); $this->form_validation->set_rules('AlternateContactNumber','Alternate Contact Number','trim|max_length[13]'); $this->form_validation->set_rules('emailid','emailid','valid_email|max_length[128]|required'); - $this->form_validation->set_rules('TIN','TIN','trim|max_length[11]'); + // $this->form_validation->set_rules('TIN','TIN','trim|max_length[11]'); if($pan=='') { $this->form_validation->set_rules('panno', 'panno', 'trim|max_length[10]'); @@ -372,13 +373,13 @@ class supplier extends BaseController $ContactNumber = $this->input->post('ContactNumber'); $AlternateContactNumber = $this->input->post('AlternateContactNumber'); $EmailAddress = $this->input->post('emailid'); - $Exiseregistration = $this->input->post('Exciseregistration'); - $TIN = $this->input->post('TIN'); + //$Exiseregistration = $this->input->post('Exciseregistration'); + //$TIN = $this->input->post('TIN'); $PAN = strtoupper($this->input->post('panno')); $GSTNo = strtoupper($this->input->post('GSTNo')); $GSTRange = $this->input->post('GSTRange'); - $CollectrateAddress = $this->input->post('CollectrateAddress'); - $UANumber = $this->input->post('UANumber'); + //$CollectrateAddress = $this->input->post('CollectrateAddress'); + //$UANumber = $this->input->post('UANumber'); $PaymentTerms = $this->input->post('paymentname'); $UpdatedBy = $this->session->userdata ( 'userId' ); $chked = $this->input->post('isactive'); @@ -392,17 +393,17 @@ class supplier extends BaseController $IsActive = '0'; } - $CSTNo = $this->input->post('CSTNo'); - $CSTDt = $this->input->post('dateofCST'); + // $CSTNo = $this->input->post('CSTNo'); + // $CSTDt = $this->input->post('dateofCST'); - if($CSTDt != '') - { - $CSTDate = $this->getDateformat($CSTDt); - } - else - { - $CSTDate = null; - } + // if($CSTDt != '') + // { + // $CSTDate = $this->getDateformat($CSTDt); + // } + // else + // { + // $CSTDate = null; + // } $EMSNo = $this->input->post('EMSNo'); $TSNo = $this->input->post('TSNo'); @@ -419,7 +420,8 @@ class supplier extends BaseController $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,'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); + $supplier = array('SupplierName'=>$SupplierName, 'Address'=>$Address, 'ContactNumber'=>$ContactNumber, 'AlternateContactNumber'=> $AlternateContactNumber,'EmailAddress'=>$EmailAddress,'PAN'=>$PAN,'GSTNo'=>$GSTNo,'GSTRange'=>$GSTRange,'PaymentID'=>$PaymentId,'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); + /**'Exiseregistration'=>$Exiseregistration,'TIN'=>$TIN,'CollectrateAddress'=>$CollectrateAddress,'UANumber'=>$UANumber,'CSTNo'=>$CSTNo,'CSTDate'=>$CSTDate, */ $result = $this->supplier_model->UpdateSupplier($supplier, $supplierID); @@ -509,28 +511,28 @@ class supplier extends BaseController $this->excel->getActiveSheet()->setCellValue('D5', 'ContactNumber'); $this->excel->getActiveSheet()->setCellValue('E5', 'AlternateContactNumber'); $this->excel->getActiveSheet()->setCellValue('F5', 'EmailAddress'); - $this->excel->getActiveSheet()->setCellValue('G5', 'Exiseregistration'); - $this->excel->getActiveSheet()->setCellValue('H5', 'TIN'); - $this->excel->getActiveSheet()->setCellValue('I5', 'PAN'); - $this->excel->getActiveSheet()->setCellValue('J5', 'CSTNO'); - $this->excel->getActiveSheet()->setCellValue('K5', 'CST Date'); - $this->excel->getActiveSheet()->setCellValue('L5', 'GST NO'); - $this->excel->getActiveSheet()->setCellValue('M5', 'GST Range'); - $this->excel->getActiveSheet()->setCellValue('N5', 'Collectrate Address'); - $this->excel->getActiveSheet()->setCellValue('O5', 'UANumber'); - $this->excel->getActiveSheet()->setCellValue('P5','EMS Number'); - $this->excel->getActiveSheet()->setCellValue('Q5','TS Number'); - $this->excel->getActiveSheet()->setCellValue('R5','IMS Number'); - $this->excel->getActiveSheet()->setCellValue('S5','ISO Number'); - $this->excel->getActiveSheet()->setCellValue('T5','OHSAS Number'); - $this->excel->getActiveSheet()->setCellValue('U5', 'BankStatemant'); - $this->excel->getActiveSheet()->setCellValue('V5', 'PaymentTerms'); - $this->excel->getActiveSheet()->setCellValue('W5', 'IsService'); - $this->excel->getActiveSheet()->setCellValue('X5', 'IsMaintanance'); - $this->excel->getActiveSheet()->setCellValue('Y5', 'IsRawMaterial'); - $this->excel->getActiveSheet()->setCellValue('Z5', 'Createdby'); - $this->excel->getActiveSheet()->setCellValue('AA5', 'UpdatedBy'); - $this->excel->getActiveSheet()->setCellValue('AB5', 'IsActive'); + //$this->excel->getActiveSheet()->setCellValue('G5', 'Exiseregistration'); + //$this->excel->getActiveSheet()->setCellValue('H5', 'TIN'); + $this->excel->getActiveSheet()->setCellValue('G5', 'PAN'); + //$this->excel->getActiveSheet()->setCellValue('J5', 'CSTNO'); + //$this->excel->getActiveSheet()->setCellValue('K5', 'CST Date'); + $this->excel->getActiveSheet()->setCellValue('H5', 'GST NO'); + $this->excel->getActiveSheet()->setCellValue('I5', 'GST Range'); + //$this->excel->getActiveSheet()->setCellValue('N5', 'Collectrate Address'); + $this->excel->getActiveSheet()->setCellValue('J5', 'UANumber'); + $this->excel->getActiveSheet()->setCellValue('K5','EMS Number'); + $this->excel->getActiveSheet()->setCellValue('L5','TS Number'); + $this->excel->getActiveSheet()->setCellValue('M5','IMS Number'); + $this->excel->getActiveSheet()->setCellValue('N5','ISO Number'); + $this->excel->getActiveSheet()->setCellValue('O5','OHSAS Number'); + $this->excel->getActiveSheet()->setCellValue('P5', 'BankStatemant'); + $this->excel->getActiveSheet()->setCellValue('Q5', 'PaymentTerms'); + $this->excel->getActiveSheet()->setCellValue('R5', 'IsService'); + $this->excel->getActiveSheet()->setCellValue('S5', 'IsMaintanance'); + $this->excel->getActiveSheet()->setCellValue('T5', 'IsRawMaterial'); + $this->excel->getActiveSheet()->setCellValue('U5', 'Createdby'); + $this->excel->getActiveSheet()->setCellValue('V5', 'UpdatedBy'); + $this->excel->getActiveSheet()->setCellValue('W5', 'IsActive'); @@ -582,16 +584,16 @@ class supplier extends BaseController $this->excel->getActiveSheet()->getStyle('V5')->getFont()->setBold(true); $this->excel->getActiveSheet()->getStyle('W5')->getFont()->setSize(12); $this->excel->getActiveSheet()->getStyle('W5')->getFont()->setBold(true); - $this->excel->getActiveSheet()->getStyle('X5')->getFont()->setSize(12); - $this->excel->getActiveSheet()->getStyle('X5')->getFont()->setBold(true); - $this->excel->getActiveSheet()->getStyle('Y5')->getFont()->setSize(12); - $this->excel->getActiveSheet()->getStyle('Y5')->getFont()->setBold(true); - $this->excel->getActiveSheet()->getStyle('Z5')->getFont()->setSize(12); - $this->excel->getActiveSheet()->getStyle('Z5')->getFont()->setBold(true); - $this->excel->getActiveSheet()->getStyle('AA5')->getFont()->setSize(12); - $this->excel->getActiveSheet()->getStyle('AA5')->getFont()->setBold(true); - $this->excel->getActiveSheet()->getStyle('AB5')->getFont()->setSize(12); - $this->excel->getActiveSheet()->getStyle('AB5')->getFont()->setBold(true); + // $this->excel->getActiveSheet()->getStyle('X5')->getFont()->setSize(12); + // $this->excel->getActiveSheet()->getStyle('X5')->getFont()->setBold(true); + // $this->excel->getActiveSheet()->getStyle('Y5')->getFont()->setSize(12); + // $this->excel->getActiveSheet()->getStyle('Y5')->getFont()->setBold(true); + // $this->excel->getActiveSheet()->getStyle('Z5')->getFont()->setSize(12); + // $this->excel->getActiveSheet()->getStyle('Z5')->getFont()->setBold(true); + // $this->excel->getActiveSheet()->getStyle('AA5')->getFont()->setSize(12); + // $this->excel->getActiveSheet()->getStyle('AA5')->getFont()->setBold(true); + // $this->excel->getActiveSheet()->getStyle('AB5')->getFont()->setSize(12); + // $this->excel->getActiveSheet()->getStyle('AB5')->getFont()->setBold(true); @@ -626,11 +628,11 @@ class supplier extends BaseController $this->excel->getActiveSheet()->setCellValue('U' . $i,$data['BankAcNumber'].'-'.$data['IFSCCode'].'-'.$data['BranchName'].$data['BankAddress']); $this->excel->getActiveSheet()->setCellValue('V' . $i,$data['PaymentTerms']); $this->excel->getActiveSheet()->setCellValue('W' . $i,$data['IsService']); - $this->excel->getActiveSheet()->setCellValue('X' . $i,$data['IsMaintanance']); - $this->excel->getActiveSheet()->setCellValue('Y' . $i,$data['IsRawMaterial']); - $this->excel->getActiveSheet()->setCellValue('Z' . $i,$data['firstname']); - $this->excel->getActiveSheet()->setCellValue('AA' . $i,$data['Update_by']); - $this->excel->getActiveSheet()->setCellValue('AB' . $i,$data['IsActive']); + // $this->excel->getActiveSheet()->setCellValue('X' . $i,$data['IsMaintanance']); + // $this->excel->getActiveSheet()->setCellValue('Y' . $i,$data['IsRawMaterial']); + // $this->excel->getActiveSheet()->setCellValue('Z' . $i,$data['firstname']); + // $this->excel->getActiveSheet()->setCellValue('AA' . $i,$data['Update_by']); + // $this->excel->getActiveSheet()->setCellValue('AB' . $i,$data['IsActive']); $i++; $s++; diff --git a/application/controllers/user.php b/application/controllers/user.php index f7d29324..4a06c932 100755 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -20,7 +20,7 @@ class user extends BaseController $this->load->model('user_model'); $this->load->model('dahsboard_Model'); $this->load->library('form_validation'); - $this->load->model('costcenter_model'); + /*$this->load->model('costcenter_model');*/ $this->isLoggedIn(); } @@ -30,7 +30,7 @@ class user extends BaseController */ public function index() { - $this->global['pageTitle'] = 'Siddharth : Dashboard'; + $this->global['pageTitle'] = 'Resico : Dashboard'; $this->load->model('employeedetails_model'); @@ -950,15 +950,6 @@ function attendanceyear($empID ='') } } - - - - - - - - - /****************HR DASHBOART Controller END **************************************/ /** @@ -975,7 +966,7 @@ function attendanceyear($empID ='') $data['userRecords'] = $this->user_model->userListing(); - $this->global['pageTitle'] = 'Siddharth : User Listing'; + $this->global['pageTitle'] = 'Resico : User Listing'; $this->loadViews("users", $this->global, $data, NULL); } @@ -997,13 +988,14 @@ function attendanceyear($empID ='') $data['roles'] = $this->user_model->getUserRoles(); - $data['Department'] = $this->costcenter_model->getDepartment(); + //$data['Department'] = $this->costcenter_model->getDepartment(); - $this->global['pageTitle'] = 'Siddharth : Add New User'; + $this->global['pageTitle'] = 'Resico : Add New User'; $this->loadViews("addNew", $this->global, $data, NULL); } } + /** * This function is used to check whether email already exist or not @@ -1059,15 +1051,15 @@ function attendanceyear($empID ='') */ function addNewUser() { - // if($this->isAdmin() == TRUE) - // { - // $this->loadThis(); - // } - // else - // { + if($this->isAdmin() == TRUE) + { + $this->loadThis(); + } + else + { $this->form_validation->set_rules('EmpList','EmpList','trim|callback_Employee_validateS'); - // $this->form_validation->set_rules('role','role','trim|callback_Role_validate'); + $this->form_validation->set_rules('role','role','trim|callback_Role_validate'); $this->form_validation->set_rules('password','Password','required|max_length[20]'); $this->form_validation->set_rules('cpassword','Confirm Password','trim|required|matches[password]|max_length[20]'); @@ -1078,65 +1070,39 @@ function attendanceyear($empID ='') } else { - $EmpID = $this->input->post('EmpList'); - $roleId = '2'; - $password = $this->input->post('password'); - $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); - $Createddt = $dt->format('Y-m-d H:i:s'); + $EmpID = $this->input->post('EmpList'); + $roleId = $this->input->post('role'); + $password = $this->input->post('password'); + $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); + $Createddt = $dt->format('Y-m-d H:i:s'); $email = $this->input->post('MailID'); - - $SelectedDepartment = $this->input->post('txtSelectedDepartment'); - - - $comma_separated = explode(':', $SelectedDepartment); - $userInfo = array('email'=>$email,'EmpID'=>$EmpID,'password'=>getHashedPassword($password),'roleId'=>$roleId,'createdBy'=>$this->vendorId,'createdDtm'=>$Createddt); - - - - //die(); - + $userInfo = array('email'=>$email,'EmpID'=>$EmpID,'password'=>getHashedPassword($password),'roleId'=>$roleId,'createdBy'=>$this->vendorId,'createdDtm'=>$Createddt); + $result = $this->user_model->addNewUser($userInfo); - - - - for ($j = 0; $j < count($comma_separated); $j++) - { - $DeptCode = $comma_separated[$j]; - - $userdept=array('EmpID'=>$EmpID,'Departmentcode'=>$DeptCode); - - $access= $this->user_model->addAccess($userdept); - - //echo $access; - } if($result > 0) { - - - echo ""; - redirect('userListing','refresh'); + + redirect('userListing','refresh'); + echo ""; - } - + } else { - + redirect('userListing','refresh'); - echo ""; + echo ""; } } - //} + } } - - function Adduserdepartment() { $empid= $this->input->post('Eid'); @@ -1185,7 +1151,7 @@ function Adduserdepartment() } $Uid = $_GET['UID']; - $Empid = $_GET['EMPID']; + $data['roles'] = $this->user_model->getUserRoles(); @@ -1194,13 +1160,11 @@ function Adduserdepartment() $data['EmpList'] = $this->user_model->GetEmployeeDetails($Uid); //print_r($data); - $data['Departmentlist'] = $this->costcenter_model->getDepartmentnotadded($Empid); $data['EmpRole'] = $this->user_model->GetRoleNameByUserID($Uid); - $data['AccessDept'] = $this->costcenter_model ->getaccessDept($Empid); // $data['userInfo'] = $this->user_model->getUserInfo($userId); - $this->global['pageTitle'] = 'Siddharth : Edit User'; + $this->global['pageTitle'] = 'Resico : Edit User'; $this->loadViews("editOld", $this->global, $data, NULL); } @@ -1263,9 +1227,9 @@ function Adduserdepartment() } + /** - * This function is used to delete the user using userId - * @return boolean $result : TRUE / FALSE + * To delete the user */ function deleteUser() { @@ -1284,18 +1248,18 @@ function Adduserdepartment() } /** - * This function is used to load the change password screen + * To load the change password screen */ function loadChangePass() { - $this->global['pageTitle'] = 'Siddharth : Change Password'; + $this->global['pageTitle'] = 'Resico : Change Password'; $this->loadViews("changePassword", $this->global, NULL, NULL); } /** - * This function is used to change the password of the user + * To store change the password of the user into DB */ function changePassword() { @@ -1336,12 +1300,15 @@ function Adduserdepartment() } } + /** + * To load pagenotfound view + */ function pageNotFound() { - $this->global['pageTitle'] = 'Siddharth : 404 - Page Not Found'; + $this->global['pageTitle'] = 'Resico : 404 - Page Not Found'; $this->loadViews("404", $this->global, NULL, NULL); } } -?> +?> \ No newline at end of file diff --git a/application/models/login_model.php b/application/models/login_model.php index 5abac2f8..1f5262c9 100644 --- a/application/models/login_model.php +++ b/application/models/login_model.php @@ -26,13 +26,90 @@ class Login_model extends CI_Model if(!empty($user)){ if(verifyHashedPassword($password, $user[0]->password)){ return $user; - } else { + } + else { return array(); } - } else { + } + else { return array(); } } + + /** + * This function used to insert reset password data + * @param {array} $data : This is reset password data + * @return {boolean} $result : TRUE/FALSE + */ + function resetPasswordUser($data) + { + $result = $this->db->insert('tbl_reset_password', $data); + + if($result) { + return TRUE; + } else { + return FALSE; + } + } + + /** + * This function is used to get customer information by email-id for forget password email + * @param string $email : Email id of customer + * @return object $result : Information of customer + */ + function getCustomerInfoByEmail($email) + { + $this->db->select('userId, email, EmpID'); + $this->db->from('tbl_users'); + $this->db->where('isDeleted', 0); + $this->db->where('email', $email); + $query = $this->db->get(); + + return $query->result(); + } + + /** + * This function used to check correct activation deatails for forget password. + * @param string $email : Email id of user + * @param string $activation_id : This is activation string + */ + function checkActivationDetails($email, $activation_id) + { + $this->db->select('id'); + $this->db->from('tbl_reset_password'); + $this->db->where('email', $email); + $this->db->where('activation_id', $activation_id); + $query = $this->db->get(); + return $query->num_rows; + } + + // This function used to create new password by reset link + function createPasswordUser($email, $password) + { + $this->db->where('email', $email); + $this->db->where('isDeleted', 0); + $this->db->update('tbl_users', array('password'=>getHashedPassword($password))); + $this->db->delete('tbl_reset_password', array('email'=>$email)); + } + + /** + * This function used to check email exists or not + * @param {string} $email : This is users email id + * @return {boolean} $result : TRUE/FALSE + */ + function checkEmailExist($email) + { + $this->db->select('userId'); + $this->db->where('email', $email); + $this->db->where('isDeleted', 0); + $query = $this->db->get('tbl_users'); + + if ($query->num_rows() > 0){ + return true; + } else { + return false; + } + } } ?> diff --git a/application/models/payroll_model.php b/application/models/payroll_model.php index a1b1b6b0..6609daa2 100755 --- a/application/models/payroll_model.php +++ b/application/models/payroll_model.php @@ -149,10 +149,11 @@ class Payroll_model extends CI_Model function GetPayslipdata($PayOn='',$EmpId='') { //echo "FROM MODEL" . $PayOn . $EmpId; - $this->db->select('Pay.*,Emp.FirstName as FName ,Emp.LastName as Lname,Emp.DateofBirth as Dob,Emp.PANNo as Pan,Emp.BankBranchName as BankName,Emp.AadharNo,Emp.IFSCCode as IFSCCode,Emp.DateofJoining as DOJ,Emp.Designation as Designation,Dep.DepartmentName as DeptName'); + $this->db->select('Pay.*,Emp.FirstName as FName ,Emp.LastName as Lname,Emp.DateofBirth as Dob,Emp.PANNo as Pan,Emp.BankBranchName as BankName,Emp.AadharNo,Emp.IFSCCode as IFSCCode,Emp.DateofJoining as DOJ,Emp.Designation as Designation,Dep.DepartmentName as DeptName ,Lm.Loan_Issued_Date'); $this->db->from('T_Payroll Pay'); //$this->db->join('T_Payroll_File payfile', 'Pay.PayOn = payfile.PayOn'); $this->db->join('T_Employee_Details Emp', 'Pay.EmpID = Emp.EmpID'); + $this->db->join('T_Loan_Master Lm', 'Lm.EmpID = Pay.EmpID'); $this->db->join('T_DepartmentDetails Dep', 'Emp.Departmentcode = Dep.DEPCode'); if($PayOn != '') { diff --git a/application/models/rawmaterialdetails_model.php b/application/models/rawmaterialdetails_model.php index 72b249db..3d504491 100644 --- a/application/models/rawmaterialdetails_model.php +++ b/application/models/rawmaterialdetails_model.php @@ -92,7 +92,7 @@ class rawmaterialdetails_model extends CI_Model function addNewRawMaterial($RawMaterial='') { - + print_r($RawMaterial); $this->db->insert('T_MaterialMaster', $RawMaterial); return TRUE; } diff --git a/application/models/requistion_model.php b/application/models/requistion_model.php index 13c8ee6c..ebeb8029 100644 --- a/application/models/requistion_model.php +++ b/application/models/requistion_model.php @@ -196,7 +196,7 @@ ifnull(Po.Quantity,0) as POQTY,sta.StatusName { $this->db->select('MaterialName,UOM'); $this->db->from('T_MaterialMaster'); - $this->db->where('MaterialCode',$MaterialCode ); + $this->db->where('MaterialCode',$MaterialCode ); $query = $this->db->get(); return $query->result_array(); diff --git a/application/models/user_model.php b/application/models/user_model.php index 9adc192f..6bd3b275 100644 --- a/application/models/user_model.php +++ b/application/models/user_model.php @@ -55,7 +55,7 @@ class User_model extends CI_Model return $query->result(); } - + /** * This function is used to check whether email id is already exist or not * @param {string} $email : This is email id diff --git a/application/views/addemployee.php b/application/views/addemployee.php index d3f9ee48..5ed9fb23 100644 --- a/application/views/addemployee.php +++ b/application/views/addemployee.php @@ -43,23 +43,24 @@ $(document).ready(function(){ } } -$(function(){ - $('#checksame').click(function(){ - if ($('#checksame').prop('checked')) - - { - - $('#permanentaddress').val($('#currentaddress').val()); - - } - else - { - $('#permanentaddress').val(''); - } - - }); -}); - + $(function(){ + $('#checksame').click(function(){ + alert('asdfsadfsfd'); + if ($('#checksame').prop('checked')) + + { + + $('#permanentaddress').val($('#currentaddress').val()); + + } + else + { + $('#permanentaddress').val(''); + } + + }); + }); + function blockKeyPress(evt) @@ -507,8 +508,8 @@ function validateESI() {
-
Personal Email ID* - +
Personal Email ID +
Gender* @@ -537,8 +538,8 @@ function validateESI() {
- Blood group* -
-
Marital Status* -
- - - + + Address Details
-
Current Address* +
Address*
-
+ -
+ +
--> + @@ -605,11 +605,11 @@ function validateESI() { Emergency Contact Information
-
Emergency Contact Name* - +
Emergency Contact Name +
-
Emergency Contact Number* - +
Emergency Contact Number +
@@ -732,12 +732,12 @@ function validateESI() {
-
Aadhar Number +
Passport Number @@ -745,17 +745,18 @@ function validateESI() {
Passport Expiry Date
-
+ +
Driving License
-
Driving License Expiry Date +
Driving License Expiry Date
@@ -785,9 +786,22 @@ function validateESI() {
+ + + + Multiple File - - +
+ + + + + + +
Upload your filesSelect your id
+
+ +
@@ -872,29 +886,27 @@ function Validate() } else if(!getMobileValidation()) { return false; } - - + - - if($("#emailid").val().length < 1) - { - swal('Please Enter Personal Email ID'); - return false; - } - else if(!validateEmail()) - { - return; - } + // if($("#emailid").val().length < 1) + // { + // swal('Please Enter Personal Email ID'); + // return false; + // } + // else if(!validateEmail()) + // { + // return; + // } - if($("#mail").val().length < 1) - { - swal('Please Enter Company Email ID'); - return false; - } - else if(!validatecomEmail()) - { - return; - } + // if($("#mail").val().length < 1) + // { + // swal('Please Enter Company Email ID'); + // return false; + // } + // else if(!validatecomEmail()) + // { + // return; + // } if($("option:selected", $("#gender")).val() == '-1') { @@ -910,13 +922,13 @@ function Validate() return false; } - if($("option:selected", $("#bloodgroup")).val() == "-1") - { - swal('Please Select Blood group '); - $("#bloodgroup").focus(); - return false; - } - if($("#currentaddress").val().length < 1) + // if($("option:selected", $("#bloodgroup")).val() == "-1") + // { + // swal('Please Select Blood group '); + // $("#bloodgroup").focus(); + // return false; + // } + if($("#currentaddress").val().length < 1) { swal('Please Enter Current Address'); return false; @@ -926,18 +938,18 @@ function Validate() swal('Please Enter Permanent Address'); return false; } - if($("#emergencycontactname").val().length < 1) - { - swal('Please Enter Emergency Contact Name'); - return false; - } - if($("#emergencycontactnumber").val().length < 1) - { - swal('Please Enter Emergency Contact Number'); - return false; - } - else if(!getValidEmergencyNumber()) - { return false;} + // if($("#emergencycontactname").val().length < 1) + // { + // swal('Please Enter Emergency Contact Name'); + // return false; + // } + // if($("#emergencycontactnumber").val().length < 1) + // { + // swal('Please Enter Emergency Contact Number'); + // return false; + // } + // else if(!getValidEmergencyNumber()) + // { return false;} if($("option:selected", $("#desigination")).val() == "-1") @@ -1009,95 +1021,95 @@ function Validate() }); - $('#panno').change(function() { +// $('#panno').change(function() { - var id = $('#panno').val(); - if(id != '') - { - $.ajax({ - data:{id:id}, +// var id = $('#panno').val(); +// if(id != '') +// { +// $.ajax({ +// data:{id:id}, - type:"POST", - url:"employeedetails/checkPAN", - success:function(data) { - if(data) - { - // alert( data+""+" Employee already exists in the database.Please Change the Pan Card Number"); - // $('#panno').val(''); - // $('#panno').focus(); +// type:"POST", +// url:"employeedetails/checkPAN", +// 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) - { - $('#panno').val(''); - $('#panno').focus(); - return false; - } - else - { - swal('please edit the PAN number in the Edit employee screen'); - window.location = 'employeedetails/employeeListing'; - } +// var answer = confirm(data + " " +" Employee details is already exists in the database.Do you want to change the Employee details?") +// if (answer) +// { +// $('#panno').val(''); +// $('#panno').focus(); +// return false; +// } +// else +// { +// swal('please edit the PAN number in the Edit employee screen'); +// window.location = 'employeedetails/employeeListing'; +// } - } - } +// } +// } - }); - } - else - { - //alert(); - swal('Please enter the PAN Number'); - $('#panno').focus(); - return false; - } +// }); +// } +// else +// { +// //alert(); +// swal('Please enter the PAN Number'); +// $('#panno').focus(); +// return false; +// } -}); - // - $('#aadharno').change(function() { +// }); +// // +// $('#aadharno').change(function() { - var id = $('#aadharno').val(); - if(id != '') - { - $.ajax({ - data:{id:id}, +// var id = $('#aadharno').val(); +// if(id != '') +// { +// $.ajax({ +// data:{id:id}, - type:"POST", - url:"employeedetails/checkAadharNo", - success:function(data) { - if(data) - { - // alert( data+""+" Employee already exists in the database.Please Change the Aadhar card Number"); - // $('#aadharno').val(''); - // $('#aadharno').focus(); +// type:"POST", +// url:"employeedetails/checkAadharNo", +// success:function(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?") - if (answer) - { - $('#aadharno').val(''); - $('#aadharno').focus(); - return false; - } - else - { - swal('please edit the aadhar number in the edit employee screen'); - window.location = 'employeedetails/employeeListing'; - } +// 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 +// { +// swal('please edit the aadhar number in the edit employee screen'); +// window.location = 'employeedetails/employeeListing'; +// } - } - } +// } +// } - }); - } - else - { - //alert(); - swal('Please enter the Aadhar Number'); - $('#aadharno').focus(); - return false; - } +// }); +// } +// else +// { +// //alert(); +// swal('Please enter the Aadhar Number'); +// $('#aadharno').focus(); +// return false; +// } -}); +// }); $('#bankbranchname').change(function() { @@ -1123,6 +1135,22 @@ $('#bankbranchname').change(function() } }); + + \ No newline at end of file + \ No newline at end of file diff --git a/application/views/addsupplier.php b/application/views/addsupplier.php index 9fa4db3d..06374545 100644 --- a/application/views/addsupplier.php +++ b/application/views/addsupplier.php @@ -404,19 +404,19 @@ $(function() {
PAN
-
- TIN + +
Excise Registration - +
@@ -427,7 +427,7 @@ $(function() {
CST Registration Date -
+
-->
GST Number @@ -437,10 +437,10 @@ $(function() {
-
Collectrate Address +
Certification Details diff --git a/application/views/bankreportprint.php b/application/views/bankreportprint.php index c879507b..ed830b55 100644 --- a/application/views/bankreportprint.php +++ b/application/views/bankreportprint.php @@ -6,18 +6,18 @@ .pagenum:before { content: counter(page); } --> - +
+
+

To,

The Branch Manager,
,

@@ -78,8 +80,8 @@
-

Kindly do the needful,
Thanking you,
Yours faithfully.

K.Subramanian.

- +

Kindly do the needful,
Thanking you,
Yours faithfully.
+

\ No newline at end of file diff --git a/application/views/companyview.php b/application/views/companyview.php index 0225875b..65cae248 100644 --- a/application/views/companyview.php +++ b/application/views/companyview.php @@ -722,7 +722,7 @@ function ValidateUA() { Upload File
File Description - + '; + html += ''; + html += ''; + $('#item_table').append(html); +}); +$(document).on('click','.remove',function() { + //alert('removebtn'); + $(this).closest('tr').remove(); +}); + \ No newline at end of file diff --git a/application/views/editSupplier.php b/application/views/editSupplier.php index d22aa5e3..35e474b1 100644 --- a/application/views/editSupplier.php +++ b/application/views/editSupplier.php @@ -10,14 +10,14 @@ $TIN = ''; $PAN = ''; $GSTNO = ''; $GSTRange = ''; -$CollectrateAddress = ''; -$UANumber = ''; +//$CollectrateAddress = ''; +//$UANumber = ''; $PaymentTerms = ''; //$PaymentDays = ''; //$PayableAT = ''; $IsActive = ''; -$CSTNO = ''; -$CSTDate = ''; +// $CSTNO = ''; +// $CSTDate = ''; $EMSNo = ''; $TSNo = ''; $IMSNo = ''; @@ -42,28 +42,28 @@ if(!empty($supplier)) $ContactNumber = $uf->ContactNumber; $AlternateContactNumber = $uf->AlternateContactNumber; $EmailAddress = $uf->EmailAddress; - $Exiseregistration = $uf->Exiseregistration; + //$Exiseregistration = $uf->Exiseregistration; $TIN = $uf->TIN; $PAN = $uf->PAN; $GSTNO = $uf->GSTNO; $GSTRange = $uf->GSTRange; - $CollectrateAddress = $uf->CollectrateAddress; - $UANumber = $uf->UANumber; + //$CollectrateAddress = $uf->CollectrateAddress; + //$UANumber = $uf->UANumber; $PaymentTerms = $uf->PaymentTerms; //$PaymentDays = $uf->PaymentDays; //$PayableAT = $uf->PayableAT; - $CSTNO = $uf->CSTNO; - $CSTDt = $uf->CSTDate; + // $CSTNO = $uf->CSTNO; + // $CSTDt = $uf->CSTDate; - if($CSTDt != '' && $CSTDt != '0000-00-00 00:00:00' ) - { - $dtCST = new DateTime($CSTDt); - $CSTDate = $dtCST ->format('d-m-Y'); - } - else - { - $CSTDate = ""; - } + // if($CSTDt != '' && $CSTDt != '0000-00-00 00:00:00' ) + // { + // $dtCST = new DateTime($CSTDt); + // $CSTDate = $dtCST ->format('d-m-Y'); + // } + // else + // { + // $CSTDate = ""; + // } $chk = $uf->IsActive; @@ -500,9 +500,9 @@ function onlyAlphabets(evt) {
-
- TIN - + +
@@ -523,7 +523,7 @@ function onlyAlphabets(evt) {
CST Registration Date -
+
-->
GST Number @@ -535,12 +535,12 @@ function onlyAlphabets(evt) {
-
+ diff --git a/application/views/editrequisitionform.php b/application/views/editrequisitionform.php index d5d5806e..b40a03f0 100644 --- a/application/views/editrequisitionform.php +++ b/application/views/editrequisitionform.php @@ -302,10 +302,8 @@ if(!empty($ReqPOType))
'otherD','value' => set_value('otherD'),'id'=>'otherD', 'class' => 'form-control' ,'rows' => '5', 'cols' => '70','maxlength' => '500'); echo Form_textarea($data); - ?>
@@ -372,7 +370,8 @@ if(!empty($ReqPOType)) ?>
-
+ +
+
@@ -417,18 +417,17 @@ if(!empty($ReqPOType))

- - +
+ - - + - + @@ -439,26 +438,23 @@ if(!empty($ReqPOType)) foreach($LineItem as $record) { $index = $index + 1; - $materialdesc=$record->MaterialDescription; + $materialdesc=$record->MaterialDescription; ?> - - + + - - - + @@ -482,8 +478,6 @@ if(!empty($ReqPOType)) -   Update @@ -533,9 +527,9 @@ $(function() { }).appendTo('form'); }); - - $('#otherDescription').hide(); - $('#EditotherDescription').hide(); + + $('#otherDescription').hide(); + $('#EditotherDescription').hide(); $( ".datePicker" ).datepicker({ dateFormat: 'dd/mm/yy' }); //Initialize Select2 Elements @@ -639,15 +633,15 @@ $('#drpMaterial').change(function() { var id = $('#drpMaterial').val(); + var value = $("#drpMaterial option:selected").text(); + answer = value.replace(/[^a-z]/gi, ''); + var converttext = answer.toUpperCase(); $("#Description").val(''); $("#UOM").val(''); -var value = $("#drpMaterial option:selected").text(); -answer = value.replace(/[^a-z]/gi, ''); -var converttext = answer.toUpperCase(); if(id != '-1') { if((converttext != 'SERVICE')) - { + { $('#content').loader('show'); $.ajax({ @@ -657,19 +651,20 @@ var converttext = answer.toUpperCase(); url:"requisitionform/getMaterialDetails", success:function(json) { $('#content').loader('hide'); - //alert(json.MatDetail); + //swal(json.MatDetail); $("#Description").val(json.MatDetail[0]['MaterialName']); $("#UOM").val(json.MatDetail[0]['UOM']); - } - }); - } - else - { - $('#otherDescription').show(); - } + } + + }); + } + + else + { + $('#otherDescription').show(); + } //$('#content').loader('hide'); } - else { swal('Please select the RequestType'); @@ -682,21 +677,16 @@ var converttext = answer.toUpperCase(); - + \ No newline at end of file diff --git a/application/views/forgotPassword.php b/application/views/forgotPassword.php index 0e52a211..ea6f9df7 100644 --- a/application/views/forgotPassword.php +++ b/application/views/forgotPassword.php @@ -2,61 +2,38 @@ - CodeInsect | Admin System Log in + Resico industries | Admin System Log in - - - - - diff --git a/application/views/inwardgateregister.php b/application/views/inwardgateregister.php index b4531949..bf12d7ac 100644 --- a/application/views/inwardgateregister.php +++ b/application/views/inwardgateregister.php @@ -63,10 +63,10 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
-


+


-
+
'form-label-left IGR ','name' => 'IGR','id' => 'IGR'); @@ -94,7 +94,7 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
-
+
+
'InvoiceNo','value' => set_value('InvoiceNo'),'id'=>'InvoiceNo', 'class' => 'form-control', 'required=>"true"','onkeypress'=>'return isNumberKey(event);' ); @@ -115,7 +115,7 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo")); echo form_input($data); ?>
-
+
'InvoiceDate','value' => set_value('InvoiceDate'),'id'=>'InvoiceDate', 'class' => 'form-control num', 'required'=>'true' ); @@ -123,8 +123,13 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo")); ?>
- -
+ +
+
+ +
+ +
'VehicleNo','value' => set_value('VehicleNo'), 'id'=>'VehicleNo', 'class' => 'form-control', ); @@ -132,18 +137,14 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo")); ?>
-
+
'CourierNo','value' => set_value('CourierNo'),'id'=>'CourierNo', 'class' => 'form-control','onkeypress'=>'return isNumberKey(event);' ); echo form_input($data); ?> -
-
-
- -
-
+
+
diff --git a/application/views/login.php b/application/views/login.php index b0a4c77a..1a12753b 100644 --- a/application/views/login.php +++ b/application/views/login.php @@ -68,7 +68,7 @@
- + Forgot Password
diff --git a/application/views/payslipgenerateprint.php b/application/views/payslipgenerateprint.php index 60b60e1b..1c1b8864 100755 --- a/application/views/payslipgenerateprint.php +++ b/application/views/payslipgenerateprint.php @@ -9,8 +9,9 @@ $DateofJoining = ''; $Designation = ''; $Departmentcode = ''; - $PANNo = ''; - $AadharNo=''; + //$PANNo = ''; + //$AadharNo=''; + $LoanIssuedDate=''; $BankAccountNo = ''; $IFSCCode =''; $BankBranchName = ''; @@ -66,6 +67,7 @@ if(!empty($CompanyDetails)) }} //echo $RecCount; +//print_r($PayDetails); if(!empty($PayDetails)) { foreach ($PayDetails as $Pay) @@ -87,8 +89,10 @@ if(!empty($PayDetails)) $DateofJoining = $dt ->format('d-m-Y'); $Designation = $Pay->Designation; - $PANNo =$Pay->Pan; - $AadharNo=$Pay->AadharNo; + //$PANNo =$Pay->Pan; + //$AadharNo=$Pay->AadharNo; + $LoanIssued = new DateTime($Pay->Loan_Issued_Date); + $LoanIssuedDate = $LoanIssued ->format('d-m-Y'); $BankAccountNo = $Pay->BankAccountNumber; $IFSCCode =$Pay->IFSCCode; $BankBranchName = $Pay->BankName; @@ -268,11 +272,17 @@ if($RecCount > 0)
- + + + + + +
SNo Material Code Material Name UomRequestedQuantityRequestedQuantity PoQuantity StatusActionAction
MaterialCode ; ?> MaterialName ; ?> UOM ; ?>Quantity ; ?> POQTY ; ?> StatusName ;?> + +     - - -
ESI Account Number
Loan Issued Date
diff --git a/application/views/purchaseorder.php b/application/views/purchaseorder.php index b1100083..3afdd957 100644 --- a/application/views/purchaseorder.php +++ b/application/views/purchaseorder.php @@ -2284,7 +2284,7 @@ function calculateEditTaxValue()
-
+
Select Tax Range
@@ -2433,7 +2433,7 @@ function calculateEditTaxValue()
- +
Address Contact Number Email Address - Excise Registration - TIN + PAN GST Number GST Range - UA Number + Payment Terms @@ -49,12 +49,12 @@ Address ?> ContactNumber ?> EmailAddress ?> - Exiseregistration ?> - TIN ?> + PAN ?> GSTNO ?> GSTRange ?> - UANumber ?> + PaymentTerms ?> diff --git a/uploads/images/user1-128x128.jpg b/uploads/images/user1-128x128.jpg old mode 100644 new mode 100755