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

View File

@ -28,7 +28,11 @@ class User extends BaseController
{ {
$this->global['pageTitle'] = 'Siddharth : Dashboard'; $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);
} }
/** /**