code mergedpayroll change requirement completed

This commit is contained in:
venbatechnologies@gmail.com 2018-01-29 11:22:06 +05:30
parent 94c3a9327d
commit e54ab31105
28 changed files with 932 additions and 865 deletions

View File

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

View File

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

View File

@ -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']))
{

View File

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

View File

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

View File

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

View File

@ -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 = "<option value='-1'>Select Cost center</option>";
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 = "<option value='-1'>Select Cost center</option>";
$BudAmount = "";
if(count($CostList) > 0)
{
for ($j = 0; $j < count($CostList); $j++)
{
$Code = $CostList[$j]['CostCenterCode'];
$Name = $CostList[$j]['CostCenterName'];
$HTML .="<option value='".$Code."'>".$Code."-".$Name."</option>";
}
}
if(count($CostList) == 1)
if(count($CostList) > 0)
{
for ($j = 0; $j < count($CostList); $j++)
{
$Code = $CostList[$j]['CostCenterCode'];
$Name = $CostList[$j]['CostCenterName'];
$HTML .="<option value='".$Code."'>".$Code."-".$Name."</option>";
}
}
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 = "<option value='-1'>Select Material Type</option>";
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 .="<option value='".$Code."'>".$Code."-".$Name."</option>";
}
$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;$i<count($POType);$i++)
{
if($POType[$i]['POType'] == $ReqType)
@ -581,14 +575,14 @@ function ViewRequest()
{
$ReqPOType = $POType[$i]['POType'];
}
}
}
}
$RequestType='';
$RequestType= $ReqPOType =='' ? $ReqType:$ReqPOType;
$AvlBudget = array();
if($ReqType== CAPITAL&&$RequestType!=IMPORT )
{
$AvlBudget = $this->purchaseorder_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

View File

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

View File

@ -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 "<script>alert('New User Created successfully!');</script>";
redirect('userListing','refresh');
redirect('userListing','refresh');
echo "<script>alert('New User Created successfully!');</script>";
}
}
else
{
redirect('userListing','refresh');
echo "<script>alert('Failiure User Creation!');</script>";
echo "<script>alert('Failiure User Creation!');</script>";
}
}
//}
}
}
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);
}
}
?>
?>

View File

@ -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;
}
}
}
?>

View File

