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 4.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <table class="w-full table-auto divide-y divide-gray-200 dark:divide-white/5">
  2. <x-company.tables.header :headers="$report->getHeaders()" :alignment-class="[$report, 'getAlignmentClass']"/>
  3. @foreach($report->getCategories() as $accountCategory)
  4. <tbody class="divide-y divide-gray-200 whitespace-nowrap dark:divide-white/5">
  5. @if(! empty($accountCategory->header))
  6. <x-company.tables.category-header :category-headers="$accountCategory->header"
  7. :alignment-class="[$report, 'getAlignmentClass']"/>
  8. @endif
  9. @foreach($accountCategory->data as $categoryAccount)
  10. <tr>
  11. @foreach($categoryAccount as $accountIndex => $categoryAccountCell)
  12. <x-company.tables.cell :alignment-class="$report->getAlignmentClass($accountIndex)">
  13. @if(is_array($categoryAccountCell) && isset($categoryAccountCell['name']))
  14. @if($categoryAccountCell['name'] === 'Retained Earnings' && isset($categoryAccountCell['start_date']) && isset($categoryAccountCell['end_date']))
  15. <x-filament::link
  16. color="primary"
  17. target="_blank"
  18. icon="heroicon-o-arrow-top-right-on-square"
  19. :icon-position="\Filament\Support\Enums\IconPosition::After"
  20. :icon-size="\Filament\Support\Enums\IconSize::Small"
  21. href="{{ \App\Filament\Company\Pages\Reports\IncomeStatement::getUrl([
  22. 'startDate' => $categoryAccountCell['start_date'],
  23. 'endDate' => $categoryAccountCell['end_date']
  24. ]) }}"
  25. >
  26. {{ $categoryAccountCell['name'] }}
  27. </x-filament::link>
  28. @elseif(isset($categoryAccountCell['id']) && isset($categoryAccountCell['start_date']) && isset($categoryAccountCell['end_date']))
  29. <x-filament::link
  30. color="primary"
  31. target="_blank"
  32. icon="heroicon-o-arrow-top-right-on-square"
  33. :icon-position="\Filament\Support\Enums\IconPosition::After"
  34. :icon-size="\Filament\Support\Enums\IconSize::Small"
  35. href="{{ \App\Filament\Company\Pages\Reports\AccountTransactions::getUrl([
  36. 'startDate' => $categoryAccountCell['start_date'],
  37. 'endDate' => $categoryAccountCell['end_date'],
  38. 'selectedAccount' => $categoryAccountCell['id']
  39. ]) }}"
  40. >
  41. {{ $categoryAccountCell['name'] }}
  42. </x-filament::link>
  43. @else
  44. {{ $categoryAccountCell['name'] }}
  45. @endif
  46. @else
  47. {{ $categoryAccountCell }}
  48. @endif
  49. </x-company.tables.cell>
  50. @endforeach
  51. </tr>
  52. @endforeach
  53. @if(! empty($accountCategory->summary))
  54. <tr>
  55. @foreach($accountCategory->summary as $accountCategorySummaryIndex => $accountCategorySummaryCell)
  56. <x-company.tables.cell :alignment-class="$report->getAlignmentClass($accountCategorySummaryIndex)"
  57. bold="true">
  58. {{ $accountCategorySummaryCell }}
  59. </x-company.tables.cell>
  60. @endforeach
  61. </tr>
  62. <tr>
  63. <td colspan="{{ count($report->getHeaders()) }}">
  64. <div class="min-h-12"></div>
  65. </td>
  66. </tr>
  67. @endif
  68. </tbody>
  69. @endforeach
  70. <x-company.tables.footer :totals="$report->getOverallTotals()" :alignment-class="[$report, 'getAlignmentClass']"/>
  71. </table>