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.

detailed-report.blade.php 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. <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($category->header as $headerIndex => $header)
  17. <x-filament-tables::cell class="{{ $report->getAlignmentClass($headerIndex) }}">
  18. <div class="px-3 py-2 text-sm font-semibold text-gray-950 dark:text-white">
  19. {{ $header }}
  20. </div>
  21. </x-filament-tables::cell>
  22. @endforeach
  23. </tr>
  24. @foreach($category->data as $dataIndex => $account)
  25. <tr>
  26. @foreach($account as $cellIndex => $cell)
  27. <x-filament-tables::cell class="{{ $report->getAlignmentClass($cellIndex) }}">
  28. <div class="px-3 py-4 text-sm leading-6 text-gray-950 dark:text-white">
  29. @if(is_array($cell) && isset($cell['name']))
  30. @if($cell['name'] === 'Retained Earnings' && isset($cell['start_date']) && isset($cell['end_date']))
  31. <x-filament::link
  32. color="primary"
  33. target="_blank"
  34. icon="heroicon-o-arrow-top-right-on-square"
  35. :icon-position="\Filament\Support\Enums\IconPosition::After"
  36. :icon-size="\Filament\Support\Enums\IconSize::Small"
  37. href="{{ \App\Filament\Company\Pages\Reports\IncomeStatement::getUrl([
  38. 'startDate' => $cell['start_date'],
  39. 'endDate' => $cell['end_date']
  40. ]) }}"
  41. >
  42. {{ $cell['name'] }}
  43. </x-filament::link>
  44. @elseif(isset($cell['id']) && isset($cell['start_date']) && isset($cell['end_date']))
  45. <x-filament::link
  46. color="primary"
  47. target="_blank"
  48. icon="heroicon-o-arrow-top-right-on-square"
  49. :icon-position="\Filament\Support\Enums\IconPosition::After"
  50. :icon-size="\Filament\Support\Enums\IconSize::Small"
  51. href="{{ \App\Filament\Company\Pages\Reports\AccountTransactions::getUrl([
  52. 'startDate' => $cell['start_date'],
  53. 'endDate' => $cell['end_date'],
  54. 'selectedAccount' => $cell['id']
  55. ]) }}"
  56. >
  57. {{ $cell['name'] }}
  58. </x-filament::link>
  59. @else
  60. {{ $cell['name'] }}
  61. @endif
  62. @else
  63. {{ $cell }}
  64. @endif
  65. </div>
  66. </x-filament-tables::cell>
  67. @endforeach
  68. </tr>
  69. @endforeach
  70. <tr>
  71. @foreach($category->summary as $summaryIndex => $cell)
  72. <x-filament-tables::cell class="{{ $report->getAlignmentClass($summaryIndex) }}">
  73. <div class="px-3 py-2 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
  74. {{ $cell }}
  75. </div>
  76. </x-filament-tables::cell>
  77. @endforeach
  78. </tr>
  79. <tr>
  80. <x-filament-tables::cell colspan="{{ count($report->getHeaders()) }}">
  81. <div class="px-3 py-2 leading-6 invisible">Hidden Text</div>
  82. </x-filament-tables::cell>
  83. </tr>
  84. </tbody>
  85. @endforeach
  86. @if(! empty($report->getOverallTotals()))
  87. <tfoot>
  88. <tr class="bg-gray-50 dark:bg-white/5">
  89. @foreach($report->getOverallTotals() as $index => $total)
  90. <x-filament-tables::cell class="{{ $report->getAlignmentClass($index) }}">
  91. <div class="px-3 py-2 text-sm leading-6 font-semibold text-gray-950 dark:text-white">
  92. {{ $total }}
  93. </div>
  94. </x-filament-tables::cell>
  95. @endforeach
  96. </tr>
  97. </tfoot>
  98. @endif
  99. </table>