report_content.blade.php 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <div class="row">
  2. <div class="col-md-6">
  3. <h2 class="text-center">Entry Report</h2>
  4. <table class="table table-striped">
  5. <thead>
  6. <tr>
  7. <th colspan="2">
  8. Date
  9. </th>
  10. <th>
  11. Entry Time
  12. </th>
  13. </tr>
  14. </thead>
  15. <tbody>
  16. @foreach($entry_time as $info)
  17. <?php
  18. $a=strtotime('9:30 am');
  19. $c=date('H:i:s a', $a);
  20. $entry_time=date('H:i:s a',strtotime($info['attendance_time']));
  21. if($entry_time>$c)
  22. {
  23. $background='red';
  24. } else
  25. {
  26. $background='green';
  27. }
  28. ?>
  29. <tr>
  30. <td colspan="2">
  31. <span style="font-size:12px;">{{ date('d-m-Y',strtotime($info['attendance_time'])) }}</span>
  32. </td>
  33. <td>
  34. <span style="font-size:12px;color:<?php echo $background;?>">
  35. <?php
  36. $abtime=strtotime('12:00:00 am');
  37. $mamun_er_pera=date('H:i:s a', $abtime);
  38. ?>
  39. @if( date('h:i:s a',strtotime($info['attendance_time'])) > $mamun_er_pera)
  40. {{ date('h:i:s A',strtotime($info['attendance_time'])) }}
  41. @else
  42. {{ "Absent" }}
  43. @endif
  44. </span>
  45. </td>
  46. </tr>
  47. @endforeach
  48. </tbody>
  49. </table>
  50. </div>
  51. <div class="col-md-6">
  52. <h2 class="text-center"> Exit Report</h2>
  53. <table class="table table-striped">
  54. <thead>
  55. <tr>
  56. <th colspan="2">
  57. Date
  58. </th>
  59. <th>
  60. Exit Time
  61. </th>
  62. </tr>
  63. </thead>
  64. <tbody>
  65. @foreach($exit_time as $info)
  66. <tr>
  67. <td colspan="2">
  68. {{ date('d-m-Y',strtotime($info['attendance_time'])) }}
  69. </td>
  70. <td>
  71. {{ date('h:i:s A',strtotime($info['attendance_time'])) }}
  72. </td>
  73. </tr>
  74. @endforeach
  75. </tbody>
  76. </table>
  77. </div>
  78. </div>
  79. <hr>
  80. </hr>