Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- foreach ($employees as $row) {
- $empid = $row['employeeid'];
- $thmonth = $this->payroll_model->get_13thmonth($empid);
- $counts = $this->payroll_model->get_payrolldatecount($empid);
- $count = $counts / 2;
- echo' <tr>
- <td><?=$row["firstname"]?> <?=$row["lastname"]?></td>';
- $months = array( 0 => '01', 1=>'02', 2=>'03', 3=>'04', 4=>'05', 5=>'06', 6=>'07', 7=>'08', 8=>'09', 9=>'10', 10=>'11');
- $year = date("Y");
- $total = 0;
- foreach ($thmonth as $val) {
- $total += $val['basicsalary'];
- $ito = date('m',strtotime($val['payrolldate']));
- $date = date('d',strtotime($val['payrolldate']));
- $tt = $ito.'-'.$date;
- }
- foreach ($months as $month){
- echo (($tt == $month.'-'.'15') ? '<td align="left" >'.$val['basicsalary'].'</td> <td align="left" >0.00</td>':'<td align="center" colspan="2">0.00</td>');
- }
- echo '<td align="center">'.formatnumber2($total * $count / 12).'</td>
- </tr>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement