You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

report-pdf.blade.php 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>{{ $report->getTitle() }}</title>
  7. <style>
  8. .header {
  9. color: #374151;
  10. margin-bottom: 1rem;
  11. }
  12. .header > * + * {
  13. margin-top: 0.5rem;
  14. }
  15. .table-head {
  16. display: table-row-group;
  17. }
  18. .text-left {
  19. text-align: left;
  20. }
  21. .text-right {
  22. text-align: right;
  23. }
  24. .text-center {
  25. text-align: center;
  26. }
  27. .table-class th,
  28. .table-class td {
  29. color: #374151;
  30. }
  31. .title {
  32. font-size: 1.5rem;
  33. }
  34. .company-name {
  35. font-size: 1.125rem;
  36. font-weight: 600;
  37. }
  38. .date-range {
  39. font-size: 0.875rem;
  40. }
  41. .table-class {
  42. width: 100%;
  43. border-collapse: collapse;
  44. }
  45. .table-class th,
  46. .table-class td {
  47. padding: 0.75rem;
  48. font-size: 0.75rem;
  49. line-height: 1rem;
  50. border-bottom: 1px solid #d1d5db; /* Gray border for all rows */
  51. }
  52. .category-header-row > td {
  53. background-color: #f3f4f6; /* Gray background for category names */
  54. font-weight: 600;
  55. }
  56. .table-body tr {
  57. background-color: #ffffff; /* White background for other rows */
  58. }
  59. .spacer-row > td {
  60. height: 0.75rem;
  61. }
  62. .category-summary-row > td,
  63. .table-footer-row > td {
  64. font-weight: 600;
  65. background-color: #ffffff; /* White background for footer */
  66. }
  67. </style>
  68. </head>
  69. <body>
  70. <div class="header">
  71. <div class="title">{{ $report->getTitle() }}</div>
  72. <div class="company-name">{{ $company->name }}</div>
  73. <div class="date-range">Date Range: {{ $startDate }} to {{ $endDate }}</div>
  74. </div>
  75. <table class="table-class">
  76. <thead class="table-head">
  77. <tr>
  78. @foreach($report->getHeaders() as $index => $header)
  79. <th class="{{ $report->getAlignmentClass($index) }}">
  80. {{ $header }}
  81. </th>
  82. @endforeach
  83. </tr>
  84. </thead>
  85. @foreach($report->getCategories() as $category)
  86. <tbody>
  87. <tr class="category-header-row">
  88. @foreach($category->header as $index => $header)
  89. <td class="{{ $report->getAlignmentClass($index) }}">
  90. {{ $header }}
  91. </td>
  92. @endforeach
  93. </tr>
  94. @foreach($category->data as $account)
  95. <tr>
  96. @foreach($account as $index => $cell)
  97. <td class="{{ $report->getAlignmentClass($index) }}">
  98. {{ $cell }}
  99. </td>
  100. @endforeach
  101. </tr>
  102. @endforeach
  103. <tr class="category-summary-row">
  104. @foreach($category->summary as $index => $cell)
  105. <td class="{{ $report->getAlignmentClass($index) }}">
  106. {{ $cell }}
  107. </td>
  108. @endforeach
  109. </tr>
  110. <tr class="spacer-row">
  111. <td colspan="{{ count($report->getHeaders()) }}"></td>
  112. </tr>
  113. </tbody>
  114. @endforeach
  115. <tfoot>
  116. <tr class="table-footer-row">
  117. @foreach ($report->getOverallTotals() as $index => $total)
  118. <td class="{{ $report->getAlignmentClass($index) }}">
  119. {{ $total }}
  120. </td>
  121. @endforeach
  122. </tr>
  123. </tfoot>
  124. </table>
  125. </body>
  126. </html>