Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

balance-sheet.blade.php 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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 $index => $header)
  5. <th class="px-3 py-3.5 sm:first-of-type:ps-6 sm:last-of-type:pe-6 {{ $report->getAlignmentClass($index) }}">
  6. <span class="text-sm font-semibold text-gray-950 dark:text-white">
  7. {{ $header }}
  8. </span>
  9. </th>
  10. @endforeach
  11. </tr>
  12. </thead>
  13. @foreach($report->getCategories() as $categoryIndex => $category)
  14. @ray($category)
  15. <tbody class="divide-y divide-gray-200 whitespace-nowrap dark:divide-white/5">
  16. <tr class="bg-gray-50 dark:bg-white/5">
  17. @foreach($category->header as $headerIndex => $header)
  18. <x-filament-tables::cell class="{{ $report->getAlignmentClass($headerIndex) }}">
  19. <div class="px-3 py-2 text-sm font-semibold text-gray-950 dark:text-white">
  20. {{ $header }}
  21. </div>
  22. </x-filament-tables::cell>
  23. @endforeach
  24. </tr>
  25. @foreach($category->types as $subcategory)
  26. <tr class="bg-gray-50 dark:bg-white/5">
  27. @foreach($subcategory->header as $headerIndex => $header)
  28. <x-filament-tables::cell class="{{ $report->getAlignmentClass($headerIndex) }}"
  29. style="padding-left: 2rem;">
  30. <div class="px-3 py-2 text-sm font-semibold text-gray-950 dark:text-white">
  31. {{ $header }}
  32. </div>
  33. </x-filament-tables::cell>
  34. @endforeach
  35. </tr>
  36. @foreach($subcategory->data as $dataIndex => $account)
  37. <tr>
  38. @foreach($account as $cellIndex => $cell)
  39. <x-filament-tables::cell class="{{ $report->getAlignmentClass($cellIndex) }}"
  40. style="padding-left: 2rem;">
  41. <div class="px-3 py-4 text-sm leading-6 text-gray-950 dark:text-white">
  42. @if(is_array($cell) && isset($cell['name']))
  43. @if($cell['name'] === 'Retained Earnings' && isset($cell['start_date']) && isset($cell['end_date']))
  44. <x-filament::link
  45. color="primary"
  46. target="_blank"
  47. icon="heroicon-o-arrow-top-right-on-square"
  48. :icon-position="\Filament\Support\Enums\IconPosition::After"
  49. :icon-size="\Filament\Support\Enums\IconSize::Small"
  50. href="{{ \App\Filament\Company\Pages\Reports\IncomeStatement::getUrl([
  51. 'startDate' => $cell['start_date'],
  52. 'endDate' => $cell['end_date']
  53. ]) }}"
  54. >
  55. {{ $cell['name'] }}
  56. </x-filament::link>
  57. @elseif(isset($cell['id']) && isset($cell['start_date']) && isset($cell['end_date']))
  58. <x-filament::link
  59. color="primary"
  60. target="_blank"
  61. icon="heroicon-o-arrow-top-right-on-square"
  62. :icon-position="\Filament\Support\Enums\IconPosition::After"
  63. :icon-size="\Filament\Support\Enums\IconSize::Small"
  64. href="{{ \App\Filament\Company\Pages\Reports\AccountTransactions::getUrl([
  65. 'startDate' => $cell['start_date'],
  66. 'endDate' => $cell['end_date'],
  67. 'selectedAccount' => $cell['id']
  68. ]) }}"
  69. >
  70. {{ $cell['name'] }}
  71. </x-filament::link>
  72. @else
  73. {{ $cell['name'] }}
  74. @endif
  75. @else
  76. {{ $cell }}
  77. @endif
  78. </div>
  79. </x-filament-tables::cell>
  80. @endforeach
  81. </tr>
  82. @endforeach
  83. <tr>
  84. @foreach($subcategory->summary as $summaryIndex => $cell)
  85. <x-filament-tables::cell class="{{ $report->getAlignmentClass($summaryIndex) }}"
  86. style="padding-left: 2rem;">
  87. <div class="px-3 py-2 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
  88. {{ $cell }}
  89. </div>
  90. </x-filament-tables::cell>
  91. @endforeach
  92. </tr>
  93. @endforeach
  94. <tr>
  95. @foreach($category->summary as $summaryIndex => $cell)
  96. <x-filament-tables::cell class="{{ $report->getAlignmentClass($summaryIndex) }}">
  97. <div class="px-3 py-2 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
  98. {{ $cell }}
  99. </div>
  100. </x-filament-tables::cell>
  101. @endforeach
  102. </tr>
  103. <tr>
  104. <x-filament-tables::cell colspan="{{ count($report->getHeaders()) }}">
  105. <div class="px-3 py-2 leading-6 invisible">Hidden Text</div>
  106. </x-filament-tables::cell>
  107. </tr>
  108. </tbody>
  109. @endforeach
  110. @if(! empty($report->getOverallTotals()))
  111. <tfoot>
  112. <tr class="bg-gray-50 dark:bg-white/5">
  113. @foreach($report->getOverallTotals() as $index => $total)
  114. <x-filament-tables::cell class="{{ $report->getAlignmentClass($index) }}">
  115. <div class="px-3 py-2 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
  116. {{ $total }}
  117. </div>
  118. </x-filament-tables::cell>
  119. @endforeach
  120. </tr>
  121. </tfoot>
  122. @endif
  123. </table>