SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     foreach ($employees as $row) {
  3.          $empid = $row['employeeid'];
  4.          $thmonth = $this->payroll_model->get_13thmonth($empid);
  5.       $counts = $this->payroll_model->get_payrolldatecount($empid);
  6.       $count = $counts / 2;
  7.  
  8.  echo'    <tr>
  9.        <td><?=$row["firstname"]?> <?=$row["lastname"]?></td>';
  10.  
  11.     $months = array( 0 => '01', 1=>'02', 2=>'03', 3=>'04', 4=>'05', 5=>'06', 6=>'07', 7=>'08', 8=>'09', 9=>'10', 10=>'11');
  12.     $year = date("Y");
  13.     $total = 0;
  14.     foreach ($thmonth as $val) {
  15.         $total += $val['basicsalary'];
  16.         $ito = date('m',strtotime($val['payrolldate']));
  17.         $date = date('d',strtotime($val['payrolldate']));
  18.          $tt = $ito.'-'.$date;
  19.   }
  20.     foreach ($months as $month){
  21.      echo (($tt == $month.'-'.'15') ? '<td align="left" >'.$val['basicsalary'].'</td> <td align="left" >0.00</td>':'<td align="center"  colspan="2">0.00</td>');
  22.  
  23.   }
  24.     echo '<td align="center">'.formatnumber2($total * $count / 12).'</td>  
  25.           </tr>';
  26.   }  
  27.   ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top