예제 #1
0
    public static function EmployeeOvertime()
    {
        $statement = TransactionVouchers::PayrollCategoryReport($_GET['sid'], $_GET['month'], 'Overtime');
        $employee = Employee::GetEmployee($_GET['sid']);
        echo '
				<div class="logo">
				  <h5 style="margin-bottom:-15px;margin-top:0px;font-size:14px;">Date: ' . date('d/m/Y') . '</h5>
				  <h4>OVERTIME: ' . $employee->name . '</h4>
				  <h5 style="margin-top:-10px">Month: ' . $_GET['month'] . '</h5>';
        echo '</div>

				<table class="table table-bordered table-striped" style="text-align:center;margin-left:0;margin-right:0;width:760px;font-size:12px;">
			      <thead class="title">
			        <tr>
			          <td>DATE</td>
			          <td>HOURS</td>
			          <td>RATE</td>
			          <td>AMOUNT</td>
			          <td>DESCRIPTION</td>
			        </tr>
			      </thead>
			      <tbody>';
        $tot = 0.0;
        foreach ($statement as $item) {
            $tot += $item['amount'];
            echo '<tr>
			      <td style="width:90px">' . $item['datetime'] . '</td>
			      <td style="width: 100px">' . $item['qty'] . '</td>
			      <td style="width: 100px"><script>document.writeln((' . $item['rate'] . ').formatMoney(2, \'.\', \',\'));</script></td>
			      <td style="width: 100px"><script>document.writeln((' . $item['amount'] . ').formatMoney(2, \'.\', \',\'));</script></td>
			      <td style="max-width: 220px;">' . $item['description'] . '</td>
			    </tr>';
        }
        echo '</tbody>
			    </table>
			    <div class="logo">
			    <p style="margin: 5px 0 0 5px">Total Advances: <b>Ksh. <script>document.writeln((' . $tot . ').formatMoney(2, \'.\', \',\'));</script></b></p>				    
			    </div>';
    }