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.

balance-sheet.blade.php 9.5KB

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