Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

balance-sheet.blade.php 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <table class="w-full table-auto divide-y divide-gray-200 dark:divide-white/5">
  2. <thead class="divide-y divide-gray-200 dark:divide-white/5">
  3. <tr class="bg-gray-50 dark:bg-white/5">
  4. @foreach($report->getHeaders() as $reportHeaderIndex => $reportHeaderCell)
  5. <th class="px-3 py-3.5 sm:first-of-type:ps-6 sm:last-of-type:pe-6 {{ $report->getAlignmentClass($reportHeaderIndex) }}">
  6. <span class="text-sm font-semibold text-gray-950 dark:text-white">
  7. {{ $reportHeaderCell }}
  8. </span>
  9. </th>
  10. @endforeach
  11. </tr>
  12. </thead>
  13. @foreach($report->getCategories() as $accountCategory)
  14. <tbody class="divide-y divide-gray-200 whitespace-nowrap dark:divide-white/5">
  15. <tr class="bg-gray-50 dark:bg-white/5">
  16. @foreach($accountCategory->header as $accountCategoryHeaderIndex => $accountCategoryHeaderCell)
  17. <x-filament-tables::cell class="{{ $report->getAlignmentClass($accountCategoryHeaderIndex) }}">
  18. <div class="px-3 py-2 text-sm font-semibold text-gray-950 dark:text-white">
  19. {{ $accountCategoryHeaderCell }}
  20. </div>
  21. </x-filament-tables::cell>
  22. @endforeach
  23. </tr>
  24. @foreach($accountCategory->data as $categoryAccount)
  25. <tr>
  26. @foreach($categoryAccount as $accountIndex => $categoryAccountCell)
  27. <x-filament-tables::cell class="{{ $report->getAlignmentClass($accountIndex) }}"
  28. style="padding-left: 1.5rem;">
  29. <div class="px-3 py-4 text-sm leading-6 text-gray-950 dark:text-white">
  30. @if(is_array($categoryAccountCell) && isset($categoryAccountCell['name']))
  31. @if($categoryAccountCell['name'] === 'Retained Earnings' && isset($categoryAccountCell['start_date']) && isset($categoryAccountCell['end_date']))
  32. <x-filament::link
  33. color="primary"
  34. target="_blank"
  35. icon="heroicon-o-arrow-top-right-on-square"
  36. :icon-position="\Filament\Support\Enums\IconPosition::After"
  37. :icon-size="\Filament\Support\Enums\IconSize::Small"
  38. href="{{ \App\Filament\Company\Pages\Reports\IncomeStatement::getUrl([
  39. 'startDate' => $categoryAccountCell['start_date'],
  40. 'endDate' => $categoryAccountCell['end_date']
  41. ]) }}"
  42. >
  43. {{ $categoryAccountCell['name'] }}
  44. </x-filament::link>
  45. @elseif(isset($categoryAccountCell['id']) && isset($categoryAccountCell['start_date']) && isset($categoryAccountCell['end_date']))
  46. <x-filament::link
  47. color="primary"
  48. target="_blank"
  49. icon="heroicon-o-arrow-top-right-on-square"
  50. :icon-position="\Filament\Support\Enums\IconPosition::After"
  51. :icon-size="\Filament\Support\Enums\IconSize::Small"
  52. href="{{ \App\Filament\Company\Pages\Reports\AccountTransactions::getUrl([
  53. 'startDate' => $categoryAccountCell['start_date'],
  54. 'endDate' => $categoryAccountCell['end_date'],
  55. 'selectedAccount' => $categoryAccountCell['id']
  56. ]) }}"
  57. >
  58. {{ $categoryAccountCell['name'] }}
  59. </x-filament::link>
  60. @else
  61. {{ $categoryAccountCell['name'] }}
  62. @endif
  63. @else
  64. {{ $categoryAccountCell }}
  65. @endif
  66. </div>
  67. </x-filament-tables::cell>
  68. @endforeach
  69. </tr>
  70. @endforeach
  71. @foreach($accountCategory->types as $accountType)
  72. <tr class="bg-gray-50 dark:bg-white/5">
  73. @foreach($accountType->header as $accountTypeHeaderIndex => $accountTypeHeaderCell)
  74. <x-filament-tables::cell class="{{ $report->getAlignmentClass($accountTypeHeaderIndex) }}"
  75. style="padding-left: 1.5rem;">
  76. <div class="px-3 py-2 text-sm font-semibold text-gray-950 dark:text-white">
  77. {{ $accountTypeHeaderCell }}
  78. </div>
  79. </x-filament-tables::cell>
  80. @endforeach
  81. </tr>
  82. @foreach($accountType->data as $typeAccount)
  83. <tr>
  84. @foreach($typeAccount as $accountIndex => $typeAccountCell)
  85. <x-filament-tables::cell class="{{ $report->getAlignmentClass($accountIndex) }}"
  86. style="padding-left: 1.5rem;">
  87. <div class="px-3 py-4 text-sm leading-6 text-gray-950 dark:text-white">
  88. @if(is_array($typeAccountCell) && isset($typeAccountCell['name']))
  89. @if($typeAccountCell['name'] === 'Retained Earnings' && isset($typeAccountCell['start_date']) && isset($typeAccountCell['end_date']))
  90. <x-filament::link
  91. color="primary"
  92. target="_blank"
  93. icon="heroicon-o-arrow-top-right-on-square"
  94. :icon-position="\Filament\Support\Enums\IconPosition::After"
  95. :icon-size="\Filament\Support\Enums\IconSize::Small"
  96. href="{{ \App\Filament\Company\Pages\Reports\IncomeStatement::getUrl([
  97. 'startDate' => $typeAccountCell['start_date'],
  98. 'endDate' => $typeAccountCell['end_date']
  99. ]) }}"
  100. >
  101. {{ $typeAccountCell['name'] }}
  102. </x-filament::link>
  103. @elseif(isset($typeAccountCell['id']) && isset($typeAccountCell['start_date']) && isset($typeAccountCell['end_date']))
  104. <x-filament::link
  105. color="primary"
  106. target="_blank"
  107. icon="heroicon-o-arrow-top-right-on-square"
  108. :icon-position="\Filament\Support\Enums\IconPosition::After"
  109. :icon-size="\Filament\Support\Enums\IconSize::Small"
  110. href="{{ \App\Filament\Company\Pages\Reports\AccountTransactions::getUrl([
  111. 'startDate' => $typeAccountCell['start_date'],
  112. 'endDate' => $typeAccountCell['end_date'],
  113. 'selectedAccount' => $typeAccountCell['id']
  114. ]) }}"
  115. >
  116. {{ $typeAccountCell['name'] }}
  117. </x-filament::link>
  118. @else
  119. {{ $typeAccountCell['name'] }}
  120. @endif
  121. @else
  122. {{ $typeAccountCell }}
  123. @endif
  124. </div>
  125. </x-filament-tables::cell>
  126. @endforeach
  127. </tr>
  128. @endforeach
  129. <tr>
  130. @foreach($accountType->summary as $accountTypeSummaryIndex => $accountTypeSummaryCell)
  131. <x-filament-tables::cell class="{{ $report->getAlignmentClass($accountTypeSummaryIndex) }}"
  132. style="padding-left: 1.5rem;">
  133. <div class="px-3 py-2 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
  134. {{ $accountTypeSummaryCell }}
  135. </div>
  136. </x-filament-tables::cell>
  137. @endforeach
  138. </tr>
  139. @endforeach
  140. <tr>
  141. @foreach($accountCategory->summary as $accountCategorySummaryIndex => $accountCategorySummaryCell)
  142. <x-filament-tables::cell class="{{ $report->getAlignmentClass($accountCategorySummaryIndex) }}">
  143. <div class="px-3 py-2 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
  144. {{ $accountCategorySummaryCell }}
  145. </div>
  146. </x-filament-tables::cell>
  147. @endforeach
  148. </tr>
  149. <tr>
  150. <x-filament-tables::cell colspan="{{ count($report->getHeaders()) }}">
  151. <div class="px-3 py-2 leading-6 invisible">Hidden Text</div>
  152. </x-filament-tables::cell>
  153. </tr>
  154. </tbody>
  155. @endforeach
  156. @if(! empty($report->getOverallTotals()))
  157. <tfoot>
  158. <tr class="bg-gray-50 dark:bg-white/5">
  159. @foreach($report->getOverallTotals() as $reportOverallTotalIndex => $reportOverallTotalCell)
  160. <x-filament-tables::cell class="{{ $report->getAlignmentClass($reportOverallTotalIndex) }}">
  161. <div class="px-3 py-2 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
  162. {{ $reportOverallTotalCell }}
  163. </div>
  164. </x-filament-tables::cell>
  165. @endforeach
  166. </tr>
  167. </tfoot>
  168. @endif
  169. </table>