payslip pdf generate code

This commit is contained in:
saravanakumar_kandasami 2017-04-19 18:46:55 +05:30
parent 8c99275f6f
commit a687e73883
8 changed files with 431 additions and 26 deletions

View File

@ -20,29 +20,42 @@ class payslip extends BaseController
$this->load->model('employeedetails_model');
$this->isLoggedIn();
}
/**
* This function used to load the first screen of the user
*/
public function index()
{
}
function payslipupload()
function payslipupload()
{
$this->global['pageTitle'] = 'Siddharth : PaySlip Upload';
$this->loadViews("payslipupload", $this->global, NULL);
}
function payslipgenerate()
{
$this->global['pageTitle'] = 'Siddharth : PaySlip Generator';
$this->loadViews("payslipgenerate", $this->global, NULL);
}
function payslipgenerateprint()
{
$this->global['pageTitle'] = 'Siddharth : PaySlip Generator print';
// Add header to pdf
//$this->load->view('includes/pdfheader');
$this->load->View("payslipgenerateprint", $this->global, NULL);
// Get output html
$php = $this->output->get_output();
// Load library
$this->load->library('dompdf_gen');
// Convert to PDF
$this->dompdf->load_html($php);
$this->dompdf->render();
$data['Attachment'] = FALSE;
$this->dompdf->stream("payslipgenerate.pdf",$data,$php);
}
function pageNotFound()
{

View File

@ -1 +1 @@
<span style='color: #900'>6,144 KB</span> <span style='color: #090'>408.7529 ms</span><br />
<span style='color: #900'>2,048 KB</span> <span style='color: #090'>235.9860 ms</span><br />

View File

@ -1,14 +1,180 @@
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<small>Dashboard</small>
</h1>
</section>
<section class="content">
<div class="row">
SIDDHARTH INDUSTRIES APPLICATION
<?php
if($role == ROLE_ACCOUNTS)
{
?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Account Department Dashboard
</h1>
</section>
<!-- Main content -->
<section class="content">
<!-- Info boxes -->
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-aqua"><i class="ion ion-ios-gear-outline"></i></span>
<div class="info-box-content">
<span class="info-box-text">CPU Traffic</span>
<span class="info-box-number">90<small>%</small></span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<!-- /.col -->
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-red"><i class="fa fa-google-plus"></i></span>
<div class="info-box-content">
<span class="info-box-text">Likes</span>
<span class="info-box-number">41,410</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<!-- /.col -->
<!-- fix for small devices only -->
<div class="clearfix visible-sm-block"></div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-green"><i class="ion ion-ios-cart-outline"></i></span>
<div class="info-box-content">
<span class="info-box-text">Sales</span>
<span class="info-box-number">760</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<!-- /.col -->
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-yellow"><i class="ion ion-ios-people-outline"></i></span>
<div class="info-box-content">
<span class="info-box-text">New Members</span>
<span class="info-box-number">2,000</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<!-- /.col -->
</div>
<div>
<h3>Guidiness:</h3><p> # PaySlip menu in header has two sub menu ( 1.Upload Salary , 2.PaySlip Generator)<br/>
# Upload salary menu is to upload the salary excel file in database<br/>
# Payslip generator menu is to generate the salary details for indivigual or all employee</p> </div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php
}
?>
<?php
if($role == ROLE_ADMIN)
{
?>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Admin Dashboard
</h1>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-aqua">
<div class="inner">
<h3>150</h3>
<p>New Orders</p>
</div>
<div class="icon">
<i class="ion ion-bag"></i>
</div>
<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-green">
<div class="inner">
<h3>53<sup style="font-size: 20px">%</sup></h3>
<p>Bounce Rate</p>
</div>
<div class="icon">
<i class="ion ion-stats-bars"></i>
</div>
<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-yellow">
<div class="inner">
<h3>44</h3>
<p>User Registrations</p>
</div>
<div class="icon">
<i class="ion ion-person-add"></i>
</div>
<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-red">
<div class="inner">
<h3>65</h3>
<p>Unique Visitors</p>
</div>
<div class="icon">
<i class="ion ion-pie-graph"></i>
</div>
<a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<!-- ./col -->
</div>
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php
}
?>
</section>
</div>

View File

@ -229,8 +229,8 @@
{
?>
<li class="treeview">
<span id="menu" data-toggle="dropdown" ><i class="fa fa-thumb-tack"></i> PaySlip Generate<span class="caret"></span></span>
<ul class="dropdown-menu" role="menu" aria-labelledby="menu2">
<span id="menu" data-toggle="dropdown" ><i class="fa fa-thumb-tack"></i> PaySlip <span class="caret"></span></span>
<ul class="dropdown-menu" role="menu" aria-labelledby="menu3">
<li class="treeview">
<a href="<?php echo base_url(); ?>payslip/payslipupload">
<i class="fa fa-upload"></i>

View File

@ -37,7 +37,8 @@ $(function() {
<section class="content">
<div class="row" style="border:2px dotted; padding:5%">
<div class="row" align="right">
<button type="button" class="btn btn-info">Print</button>
<a href="<?php echo base_url(); ?>payslip/payslipgenerateprint" >
<button type="button" class="btn btn-info">Print</button></a>
</div>
<div class="row" >
<div class="col-md-6">
@ -62,6 +63,7 @@ $(function() {
</div>
<input type="checkbox" name="allemployee" value="allempolyee">Select All<br>
</div>
<div class="col-md-6">
<span for="selectmonth">Select Month</span>
<input id="selectmonth" required name="selectmonth" onkeypress="return false;" maxlength="10" class="form-control" value= "<?php echo isset($_POST['selectmonth']) ? $_POST['selectmonth'] : '' ?>">

View File

@ -0,0 +1,216 @@
<div style="border:1px solid">
<!--<img src="<?php echo base_url(); ?>assets/dist/img/avatar.png"/>-->
<center><h3>Siddharth Industries</h3>
<p>Survey No: 168/1C3,
Pennalur Pet Road,
Goonipalyam village,<br/>
Uthukottai Taluk,
Tiruvallur Dist,<br/>
Chennai,Tamilnadu,
Pin code : 602026.
<br/><br/>PaySlip for the month - FEB 2017</p></center>
<hr/>
<table>
<tr>
<td width="200px;">
Employee ID :
</td>
<td width="160px;">
E033
</td>
<td width="200px;">
Name :
</td>
<td width="300px;">
Saravana kumar
</td>
</tr>
<tr>
<td width="200px;">
Department :
</td>
<td width="160px;">
Marketing
</td>
<td width="200px;">
Desigination :
</td>
<td width="300px;">
Marketing Executive
</td>
</tr>
<tr>
<td width="200px;">
Pay Date :
</td>
<td width="160px;">
02/2017
</td>
<td width="200px;">
Date Of Joining :
</td>
<td width="300px;">
11/07/2016
</td>
</tr>
<tr>
<td width="100px;">
Date Of Birth :
</td>
<td width="160px;">
12/24/1989
</td>
<td width="200px;">
Days Worked :
</td>
<td width="300px;">
25.0
</td>
</tr>
<tr>
<td width="200px;">
PF Account Number :
</td>
<td width="160px;">
KA/BA/17
</td>
<td width="100px;">
Bank Name :
</td>
<td width="300px;">
KVB
</td>
</tr>
<tr>
<td width="100px;">
ESI Account Number :
</td>
<td width="160px;">
17
</td>
<td width="100px;">
Bank IFSC :
</td>
<td width="300px;">
KVB182435
</td>
</tr>
<tr>
<td width="100px;">
OT Wages :
</td>
<td width="160px;">
00
</td>
<td width="100px;">
Bank Account Number :
</td>
<td width="300px;">
187000023459
</td>
</tr>
<tr>
<td width="100px;">
Balance Advance :
</td>
<td width="160px;">
00.00
</td>
<td width="100px;">
Lose Of Pay :
</td>
<td width="300px;">
3
</td>
</tr>
<tr>
<td width="100px;">
No Of Working Days :
</td>
<td width="160px;">
30
</td>
</tr>
</table>
<table border="1" width="100%">
<tr><td>
<table width="100%">
<tr>
<th>Earnings</th>
<th>Amount</th>
</tr>
<tr>
<td>Basic Plus DA</td>
<td align="right">9800.00</td>
</tr>
<tr>
<td>House Rent Allowance</td>
<td align="right">4200.00</td>
</tr>
<tr>
<td>Food Allowance</td>
<td align="right">00.00</td>
</tr>
<tr>
<td>OT Salary</td>
<td align="right">00.00</td>
</tr>
<tr>
<td>Incentive</td>
<td align="right">12500.00</td>
</tr>
</table></td>
<td>
<table width="100%">
<tr>
<th>Deductions</th>
<th>Amount</th>
</tr>
<tr>
<td>Provident Fund</td>
<td align="right">1176.00</td>
</tr>
<tr>
<td>Employee State Insurance</td>
<td align="right">245.00</td>
</tr>
<tr>
<td>Advance</td>
<td align="right">00.00</td>
</tr>
</table></td>
</tr>
</table>
<table border="1" width="100%">
<tr><td>
<table width="100%">
<tr>
<th>Total Earning (Rounded) (TE)</th>
<th align="right">26500.00</th>
</tr>
</table></td>
<td>
<table width="100%">
<tr>
<th>Total Deduction (Rounded)(TD)</th>
<th align="right">1421.00</th>
</tr>
</table>
</tr>
</table>
<table width="100%">
<tr><th>Net Pay (Rounded) (TE - TD) :</th>
<th align="right">25079.00</th></tr>
<hr/>
</table>
<hr/>
<div><center> This is a computer generated document. This dose not require signature. </center></div>
</div>

View File

@ -11,6 +11,8 @@
reader.readAsDataURL(input.files[0]);
}
}
</script>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
@ -22,15 +24,21 @@
</section>
<section class="content">
<div class="row">
<div class="col-md-6 col-md-offset-3" style="border:2px dotted; padding:5%">
<center>
<div class="col-md-6 col-md-offset-3" style="border:2px dotted; padding:5%" enctype="multipart/form-data">
<div class="box-header">
<input type='file' onchange="readURL(this);" id="salaryexcel" name="salaryexcel"/>
<label for="photo">Select Excelsheet Only<br/></label>
<div class="progress">
<div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar"
aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:40%">
</div>
</div>
</div>
</center>
<div class="row" align="right">
<button type="button" class="btn btn-info">Submit</button>
</div>

BIN
assets/dist/img/logo.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 955 B