payroll.phtml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. //Gets the unpaid leave time code ID. These entries will not be reflected in the total.
  75. $code = new codeModel();
  76. $codeId = $code->getIdFor("Unpaid Leave");
  77. foreach($this->report as $account)
  78. {
  79. echo "<tr>";
  80. echo "<td style='border-bottom:1px solid #ccc;'><b>".$account['userInfo']['lastName'].", ".$account['userInfo']['firstName']."</b></td>";
  81. foreach($account['totals'] as $totals)
  82. {
  83. echo "<td class='text-center' style='border-bottom:1px solid #ccc;'>";
  84. if($totals == 0)
  85. {
  86. echo " - ";
  87. }
  88. else
  89. {
  90. echo $totals;
  91. }
  92. echo "</td>";
  93. }
  94. $grandTotal = 0;
  95. foreach($account['totals'] as $key => $value)
  96. {
  97. if($key != $codeId['id'])
  98. {
  99. $grandTotal = $grandTotal + $value;
  100. }
  101. }
  102. echo "<td class='text-center'><b>$grandTotal</b></td>";
  103. echo "</tr>";
  104. }
  105. ?>
  106. </tbody>
  107. </table>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. <div id="yearForm" class="reveal-modal small" data-reveal aria-labelledby="Change Year" aria-hidden="true" role="dialog">
  113. <h2 id="modalTitle">Select a Year</h2>
  114. <?php echo $this->yearForm ?>
  115. <a class="close-reveal-modal" aria-label="Close">&#215;</a>
  116. </div>