選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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

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