printpreview.phtml 3.5 KB

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