@ -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 != '')
{

View File

@ -92,7 +92,7 @@ class rawmaterialdetails_model extends CI_Model
function addNewRawMaterial($RawMaterial='')
{
print_r($RawMaterial);
$this->db->insert('T_MaterialMaster', $RawMaterial);
return TRUE;
}

View File

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

View File

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

View File

@ -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() {
</div>
<div class="col-md-12">
<div class="col-md-6 pad"><span>Personal Email ID</span><span class="badge">*</span>
<input type="email" name="emailid" id="emailid" required maxlength="100" class="form-control">
<div class="col-md-6 pad"><span>Personal Email ID</span><!--<span class="badge">*</span>-->
<input type="email" name="emailid" id="emailid" maxlength="100" class="form-control">
</div>
<div class="col-md-6 pad"><span>Gender</span><span class="badge">*</span>
@ -537,8 +538,8 @@ function validateESI() {
<div class="col-md-6 pad" style="padding: 10px 0px;">
<div class="col-md-6">
<span>Blood group</span><span class="badge">*</span>
<select id="bloodgroup" name="bloodgroup" required class="form-control select2">
<span>Blood group</span><!--<span class="badge">*</span>-->
<select id="bloodgroup" name="bloodgroup" class="form-control select2">
<option value="">Select Blood group</option>
<?php
if(!empty($BloodGroup))
@ -553,8 +554,8 @@ function validateESI() {
?>
</select>
</div>
<div class="col-md-6"><span>Marital Status</span><span class="badge">*</span>
<select id="MartialStatus" name="MartialStatus" type="text" required placeholder="Marital status" class="form-control select2">
<div class="col-md-6"><span>Marital Status</span><!--<span class="badge">*</span>-->
<select id="MartialStatus" name="MartialStatus" type="text" placeholder="Marital status" class="form-control select2">
<option value="">Select Marital Status</option>
<?php
if(!empty($Martial))
@ -573,30 +574,29 @@ function validateESI() {
</div>
</div>
</div>
<!-- Address Section -->
<!-- Form Name -->
<legend>Address Details</legend>
<!-- Text input-->
<div class="col-md-12 pad">
<div class="col-md-12"><span>Current Address</span><span class="badge">*</span>
<div class="col-md-12"><span>Address</span><span class="badge">*</span>
<input type="text" id="currentaddress" required name="currentaddress" pattern=".{0,500}" maxlength="500" class="form-control">
</div>
</div>
<div class="col-md-12 pad">
<!-- <div class="col-md-12 pad">
<div class="col-md-10">
<input type="checkbox" id="checksame" name="sameaddress" onclick="CheckClick"> Current address same as permanent address
</div>
</div>
</div>-->
<!-- Text input-->
<div class="col-md-12 pad">
<!--<div class="col-md-12 pad">
<div class="col-md-12"><span>Permanent Address</span><span class="badge">*</span>
<input type="text" id="permanentaddress" required name="permanentaddress" pattern=".{0,500}" maxlength="500" class="form-control">
</div>
</div>
<!-- Text input-->
</div> -->
<!-- Text input-->
@ -605,11 +605,11 @@ function validateESI() {
<legend>Emergency Contact Information</legend>
<!-- Text input-->
<div class="col-md-12 pad">
<div class="col-md-6"><span>Emergency Contact Name</span><span class="badge">*</span>
<input type="text" id="emergencycontactname" onkeypress="return onlyAlphabets(event);" maxlength="100" required name="emergencycontactname" class="form-control">
<div class="col-md-6"><span>Emergency Contact Name</span><!--<span class="badge">*</span>-->
<input type="text" id="emergencycontactname" onkeypress="return onlyAlphabets(event);" maxlength="100" name="emergencycontactname" class="form-control">
</div>
<div class="col-md-6"><span>Emergency Contact Number</span><span class="badge">*</span>
<input type="text" id="emergencycontactnumber" name="emergencycontactnumber" onchange="return getValidEmergencyNumber();" required pattern="(.){10,10}" maxlength="10" class="form-control" onkeypress="return isNumberKey(event)">
<div class="col-md-6"><span>Emergency Contact Number</span><!--<span class="badge">*</span>-->
<input type="text" id="emergencycontactnumber" name="emergencycontactnumber" onchange="return getValidEmergencyNumber();" pattern="(.){10,10}" maxlength="10" class="form-control" onkeypress="return isNumberKey(event)">
</div>
</div>
@ -732,12 +732,12 @@ function validateESI() {
<!-- Text input-->
<div class="col-md-12 pad">
<div class="col-md-3"><span>Aadhar Number</span>
<!-- <div class="col-md-3"><span>Aadhar Number</span>
<input type="text" id="aadharno" name="aadharno" maxlength="14" onchange="ValidateAadhar();" class="form-control" onkeypress="return isNumberKey(event)">
</div>
<div class="col-md-3"><span>PAN Number</span>
<input type="text" id="panno" maxlength="10" style="text-transform:uppercase" name="panno" onchange="validatePAN();" class="form-control" pattern="([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}" title=" 5 character,4 Digit Numbers,1 character (ex:ABCDE1234A) " onkeypress="return alpha(event);">
</div>
</div> -->
<div class="col-md-3"><span>Passport Number</span>
<input type="text" id="passportno" maxlength="9" onchange="ValidatePassport();" name="passportno" style="text-transform:uppercase" class="form-control" pattern="[aA-prPR-wyWY]{1}[1-9]{1}\d{1}\s\d{4}[1-9]{1}" title="The first digit or the last digit will never be 0
The first character cannot be Q, X or Z. (eg:A12 34567)" onkeypress="return alpha(event);">
@ -745,17 +745,18 @@ function validateESI() {
<div class="col-md-3"><span>Passport Expiry Date</span>
<input id="ValidTill" name="ValidTill" onkeypress="return false;" maxlength="10" class="form-control">
</div>
</div>
<!-- </div>
<div class="col-md-12 pad">
<div class="col-md-12 pad">
<div class="col-md-3"><span>Voter ID</span>
<input type="text" id="VoterID" name="voterID" maxlength="12" class="form-control" style="text-transform: uppercase" >
</div>
</div>-->
<div class="col-md-3"><span>Driving License</span>
<input type="text" id="Driverlicense" onchange="validateDriverLicense();" style="text-transform:uppercase" pattern="[a-zA-Z]{2}[0-9]{2}\s[0-9]{11}" title="EX:TN82 12345678900" maxlength="16" name="driverlicense" class="form-control" onkeypress="return alpha(event);">
</div>
<div class="col-md-3"><span>Driving License Expiry Date</span>
<div class="col-md-3"><span>Driving License Expiry Date</span>
<input id="LicenseExpiryDate" name="licenseExpiryDate" onkeypress="return false;" maxlength="10" class="form-control">
</div>
@ -785,9 +786,22 @@ function validateESI() {
<!-- <textarea id="nomineename" name="nomineename" maxlength="255" class="form-control" rows="3" cols="50"></textarea> -->
</div>
</div>
<legend>Multiple File</legend>
<div class="col-md-12 pad table-repsonsive" id="file_div">
<table class="table table-bordered" id="item_table">
<tr>
<th>Upload your files</th>
<th>Select your id</th>
<th><button type="button" id="addbtn" name="add" class="btn btn-success btn-sm add"><span class="glyphicon glyphicon-plus"></span></button></th>
</tr>
</table>
</div>
<!-- <input type="submit" name="submit_file" value="SUBMIT"> -->
</div>
<!-- Command -->
<div class="col-md-12 pad">
@ -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:"<?php echo base_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:"<?php echo base_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:"<?php echo base_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:"<?php echo base_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()
}
});
</script>
<script>
$("#addbtn").click(function () {
var counter = 0;
if(counter <= 2){
var html = '';
html += '<tr>';
html += '<td><input type="file" name="browseFiles[]" onchange="readURL(this)" class="form-control" /></td>';
html += '<td><select name="ddName[]" class="form-control"><option value="default">Select ID Name</option><option value="pan">Pan Card</option><option value="aadhar">Aadhar card</option><option value="voter">Voter ID Card</option></select></td>';
html += '<td><button type="button" id="removebtn" name="remove" class="btn btn-danger btn-sm remove"><span class="glyphicon glyphicon-minus"></span></button></td></tr>';
$('#item_table').append(html); }
counter++;
});
$(document).on('click','.remove',function() {
//alert('removebtn');
$(this).closest('tr').remove();
});
</script>
</script>

View File

@ -404,19 +404,19 @@ $(function() {
<div class="col-md-3 pad">
<span for="PAN">PAN</span> <!--<span class="badge">*</span>-->
<input type="text" id="panno" maxlength="10" pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}" name="panno" style="text-transform:uppercase;" onchange="validatePAN();" class="form-control" title="Please Enter 5 Character and 4 digit numbers and 1 Character format (Character should be in caps)" onkeypress="return alpha(event)" style="text-transform: uppercase"> </div>
<div class="col-md-3 pad">
<span for="TIN">TIN</span><!--<span class="badge">*</span>-->
<!-- <div class="col-md-3 pad">
<span for="TIN">TIN</span><span class="badge">*</span>
<input type="text" class="form-control" pattern="(.){11,11}" id="TIN" name="TIN" minlength="11" maxlength="11" onkeypress="return isNumberKey(event)" title="Please Enter 11 digit Number">
</div>
<div class="col-md-3 pad">
<div class="col-md-3 pad">
<span for="UANumber">UA Number</span>
<!-- <input type="text" class="form-control" id="UANumber" name="UANumber" maxlength="15" title="Please Enter Valid UA Number" onkeypress="return alpha(event)" > -->
<input type="text" class="form-control" id="UANumber" name="UANumber" onchange="validateUA();" maxlength="15" pattern="([a-zA-Z]){5}([0-9]){10}" title="Please Enter Valid UA Number" onkeypress="return alpha(event)" style="text-transform: uppercase">
</div>
<div class="col-md-3 pad">
<span for="Exciseregistration">Excise Registration</span>
<!-- <input type="text" class="form-control required" onchange="validateECCNumber();" id="Exciseregistration" name="Exciseregistration" minlength="15" maxlength="15" pattern="([A-Za-z]){5}[0-9]){4}([A-Za-z]){3}([0-9]){3}" title="Please enter PAN Number and EM/ED option and 3 digit Numbers format" style="text-transform:uppercase;"> -->
<input type="text" class="form-control required" onchange="validateECCNumber();" id="Exciseregistration" name="Exciseregistration" minlength="15" maxlength="15" pattern="([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}([a-zA-Z]){2}([0-9]){3}" title="Please enter PAN Number and EM/ED option and 3 digit Numbers format" style="text-transform:uppercase;">
</div>
</div>
@ -427,7 +427,7 @@ $(function() {
</div>
<div class="col-md-3 pad"><span>CST Registration Date</span>
<input id="dateofCST" name="dateofCST" onkeypress="return false;" maxlength="10" class="form-control">
</div>
</div>-->
<div class="col-md-3 pad">
<span for="GSTNo">GST Number</span><!--<span class="badge">*</span> -->
<input type="text" id="GSTNo" name="GSTNo" class="form-control" maxlength="15" onchange="validateGST();" style="text-transform:uppercase;" pattern="([0-9]){2}([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}([0-9]){1}([Zz]){1}([A-Za-z0-9]){1}" title="Please Enter 2 Digit Number and 5 Character and 4 Digit Numbers and 1 Character and 1 Number and 'Z' and 1 Number or Character" onkeypress="return alpha(event)">
@ -437,10 +437,10 @@ $(function() {
<input type="text" class="form-control " id="GSTRange" name="GSTRange" maxlength="15">
</div>
<!-- Text input-->
<div class="col-md-6 pad"><span for="CollectrateAddress">Collectrate Address</span>
<!-- <div class="col-md-6 pad"><span for="CollectrateAddress">Collectrate Address</span>
<input type="text" class="form-control " id="CollectrateAddress" name="CollectrateAddress" maxlength="500" >
</div>
-->
</div>
<!-- Text input-->
<legend>Certification Details</legend>

File diff suppressed because one or more lines are too long

View File

@ -722,7 +722,7 @@ function ValidateUA() {
<legend>Upload File</legend>
<div class="col-md-12 pad">
<div class="col-md-3"><span>File Description</span>
<select class="form-control required" id="filedescription" name="filedescription">
<option value="CERTIFICATION" >Select File Type</option>
<?php

View File

@ -1,9 +1,9 @@
<?php
$EmpID = '';
$FirstName = '';
$LastName = '';
$FatherName ='';
$FirstName = '';
$LastName = '';
$FatherName ='';
$Gender ='';
$DateofBirth = '';
$ContactNumber ='';
@ -77,8 +77,9 @@ if(!empty($EmpDetails))
$EmergencyContactNumber = $Emp->EmergencyContactNumber;
$Edu_Qualification = $Emp->Edu_Qualification;
$Additional_Qualification = $Emp->Additional_Qualification;
$AadharNo = $Emp->AadharNo;
$PANNo = $Emp->PANNo;
$AadharNo = $Emp->AadharNo;
$PANNo = $Emp->PANNo;
$BankAccountNo = $Emp->BankAccountNo;
$IFSCCode = $Emp->IFSCCode;
$BankBranchName = $Emp->BankBranchName;
@ -102,7 +103,13 @@ if(!empty($EmpDetails))
$Remarks = $Emp->Remarks;
$personalEmailId = $Emp->personalEmailId;
$DriverLicense = $Emp->DriverLicense;
$VoterID = $Emp->VoterID;
$VoterID = $Emp->VoterID;
echo $AadharNo.$PANNo.$VoterID;
// print_r (explode("-",$AadharNo));
// print_r (explode("-",$PANNo));
// print_r (explode("-",$VoterID));
$pfno = $Emp->PFNO;
$esino = $Emp->ESI;
$nominee=$Emp->NomineeDetails;
@ -331,19 +338,19 @@ function Validate()
return;
}
if($("option:selected", $("#MartialStatus")).val() == "-1")
{
swal('Please Select Martial Status');
$('#MartialStatus').focus();
return;
}
// if($("option:selected", $("#MartialStatus")).val() == "-1")
// {
// swal('Please Select Martial Status');
// $('#MartialStatus').focus();
// return;
// }
if($("option:selected", $("#bloodgroup")).val() == "-1")
{
swal('Please Select Blood group ');
$("#bloodgroup").focus();
return;
}
// if($("option:selected", $("#bloodgroup")).val() == "-1")
// {
// swal('Please Select Blood group ');
// $("#bloodgroup").focus();
// return;
// }
if($("#currentaddress").val().length < 1)
{
swal('Please Enter Current Address');
@ -1093,9 +1100,21 @@ function onlyAlphabets(evt) {
<!-- rows="3" cols="50" -->
</div>
</div>
<legend>Multiple File</legend>
<div class="col-md-12 pad table-repsonsive" id="file_div">
<table class="table table-bordered" id="item_table">
<tr>
<th>Upload your files</th>
<th>Select your id</th>
<th><button type="button" id="addbtn" name="add" class="btn btn-success btn-sm add"><span class="glyphicon glyphicon-plus"></span></button></th>
</tr>
</table>
</div>
<!-- <input type="submit" name="submit_file" value="SUBMIT"> -->
</div>
<!-- Command -->
@ -1247,4 +1266,18 @@ function onlyAlphabets(evt) {
}
});
$("#addbtn").click(function () {
var html = '';
html += '<tr>';
html += '<td><input type="file" name="browseFiles[]" onchange="readURL(this)" class="form-control" /></td>';
html += '<td><select name="ddName[]" class="form-control"><option value="default">Select ID Name</option><option value="pan">Pan Card</option><option value="aadhar">Aadhar card</option><option value="voter">Voter ID Card</option></select></td>';
html += '<td><button type="button" id="removebtn" name="remove" class="btn btn-danger btn-sm remove"><span class="glyphicon glyphicon-minus"></span></button></td></tr>';
$('#item_table').append(html);
});
$(document).on('click','.remove',function() {
//alert('removebtn');
$(this).closest('tr').remove();
});
</script>

View File

@ -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) {
<!-- <input type="text" id="panno" maxlength="10" name="panno" pattern="(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]}).{1,}" onchange="validatePAN();" class="form-control" value="<?php echo $PAN;?>" title="Please Enter 5 Character and 4 digit numbers and 1 Character format (Character must be in caps format)" onkeypress="return alpha(event)" style="text-transform:uppercase;"> -->
<input type="text" id="panno" maxlength="10" name="panno" onchange="validatePAN();" class="form-control" value="<?php echo $PAN;?>" title="Please Enter 5 Character and 4 digit numbers and 1 Character format (Character must be in caps format)" pattern="([A-Za-z]){5}([0-9]){4}([A-Za-z]){1}" onkeypress="return alpha(event)" style="text-transform:uppercase;">
</div>
<div class="col-md-3 pad">
<span for="TIN">TIN</span><!--<span class="badge">*</span>-->
<input type="text" class="form-control" value="<?php echo $TIN;?>" pattern="(.){11,11}" id="TIN" name="TIN" minlength="11" maxlength="11" onkeypress="return isNumberKey(event)" title="Please Enter 11 digit Number">
<!-- <div class="col-md-3 pad">
<span for="TIN">TIN</span>
<input type="text" class="form-control" value="<?php echo $TIN;?>" pattern="(.){11,11}" id="TIN" name="TIN" minlength="11" maxlength="11" onkeypress="return isNumberKey(event)" title="Please Enter 11 digit Number">
</div>
<div class="col-md-3 pad">
<span for="UANumber">UA Number</span>
@ -511,7 +511,7 @@ function onlyAlphabets(evt) {
<div class="col-md-3 pad">
<span for="Exciseregistration">Excise Registration</span>
<!-- <input type="text" class="form-control required" onchange="validateECCNumber();" id="Exciseregistration" name="Exciseregistration" minlength="15" maxlength="15" value="<?php echo $Exiseregistration;?>" style="text-transform:uppercase;" title="Please enter PAN Number and EM/ED option and 3 digit Numbers format" pattern="(?=.*[A-Z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Z]).{1,}(?=.*[A-Z]).{2,}(?=.*[0-9]).{3,}"> -->
<input type="text" class="form-control required" onchange="validateECCNumber();" id="Exciseregistration" name="Exciseregistration" minlength="15" maxlength="15" value="<?php echo $Exiseregistration;?>" style="text-transform:uppercase;" title="Please enter PAN Number and EM/ED option and 3 digit Numbers format" pattern="([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}([a-zA-Z]){2}([0-9]){3}">
</div>
</div>
@ -523,7 +523,7 @@ function onlyAlphabets(evt) {
</div>
<div class="col-md-3 pad"><span>CST Registration Date</span>
<input id="dateofCST" name="dateofCST" value="<?php echo $CSTDate;?>" onkeypress="return false;" maxlength="10" class="form-control">
</div>
</div> -->
<div class="col-md-3 pad">
<span for="GSTNo">GST Number</span><!--<span class="badge">*</span>-->
<!-- <input type="text" id="GSTNo" name="GSTNo" onchange="validateGST();" required maxlength="15" class="form-control" value="<?php echo $GSTNO;?>" pattern="(?=.*[0-9]).{2}(?=.*[A-Za-z]).{5}(?=.*[0-9]).{4}(?=.*[A-Za-z]).{1}(?=.*[0-9]).{1}(?=.*[Zz]).{1}(?=.*[A-Za-z0-9]).{1}" style="text-transform:uppercase;" title="Please Enter 2 Digit Number and 5 Character and 4 Digit Numbers and 1 Character and 1 Number and 'Z' Character and 1 Number (or) Character " onkeypress="return alpha(event)"> -->
@ -535,12 +535,12 @@ function onlyAlphabets(evt) {
<input type="text" class="form-control " id="GSTRange" value="<?php echo $GSTRange;?>" name="GSTRange" maxlength="10">
</div>
</div>
<div class="col-md-12">
<!-- <div class="col-md-12">
<div class="col-md-6 pad"><span for="CollectrateAddress">Collectrate Address</span>
<input type="text" class="form-control " id="CollectrateAddress" value="<?php echo $CollectrateAddress;?>" name="CollectrateAddress" maxlength="500" >
</div>
</div>
-->
<!-- Text input-->

View File

@ -302,10 +302,8 @@ if(!empty($ReqPOType))
<label>Other Description</label>
<div class="form-group">
<?php
$data = array('name' => 'otherD','value' => set_value('otherD'),'id'=>'otherD', 'class' => 'form-control' ,'rows' => '5', 'cols' => '70','maxlength' => '500');
echo Form_textarea($data);
?>
</div>
</div>
@ -372,7 +370,8 @@ if(!empty($ReqPOType))
?>
</div>
</div>
<div class="col-md-6" id="EditotherDescription">
<div class="col-md-6" id="EditotherDescription">
<label>Other Description</label>
<div class="form-group">
<?php
@ -382,6 +381,7 @@ if(!empty($ReqPOType))
</div>
</div>
<div class="col-md-6">
<label>UOM</label>
<div>
@ -417,18 +417,17 @@ if(!empty($ReqPOType))
</div></br>
<table id="Items" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color:#ddf">
<table id="Items" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color:#ddf">
<tr>
<th>SNo</th>
<th>Material Code</th>
<th>Material Name</th>
<th>Uom</th>
<th>RequestedQuantity</th>
<th>RequestedQuantity</th>
<th>PoQuantity</th>
<th>Status</th>
<th>Action</th>
<th>Action</th>
</tr>
</thead>
<tbody id="tempAppend">
@ -439,26 +438,23 @@ if(!empty($ReqPOType))
foreach($LineItem as $record)
{
$index = $index + 1;
$materialdesc=$record->MaterialDescription;
$materialdesc=$record->MaterialDescription;
?>
<tr id="<?php echo $index ; ?>">
<td align="left"><?php echo $index ; ?></td>
<tr id="<?php echo $index ; ?>">
<td align="left"><?php echo $index ; ?></td>
<input type="hidden" name="<?php echo 'te'.$index ?>" id="<?php echo 'te'.$index ?>" value="<?php echo $record->MaterialCode ; ?>" />
<input type="hidden" name="<?php echo 'te'.$index ?>" id="<?php echo 'tes'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
<td align="left"><?php echo $record->MaterialCode ; ?></td>
<td align="left"><?php echo $record->MaterialName ; ?></td>
<td align="left"><?php echo $record->UOM ; ?></td>
<td align="left"><?php echo $record->Quantity ; ?></td>
<td align="left"><?php echo $record->POQTY ; ?></td>
<td align="left"><?php echo $record->StatusName ;?></td>
<input type="text" name="<?php echo 'materialdesc'.$index ?>" id="<?php echo 'materialdesc'.$index ?>" value="<?php echo $record->MaterialDescription ; ?>" />
<td>
<input type="hidden" name="<?php echo 'materialdesc'.$index ?>" id="<?php echo 'materialdesc'.$index ?>" value="<?php echo $record->MaterialDescription ; ?>" />
<td>
<a data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-target='#EditItem' data-toggle="modal" href="#EditItem"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->MaterialCode ; ?> Material details"></i>&nbsp;&nbsp;&nbsp;</a> <a onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $record->MaterialCode ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
</td>
</td>
</tr>
<?php $RowCount = $index; }
?>
@ -482,8 +478,6 @@ if(!empty($ReqPOType))
<?php }
else if($Status == REQ_PENDING_APPROVAL)
{?>
<!--<a class="btn btn-primary" ID="update" onclick="update()" >&nbsp;&nbsp;<span class="bold">Update</span></a>
<a class="btn btn-primary" href="<?php echo base_url(); ?>Requisition" ID="cancel">&nbsp;&nbsp;<span class="bold">Cancel</span></a> -->
<a class="btn btn-primary Save" ID="submit" onclick="Save(1)" >&nbsp;&nbsp;<span class="bold">Update</span></a>
<input type="reset" class="btn btn-primary">
<?php } ?>
@ -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:"<?php echo base_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();
</script>
<script type="text/html" id="tempList">
<tr id="<%=index%>">
<td align="left"><%=index%></td>
<td align="left"><%=index%></td>
<td align="left"><%=MaterialCode%></td>
<td align="left"><%=MaterialName%></td>
<td align="left"><%=UOM%></td>
<td align="left"><%=MaterialName%></td>
<td align="left"><%=UOM%></td>
<td align="left"><%=Quantity%></td>
<td align="left">0.00</td>
<td align="left">NEW</td>
<td>
<a data-target='#EditItem' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EditItem"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=MaterialCode%> Material details"></i>&nbsp;&nbsp;&nbsp;</a> <a href='#' onclick = "DeleteRow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
</td>
<td>
<a data-target='#EditItem' data-id="<%=index%>" data-userid="<%=index%>" data-toggle="modal" href="#EditItem"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <%=MaterialCode%> Material details"></i>&nbsp;&nbsp;&nbsp;</a> <a href='#' onclick = "DeleteRow(<%=index%>)" class="link" data-id="<%=index%>" data-userid="<%=index%>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
</td>
</tr>
</script>
<script>
@ -705,7 +695,7 @@ var userid = '';
function removeHiddenRows(rowcount)
{
var step;
//alert(rowcount);
//swal(rowcount);
for (step = 1; step < rowcount-1; step++) {
var td = document.getElementById(step);
td.parentNode.removeChild(td);
@ -730,7 +720,7 @@ else
{
stat = '<?php echo REQ_PENDING_APPROVAL; ?>';
}
//alert($('#MaterialCode4').val());
//swal($('#MaterialCode4').val());
if(validate())
{
@ -742,7 +732,7 @@ else
}
else
{
//alert(document.getElementById('Items').rows.length);
//swal(document.getElementById('Items').rows.length);
$('#content').loader('show');
$('#txtStatus').val(stat);
@ -824,7 +814,7 @@ function DeleteRow(rowid)
var tr= document.getElementById(rowid);
var cellval = tr.cells;
var MaterialCode = cellval[1].innerHTML;
// alert(cellval[1].innerHTML);
// swal(cellval[1].innerHTML);
id[0] = $('#txtReqNo').val();
id[1] = MaterialCode;
var answer = confirm(" Do you want to delete the Item from the List?")
@ -834,8 +824,8 @@ function DeleteRow(rowid)
var x = <?php echo json_encode($LineItem, JSON_PRETTY_PRINT) ?>;
var result = '0';
//alert(x);
//alert(MaterialCode);
//swal(x);
//swal(MaterialCode);
if(MaterialCode != "0")
{
$.each(x, function(idx, obj) {
@ -923,26 +913,30 @@ $('.addClick').click(function(){
var materialName = $("#Description").val();
var uom = $("#UOM").val();
var quantity = $("#Quantity").val();
var materialdescription= $('#otherD').val();
$('#drpMaterial option[value='+materialCode+']').remove();
$('#Description').val('');
$('#UOM').val('');
$('#Quantity').val('');
$('#otherD').val('')
$('#drpMaterial option[value='+materialCode+']').remove();
$('#Description').val('');
$('#UOM').val('');
$('#Quantity').val('');
$('#otherD').val('')
index = parseInt(index)+1;
var template = jQuery("#tempList").html();
if(materialdescription == '')
if(materialdescription == '')
{
$('#tempAppend').append(_.template(template,{index:temp,MaterialCode:materialCode,MaterialName:materialName,UOM:uom,Quantity:quantity}));
}
$('#tempAppend').append(_.template(template,{index:temp,MaterialCode:materialCode,MaterialName:materialName,UOM:uom,Quantity:quantity}));
}
else
{
{
$('#tempAppend').append(_.template(template,{index:temp,MaterialCode:materialCode,MaterialName:materialdescription,UOM:uom,Quantity:quantity}));
}
}
var theForm = $(".requistion");
@ -978,14 +972,14 @@ $('.addClick').click(function(){
name: 'Quantity'+ temp,
value:quantity
}).appendTo('form');
$('<input>').attr({
type: 'hidden',
id: 'otherD' + temp,
name: 'otherD'+ temp,
value:materialdescription
}).appendTo('form');
$('#txtRowCount').val(temp);
}
@ -1010,28 +1004,45 @@ $("#myModal1").on("shown.bs.modal", function(e) {
$("#EditItem").on("shown.bs.modal", function(e) {
userid = $(e.relatedTarget).data('userid');
// alert(userid);
//swal(userid);
var tr= document.getElementById(userid);
var cellval = tr.cells;
var check=cellval[2].innerHTML;
var upcheck= check.toUpperCase();
var decs= $('#materialdesc'+userid).val();
if(upcheck=='SERVICE')
{
$('#EditotherDescription').show();
$('#EditotherD').val(decs);
}
else
{
$('#EditotherDescription').hide();
$('#EditotherD').val('')
}
//alert(x[1].innerHTML);
//var desc=cellval[2].innerHTML;
var check=cellval[2].innerHTML;
var upcheck= check.toUpperCase();
// var decs= <?php echo json_encode($materialdesc, JSON_PRETTY_PRINT) ?>;
//swal(decs)
//var desc= cellval[8].innerHTML
//swal(desc)
var decs= $('#materialdesc'+userid).val();
// swal(upcheck)
if(upcheck=='SERVICE')
{
$('#EditotherDescription').show();
$('#EditotherD').val(decs)
}
else
{
$('#EditotherDescription').hide();
$('#EditotherD').val('')
}
//swal(x[1].innerHTML);
$('#EditMaterialCode').val(cellval[1].innerHTML);
$('#EditDescription').val(cellval[2].innerHTML);
$('#EditUOM').val(cellval[3].innerHTML);
$('#EditQuantity').val(cellval[4].innerHTML);
});
$('.EditClick').click(function(){
@ -1056,7 +1067,6 @@ $('.EditClick').click(function(){
cellval[3].innerHTML =editUOM;
cellval[4].innerHTML = editQuantity;
$('#MaterialCode'+userid).val(editMaterialCode);
$('#Description'+userid).val(editDescription);
$('#UOM'+userid).val(editUOM);
@ -1091,5 +1101,4 @@ document.getElementById('NoServices').style.display = 'none';
}
});
</script>
</script>

View File

@ -2,61 +2,38 @@
<html>
<head>
<meta charset="UTF-8">
<title>CodeInsect | Admin System Log in</title>
<title>Resico industries | Admin System Log in</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<link href="<?php echo base_url(); ?>assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="<?php echo base_url(); ?>assets/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="login-page">
<div class="login-box">
<div class="login-logo">
<a href="#"><b>Resico Industries</b><br>Admin System</a>
<a href="#"><b>Resico industries</b><br></a>
</div><!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg">Forgot Password</p>
<?php $this->load->helper('form'); ?>
<div class="row">
<div class="col-md-12">
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
</div>
</div>
<?php
$this->load->helper('form');
$error = $this->session->flashdata('error');
if($error)
{
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo $this->session->flashdata('error'); ?>
</div>
<?php } ?>
<form action="<?php echo base_url(); ?>loginMe" method="post">
<form action="<?php echo base_url(); ?>resetPasswordUser" method="post">
<div class="form-group has-feedback">
<input type="email" class="form-control" placeholder="Email" name="email" required />
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
<!-- <input type="email" name="login_email" required /> -->
<input type="text" class="form-control" placeholder="Mobile Number" name ="phno" id= "phno" maxlength="10" onkeypress="return isNumberKey(event)">
<span class="glyphicon glyphicon glyphicon-phone form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-8">
</div><!-- /.col -->
<div class="col-xs-4">
<input type="submit" class="btn btn-primary btn-block btn-flat" value="Sign In" />
<input type="submit" class="btn btn-primary btn-block btn-flat" value="Submit" />
</div><!-- /.col -->
</div>
</form>
<a href="<?php echo base_url() ?>">Login</a><br>
</div><!-- /.login-box-body -->
</div><!-- /.login-box -->
<script src="<?php echo base_url(); ?>assets/js/jQuery-2.1.4.min.js"></script>
<script src="<?php echo base_url(); ?>assets/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
</body>

View File

@ -63,10 +63,10 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
<div style="border:2px solid #333;">
<div class="row"><br/><br/>
<div><br/><br/>
<div id="content" > </div>
<div class="col-md-12">
<div class="col-md-2">
<div class="col-md-3">
<?php
$attributes = array('class' => '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"));
</div>
<div class="col-md-2">
<div class="col-md-3">
<label>Supplier Name </label>
<div class="form-group">
<?php
@ -107,7 +107,7 @@ Inputmask("A{2,3} 9{1,2} A{1,2} 9{4}").mask($("#VehicleNo"));
<div class="col-md-2">
<div class="col-md-3">
<label>Delivery Challan/Inv No</label>
<?php
$data = array('name' => '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);
?>
</div>
<div class="col-md-2">
<div class="col-md-3">
<label>Delivery Challan/Inv Date</label>
<?php
$data = array('name' => '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"));
?>
</div>
<div class="col-md-2">
</div>
</div>
<div class="col-md-12">
<div class="col-md-3">
<label>Vechicle No</label>
<?php
$data = array('name' => '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"));
?>
<span pattern="" required="true"></span>
</div>
<div class="col-md-2">
<div class="col-md-3">
<label>Courier No</label>
<?php
$data = array('name' => 'CourierNo','value' => set_value('CourierNo'),'id'=>'CourierNo', 'class' => 'form-control','onkeypress'=>'return isNumberKey(event);' );
echo form_input($data);
?>
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-offset-4">
</div>
<div class="col-md-6">
<div class="box-header">
<input type="file" accept=".png,.jpg,.pdf" onchange="readURL(this);" id="myfile" name="myfile" />

View File

@ -68,7 +68,7 @@
</div>
</form>
<!-- <a href="<?php echo base_url() ?>forgotPassword">Forgot Password</a><br> -->
<a href="<?php echo base_url() ?>forgotPassword">Forgot Password</a><br>
</div><!-- /.login-box-body -->
</div><!-- /.login-box -->

View File

@ -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)
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">ESI Account Number </td>
<td style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"> <?php echo ':&nbsp;'.$ESInumber ?></td>
</tr>
<tr>
<!-- <tr>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">PAN Number </td>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ':&nbsp;'.$PANNo;?> </td>
<td width="50px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Aadhar Number </td>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ':&nbsp;'.$AadharNo;?></td>
</tr> -->
<tr>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo '&nbsp;' ?></td>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo '&nbsp;' ?></td>
<td width="50px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;">Loan Issued Date</td>
<td width="100px;" style="border-left: 0px ;border-bottom: 0px; border-right: 0px ;border-top: 0px ;"><?php echo ':&nbsp;'.$LoanIssuedDate;?></td>
</tr>
</tbody>
</table>

View File

@ -2284,7 +2284,7 @@ function calculateEditTaxValue()
</div>
<div class="col-md-2" style="padding: 0px;">
<div id="div1" style="display:block;">
<div id="div1" style="display:block;font-size:11px;">
<b><u>Select Tax Range</u></b><br/>
<tr>
<td>
@ -2433,7 +2433,7 @@ function calculateEditTaxValue()
<div class="col-md-6" style="padding: 0px;">
<label>Revenue Type Options<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label>
<label>Revenue Options<span class="badge" style="color:red;text-align:right;background-color: #fff;">*</span></label>
<div class="form-group">
<?php

View File

@ -26,12 +26,12 @@
<th>Address</th>
<th>Contact Number</th>
<th>Email Address</th>
<th>Excise Registration</th>
<th>TIN</th>
<!-- <th>Excise Registration</th>
<th>TIN</th> -->
<th>PAN</th>
<th>GST Number</th>
<th>GST Range</th>
<th>UA Number</th>
<!-- <th>UA Number</th> -->
<th>Payment Terms</th>
</tr>
@ -49,12 +49,12 @@
<td><?php echo $record->Address ?></td>
<td><?php echo $record->ContactNumber ?></td>
<td><?php echo $record->EmailAddress ?></td>
<td><?php echo $record->Exiseregistration ?></td>
<td><?php echo $record->TIN ?></td>
<!-- <td><?php echo $record->Exiseregistration ?></td>
<td><?php echo $record->TIN ?></td> -->
<td><?php echo $record->PAN ?></td>
<td><?php echo $record->GSTNO ?></td>
<td><?php echo $record->GSTRange ?></td>
<td><?php echo $record->UANumber ?></td>
<!-- <td><?php echo $record->UANumber ?></td> -->
<td><?php echo $record->PaymentTerms ?></td>
</tr>

0
uploads/images/user1-128x128.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB