printpreview.phtml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <div class="row">
  2. <div class="small-12 columns text-center">
  3. <h1><?php echo $this->firstName ?> <?php echo $this->lastName ?> <small><?php echo $this->timesheet->currentMonthText ?> <?php echo $this->timesheet->currentYear ?></small></h1>
  4. </div>
  5. <div class="small-12 columns text-center">
  6. <p><b>Date Range:</b> <?php echo date("l, F jS Y",$this->timesheet->startDateTimeString) ?> to <?php echo date("l, F jS Y",$this->timesheet->endDateTimeString) ?></p>
  7. <p><b>Report Generated:</b> <?php echo date('l, F jS Y g:i A') ?></p>
  8. </div>
  9. </div>
  10. <div class="row">
  11. <div class="small-12 columns">
  12. <h3>Totals <small>Calculated with <i>Adjusted</i> time</small></h3>
  13. <table width="100%">
  14. <thead>
  15. <tr>
  16. <?php
  17. foreach($this->timesheet->totals as $title => $value)
  18. {
  19. if($value > 0)
  20. {
  21. echo "<th>$title</th>";
  22. }
  23. }
  24. ?>
  25. </tr>
  26. </thead>
  27. <tbody>
  28. <?php
  29. foreach($this->timesheet->totals as $title => $value)
  30. {
  31. if($value > 0)
  32. {
  33. echo "<td>$value</td>";
  34. }
  35. }
  36. ?>
  37. </tbody>
  38. </table>
  39. </div>
  40. </div>
  41. <div class="row">
  42. <div class="small-12 columns">
  43. <h3>Time Sheet</h3>
  44. <p><i>Adjusted</i> time calculated to the nearest quarter hour. <br> Example: <b>9:07 AM</b> will be adjusted to <b>9:00 AM</b> and <b>10:08 AM</b> will be adjusted to <b>10:15 AM</b>.</p>
  45. <table width="100%">
  46. <thead>
  47. <tr>
  48. <th>Date</th>
  49. <th>In Time <small>(Actual)</small></th>
  50. <th>Out Time <small>(Actual)</small></th>
  51. <th>In Time <small>(Adjusted)</small></th>
  52. <th>Out Time <small>(Adjusted)</small></th>
  53. <th>Less Time <small>(Minutes)</small></th>
  54. <th>Code</th>
  55. <th>Total <small>(Hours)</small></th>
  56. <th>Validated</th>
  57. </tr>
  58. </thead>
  59. <tbody>
  60. </div>
  61. </div>
  62. <?php
  63. $currentBatch = $this->batchId;
  64. foreach($this->timesheet->entries as $entry)
  65. {
  66. echo "
  67. <tr>
  68. <td>".$entry->date."</td>
  69. <td>".$entry->inTime."</td>
  70. <td>".$entry->outTime."</td>
  71. ";
  72. if($entry->inTime != $entry->roundedInTime)
  73. {
  74. echo "<td>".$entry->roundedInTime."</td>";
  75. }
  76. else
  77. {
  78. echo "<td> N/A </td>";
  79. }
  80. if($entry->outTime != $entry->roundedOutTime)
  81. {
  82. echo "<td>".$entry->roundedOutTime."</td>";
  83. }
  84. else
  85. {
  86. echo "<td> N/A </td>";
  87. }
  88. echo "
  89. <td>".$entry->lessTime."</td>
  90. <td>".$entry->codeName."</td>
  91. <td>".$entry->timeWorked."</td>
  92. ";
  93. if($currentBatch != $entry->batchId)
  94. {
  95. echo "<td>Yes <i class='fa fa-check'></i></td>";
  96. }
  97. else
  98. {
  99. echo "<td>No <i class='fa fa-close'></i></td>";
  100. }
  101. echo "</tr>";
  102. if(strlen($entry->note) > 0)
  103. {
  104. echo "
  105. <tr>
  106. <td class='text-right'><i class='fa fa-edit'></i> Note:</td>
  107. <td colspan='7'>".$entry->note."</td>
  108. </tr>
  109. ";
  110. }
  111. }
  112. ?>
  113. </tbody>
  114. </table>
  115. </div>
  116. </div>