Digg!      Delicious      Technorati      Blinklist      Furl      Reddit

TimeTrex Time and Attendance

TimeTrex Time and Attendance


* FAQ    * Search
* Login   * Register

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: How to add the employee id number to the pdf paystub
PostPosted: Wed Mar 19, 2008 2:47 pm 
Offline

Joined: Thu Nov 29, 2007 5:11 pm
Posts: 3
Location: Los Angeles, CA
I had to add the employee id number (the one assigned by the hr department) to the pdf paystub. I hope this helps if you need to do it.

Edition: Standard Edition
Version: 2.2.8

The goal is to put the employee number on the pay stub below the Net Pay, and above the Identification #, in the same font as the Identification #.

edit the file /classes/modules/pay_stub/PayStubFactory.class.php

Head to the bottom of the getPayStub function. On or about line 2925, you should see:
Code:
$pdf->SetFont('','',8);
$pdf->setXY( Misc::AdjustXY(125, $adjust_x), Misc::AdjustXY($block_adjust_y+30, $adjust_y) );
$pdf->Cell(50, 5, TTi18n::gettext('Identification #:').' '. str_pad($pay_stub_obj->getId(),12,0, STR_PAD_LEFT).$tainted_flag, $border, 1, 'L', 0);
unset($net_pay_amount, $tainted_flag);

This code adds the Identification Number to the paystub. Change to the following:
Code:
$pdf->SetFont('','',8);
$pdf->setXY( Misc::AdjustXY(125, $adjust_x), Misc::AdjustXY($block_adjust_y+27, $adjust_y) );
$pdf->Cell(50, 5, TTi18n::gettext('Employee ID') . ': ' . $user_obj->getEmployeeNumber(), $border, 1, 'L', 0);
$pdf->setXY( Misc::AdjustXY(125, $adjust_x), Misc::AdjustXY($block_adjust_y+30, $adjust_y) );
$pdf->Cell(50, 5, TTi18n::gettext('Identification #:').' '. str_pad($pay_stub_obj->getId(),12,0, STR_PAD_LEFT).$tainted_flag, $border, 1, 'L', 0);
unset($net_pay_amount, $tainted_flag);


The two additional lines add a cell at the specified location above the Identification #, and insert the Employee ID.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron


Time and Attendance




Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group