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.

income-statement.blade.php 4.5KB

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