Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

account-balances.blade.php 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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>Account Balances</title>
  7. <style>
  8. @page {
  9. size: A4;
  10. margin: 8.5mm 8.5mm 30mm 8.5mm;
  11. }
  12. .header {
  13. color: #374151;
  14. }
  15. .table-class th,
  16. .table-class td {
  17. text-align: right;
  18. color: #374151;
  19. }
  20. /* Align the first column header and data to the left */
  21. .table-class th:first-child, .table-class td:first-child {
  22. text-align: left;
  23. }
  24. .header {
  25. margin-bottom: 1rem; /* Space between header and table */
  26. }
  27. .header .title,
  28. .header .company-name,
  29. .header .date-range {
  30. margin-bottom: 0.125rem; /* Uniform space between header elements */
  31. }
  32. .title { font-size: 1.5rem; }
  33. .company-name { font-size: 1.125rem; font-weight: 600; }
  34. .date-range { font-size: 0.875rem; }
  35. .table-class {
  36. width: 100%;
  37. border-collapse: collapse;
  38. }
  39. .table-class th,
  40. .table-class td {
  41. padding: 0.75rem;
  42. font-size: 0.75rem;
  43. line-height: 1rem;
  44. border-bottom: 1px solid #d1d5db; /* Gray border for all rows */
  45. }
  46. .category-row > td {
  47. background-color: #f3f4f6; /* Gray background for category names */
  48. font-weight: 600;
  49. }
  50. .table-body tr { background-color: #ffffff; /* White background for other rows */ }
  51. .spacer-row > td { height: 0.75rem; }
  52. .summary-row > td,
  53. .table-footer-row > td {
  54. font-weight: 600;
  55. background-color: #ffffff; /* White background for footer */
  56. }
  57. </style>
  58. </head>
  59. <body>
  60. <div class="header">
  61. <div class="title">Account Balances</div>
  62. <div class="company-name">{{ auth()->user()->currentCompany->name }}</div>
  63. <div class="date-range">Date Range: {{ $startDate }} to {{ $endDate }}</div>
  64. </div>
  65. <table class="table-class">
  66. <thead class="table-head" style="display: table-row-group;">
  67. <tr>
  68. <th>Account</th>
  69. <th>Starting Balance</th>
  70. <th>Debit</th>
  71. <th>Credit</th>
  72. <th>Net Movement</th>
  73. <th>Ending Balance</th>
  74. </tr>
  75. </thead>
  76. @foreach($accountBalanceReport->categories as $accountCategoryName => $accountCategory)
  77. <tbody>
  78. <tr class="category-row">
  79. <td colspan="6">{{ $accountCategoryName }}</td>
  80. </tr>
  81. @foreach($accountCategory->accounts as $account)
  82. <tr>
  83. <td>{{ $account->accountName }}</td>
  84. <td>{{ $account->balance->startingBalance ?? '' }}</td>
  85. <td>{{ $account->balance->debitBalance }}</td>
  86. <td>{{ $account->balance->creditBalance }}</td>
  87. <td>{{ $account->balance->netMovement }}</td>
  88. <td>{{ $account->balance->endingBalance ?? '' }}</td>
  89. </tr>
  90. @endforeach
  91. <tr class="summary-row">
  92. <td>Total {{ $accountCategoryName }}</td>
  93. <td>{{ $accountCategory->summary->startingBalance ?? '' }}</td>
  94. <td>{{ $accountCategory->summary->debitBalance }}</td>
  95. <td>{{ $accountCategory->summary->creditBalance }}</td>
  96. <td>{{ $accountCategory->summary->netMovement }}</td>
  97. <td>{{ $accountCategory->summary->endingBalance ?? '' }}</td>
  98. </tr>
  99. <tr class="spacer-row">
  100. <td colspan="6"></td>
  101. </tr>
  102. </tbody>
  103. @endforeach
  104. <tfoot>
  105. <tr class="table-footer-row">
  106. <td>Total for all accounts</td>
  107. <td></td>
  108. <td>{{ $accountBalanceReport->overallTotal->debitBalance }}</td>
  109. <td>{{ $accountBalanceReport->overallTotal->creditBalance }}</td>
  110. <td></td>
  111. <td></td>
  112. </tr>
  113. </tfoot>
  114. </table>
  115. </body>