Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

account-transactions-report-pdf.blade.php 3.7KB

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