payroll.phtml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <div class="section">
  2. <div class="row">
  3. <div class="small-6 columns">
  4. <h2><i class="fa fa-file"></i> Month Totals <small><?php echo $this->date ?></small></h2>
  5. </div>
  6. <div class="small-6 columns text-right">
  7. <ul class="button-group round">
  8. <li><a class="button small secondary" href="
  9. <?php
  10. switch ($this->month)
  11. {
  12. case 01:
  13. echo $this->link(array('reports','payroll',$this->previousYear, $this->previousMonth));
  14. break;
  15. default:
  16. echo $this->link(array('reports','payroll',$this->year, $this->previousMonth));
  17. }
  18. ?>
  19. "><i class="fa fa-caret-left"></i> Previous</a></li>
  20. <li><a class="button small secondary" href="
  21. <?php
  22. switch ($this->month)
  23. {
  24. case 12:
  25. echo $this->link(array('reports','payroll',$this->nextYear, $this->nextMonth));
  26. break;
  27. default:
  28. echo $this->link(array('reports','payroll',$this->year, $this->nextMonth));
  29. }
  30. ?>
  31. ">Next <i class="fa fa-caret-right"></i></a></li>
  32. <li><a class="button small" target="_blank" href="<?php echo $this->link(array('reports','payrollprint',$this->year,$this->month)) ?>"><i class='fa fa-print'></i> Print</a></li>
  33. </ul>
  34. </div>
  35. </div>
  36. <div class="row">
  37. <div class="small-12 columns">
  38. <style>
  39. table {
  40. border:1px solid #ccc;
  41. }
  42. th {
  43. border:1px solid #ccc;
  44. padding:0px;
  45. margin:0px;
  46. background-color: #eaeaea;
  47. }
  48. td {
  49. border:1px solid #ccc;
  50. padding:0px;
  51. margin:0px;
  52. }
  53. .scroll {
  54. overflow-x:scroll;
  55. overflow-y:visible;
  56. }
  57. </style>
  58. <div class="">
  59. <table>
  60. <thead>
  61. <tr>
  62. <th style="width:150px;"></th>
  63. <?php
  64. foreach($this->codes as $codeKey=>$codeName)
  65. {
  66. echo "<th>$codeName</th>";
  67. }
  68. ?>
  69. <th>Total</th>
  70. </tr>
  71. </thead>
  72. <tbody>
  73. <?php
  74. $grandTotal = 0;
  75. foreach($this->report as $account)
  76. {
  77. echo "<tr>";
  78. echo "<td style='border-bottom:1px solid #ccc;'><b>".$account['userInfo']['lastName'].", ".$account['userInfo']['firstName']."</b></td>";
  79. foreach($account['totals'] as $totals)
  80. {
  81. echo "<td class='text-center' style='border-bottom:1px solid #ccc;'>";
  82. if($totals == 0)
  83. {
  84. echo " - ";
  85. }
  86. else
  87. {
  88. echo $totals;
  89. }
  90. echo "</td>";
  91. }
  92. $accountTotal = 0;
  93. foreach($account['totals'] as $key => $value)
  94. {
  95. $accountTotal = $accountTotal + $value;
  96. $grandTotal = $grandTotal + $value;
  97. }
  98. echo "<td class='text-center'><b>$accountTotal</b></td>";
  99. echo "</tr>";
  100. }
  101. $codeCount = count($account['totals'])+2;
  102. echo "
  103. <tr>
  104. <td class='text-center' colspan=\"$codeCount\"><b>Total Pay Period Hours:</b> $grandTotal </td>
  105. </tr>
  106. ";
  107. ?>
  108. </tbody>
  109. </table>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. <div id="yearForm" class="reveal-modal small" data-reveal aria-labelledby="Change Year" aria-hidden="true" role="dialog">
  115. <h2 id="modalTitle">Select a Year</h2>
  116. <?php echo $this->yearForm ?>
  117. <a class="close-reveal-modal" aria-label="Close">&#215;</a>
  118. </div>