Payslip Production changes

This commit is contained in:
gandhimathi Bharathirajan 2017-04-27 15:49:26 +05:30
parent e6c116b6eb
commit 8006f335c6
2 changed files with 33 additions and 28 deletions

View File

@ -122,7 +122,8 @@ function getEmployee()
if($All != '')
{
$result = $this->payroll_model->getEmpAll();
$result = $this->payroll_model->getEmpAll($Payon);
if($result > 0 )
{
for($i=0;$i <count($result) ;$i++ )
@ -149,8 +150,7 @@ function getEmployee()
}
$php = $this->output->get_output();
$php = $this->output->get_output();
// Load library
$this->load->library('dompdf_gen');
@ -166,7 +166,7 @@ function getEmployee()
require_once(APPPATH .'third_party/dompdf/dompdf_config.inc.php');
$dompdf = new DOMPDF();
//$dompdf->set_paper('A4', 'landscape');
$dompdf->set_paper('A4', 'portrait');
$dompdf->load_html($php);
$dompdf->render();
@ -235,7 +235,7 @@ function getEmployee()
$i = 8;
$dt = $sheet->getCell('Payon')->getValue();
$dt = $sheet->getCell('PayOn')->getValue();
$stringDate = PHPExcel_Style_NumberFormat::toFormattedString($dt, 'YYYY-MM-DD');
$date = new DateTime($stringDate);
$PayOn = $date->format('m-Y');
@ -266,34 +266,35 @@ function getEmployee()
$ESInumber = $sheet->getCell('G'.$x)->getValue();
$UAnumber = $sheet->getCell('H'.$x)->getValue();
$NoOfWorkingdays = $sheet->getCell('J'.$x)->getValue();
$ActualSalary = $sheet->getCell('K'.$x)->getValue();
$PerDaySalary = $sheet->getCell('L'.$x)->getCalculatedValue();
$WorkedSalary =$sheet->getCell('M'.$x)->getCalculatedValue();
$BasicAndDA =$sheet->getCell('N'.$x)->getCalculatedValue();
$HRA =$sheet->getCell('O'.$x)->getCalculatedValue();
$OTWages = $sheet->getCell('P'.$x)->getCalculatedValue();
$OTPerHours =$sheet->getCell('Q'.$x)->getValue();
$OTSalary =$sheet->getCell('R'.$x)->getCalculatedValue();
$GrosssSalary =$sheet->getCell('S'.$x)->getCalculatedValue();
$ESI = $sheet->getCell('T'.$x)->getCalculatedValue();
$PF =$sheet->getCell('U'.$x)->getCalculatedValue();
$ESIAndPF = $sheet->getCell('V'.$x)->getCalculatedValue();
$SalaryAsPerPF =$sheet->getCell('W'.$x)->getCalculatedValue();
$FoodAllowance = $sheet->getCell('X'.$x)->getCalculatedValue();
$Incentive =$sheet->getCell('Y'.$x)->getValue();
$TotalSalary = $sheet->getCell('Z'.$x)->getCalculatedValue();
$Advance =$sheet->getCell('AA'.$x)->getValue();
$BalanceAdvance = $sheet->getCell('AB'.$x)->getValue();
$LessAdvance = $sheet->getCell('AC'.$x)->getCalculatedValue();
$Signature = $sheet->getCell('AD'.$x)->getValue();
$LOP = $sheet->getCell('K'.$x)->getCalculatedValue();
$ActualSalary = $sheet->getCell('L'.$x)->getValue();
$PerDaySalary = $sheet->getCell('M'.$x)->getCalculatedValue();
$WorkedSalary =$sheet->getCell('N'.$x)->getCalculatedValue();
$BasicAndDA =$sheet->getCell('O'.$x)->getCalculatedValue();
$HRA =$sheet->getCell('P'.$x)->getCalculatedValue();
$OTWages = $sheet->getCell('Q'.$x)->getValue();
$OTPerHours =$sheet->getCell('R'.$x)->getValue();
$OTSalary =$sheet->getCell('S'.$x)->getCalculatedValue();
$GrosssSalary =$sheet->getCell('T'.$x)->getCalculatedValue();
$ESI = $sheet->getCell('U'.$x)->getCalculatedValue();
$PF =$sheet->getCell('V'.$x)->getCalculatedValue();
$ESIAndPF = $sheet->getCell('W'.$x)->getCalculatedValue();
$SalaryAsPerPF =$sheet->getCell('X'.$x)->getCalculatedValue();
$FoodAllowance = $sheet->getCell('Y'.$x)->getCalculatedValue();
$Incentive =$sheet->getCell('Z'.$x)->getValue();
$TotalSalary = $sheet->getCell('AA'.$x)->getCalculatedValue();
$Advance =$sheet->getCell('AB'.$x)->getValue();
$BalanceAdvance = $sheet->getCell('AC'.$x)->getValue();
$LessAdvance = $sheet->getCell('AD'.$x)->getCalculatedValue();
$Signature = $sheet->getCell('AE'.$x)->getValue();
//echo $EmpId ;
if( $EmpId != '')
{
$FileData = array('PayOn'=>$PayOn,'EmpID'=>$EmpId,'NoofDaysWorked'=>$NoOfWorkingdays,'ActualSalary'=>$ActualSalary,'PerDaySalary'=>$PerDaySalary,'WorkedSalary'=>$WorkedSalary,'BasicPlusDA'=>$BasicAndDA,'HRA'=>$HRA,'OTWages'=>$OTWages,'OTperHours'=>$OTPerHours,'OTSalary'=>$OTSalary,'ESIGrossSalary'=>$GrosssSalary,'EmployeeESI'=>$ESI,'PF'=>$PF,'TotalDeduction'=>$ESIAndPF,'SalaryAsPerPF'=>$SalaryAsPerPF,'FoodAllowance'=>$FoodAllowance,'Incentive'=>$Incentive,'TotalSalary'=>$TotalSalary,'Advance'=>$Advance,'BalanceAdvance'=>$BalanceAdvance,'LessAdvance'=>$LessAdvance,'Remarks'=>$Signature,'BankAccountNumber'=>$BankAccountnumber,'PFNumber'=>$PFnumber,'ESINumber'=>$ESInumber,'UANNO'=>$UAnumber);
$FileData = array('PayOn'=>$PayOn,'EmpID'=>$EmpId,'NoofDaysWorked'=>$NoOfWorkingdays,'ActualSalary'=>$ActualSalary,'PerDaySalary'=>$PerDaySalary,'WorkedSalary'=>$WorkedSalary,'BasicPlusDA'=>$BasicAndDA,'HRA'=>$HRA,'OTWages'=>$OTWages,'OTperHours'=>$OTPerHours,'OTSalary'=>$OTSalary,'ESIGrossSalary'=>$GrosssSalary,'EmployeeESI'=>$ESI,'PF'=>$PF,'TotalDeduction'=>$ESIAndPF,'SalaryAsPerPF'=>$SalaryAsPerPF,'FoodAllowance'=>$FoodAllowance,'Incentive'=>$Incentive,'TotalSalary'=>$TotalSalary,'Advance'=>$Advance,'BalanceAdvance'=>$BalanceAdvance,'LessAdvance'=>$LessAdvance,'Remarks'=>$Signature,'BankAccountNumber'=>$BankAccountnumber,'PFNumber'=>$PFnumber,'ESINumber'=>$ESInumber,'UANNO'=>$UAnumber,'LOP'=>$LOP);
$result = $this->payroll_model->UploadFileData($FileData);
}
}
}
$data['Success'] = "<script>alert('File Uploaded Successfully!');</script>";

View File

@ -28,7 +28,11 @@ class User extends BaseController
{
$this->global['pageTitle'] = 'Siddharth : Dashboard';
$this->loadViews("dashboard", $this->global, NULL , NULL);
$this->load->model('employeedetails_model');
$data['EmpCount'] = $this->employeedetails_model->getEmployeeCount();
$this->loadViews("dashboard", $this->global, $data , NULL);
}
/**