Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

cash-flow-statement.blade.php 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. <x-company.tables.category-header :category-headers="$accountCategory->header"
  6. :alignment-class="[$report, 'getAlignmentClass']"/>
  7. @foreach($accountCategory->data as $categoryAccount)
  8. <tr>
  9. @foreach($categoryAccount as $accountIndex => $categoryAccountCell)
  10. <x-company.tables.cell :alignment-class="$report->getAlignmentClass($accountIndex)"
  11. indent="true">
  12. @if(is_array($categoryAccountCell) && isset($categoryAccountCell['name']))
  13. @if($categoryAccountCell['name'] === 'Retained Earnings' && isset($categoryAccountCell['start_date']) && isset($categoryAccountCell['end_date']))
  14. <x-filament::link
  15. color="primary"
  16. target="_blank"
  17. icon="heroicon-o-arrow-top-right-on-square"
  18. :icon-position="\Filament\Support\Enums\IconPosition::After"
  19. :icon-size="\Filament\Support\Enums\IconSize::Small"
  20. href="{{ \App\Filament\Company\Pages\Reports\IncomeStatement::getUrl([
  21. 'startDate' => $categoryAccountCell['start_date'],
  22. 'endDate' => $categoryAccountCell['end_date']
  23. ]) }}"
  24. >
  25. {{ $categoryAccountCell['name'] }}
  26. </x-filament::link>
  27. @elseif(isset($categoryAccountCell['id']) && isset($categoryAccountCell['start_date']) && isset($categoryAccountCell['end_date']))
  28. <x-filament::link
  29. color="primary"
  30. target="_blank"
  31. icon="heroicon-o-arrow-top-right-on-square"
  32. :icon-position="\Filament\Support\Enums\IconPosition::After"
  33. :icon-size="\Filament\Support\Enums\IconSize::Small"
  34. href="{{ \App\Filament\Company\Pages\Reports\AccountTransactions::getUrl([
  35. 'startDate' => $categoryAccountCell['start_date'],
  36. 'endDate' => $categoryAccountCell['end_date'],
  37. 'selectedAccount' => $categoryAccountCell['id']
  38. ]) }}"
  39. >
  40. {{ $categoryAccountCell['name'] }}
  41. </x-filament::link>
  42. @else
  43. {{ $categoryAccountCell['name'] }}
  44. @endif
  45. @else
  46. {{ $categoryAccountCell }}
  47. @endif
  48. </x-company.tables.cell>
  49. @endforeach
  50. </tr>
  51. @endforeach
  52. @foreach($accountCategory->types as $accountType)
  53. <tr class="bg-gray-50 dark:bg-white/5">
  54. @foreach($accountType->header as $accountTypeHeaderIndex => $accountTypeHeaderCell)
  55. <x-company.tables.cell :alignment-class="$report->getAlignmentClass($accountTypeHeaderIndex)"
  56. indent="true" bold="true">
  57. {{ $accountTypeHeaderCell }}
  58. </x-company.tables.cell>
  59. @endforeach
  60. </tr>
  61. @foreach($accountType->data as $typeAccount)
  62. <tr>
  63. @foreach($typeAccount as $accountIndex => $typeAccountCell)
  64. <x-company.tables.cell :alignment-class="$report->getAlignmentClass($accountIndex)"
  65. indent="true">
  66. @if(is_array($typeAccountCell) && isset($typeAccountCell['name']))
  67. @if($typeAccountCell['name'] === 'Retained Earnings' && isset($typeAccountCell['start_date']) && isset($typeAccountCell['end_date']))
  68. <x-filament::link
  69. color="primary"
  70. target="_blank"
  71. icon="heroicon-o-arrow-top-right-on-square"
  72. :icon-position="\Filament\Support\Enums\IconPosition::After"
  73. :icon-size="\Filament\Support\Enums\IconSize::Small"
  74. href="{{ \App\Filament\Company\Pages\Reports\IncomeStatement::getUrl([
  75. 'startDate' => $typeAccountCell['start_date'],
  76. 'endDate' => $typeAccountCell['end_date']
  77. ]) }}"
  78. >
  79. {{ $typeAccountCell['name'] }}
  80. </x-filament::link>
  81. @elseif(isset($typeAccountCell['id']) && isset($typeAccountCell['start_date']) && isset($typeAccountCell['end_date']))
  82. <x-filament::link
  83. color="primary"
  84. target="_blank"
  85. icon="heroicon-o-arrow-top-right-on-square"
  86. :icon-position="\Filament\Support\Enums\IconPosition::After"
  87. :icon-size="\Filament\Support\Enums\IconSize::Small"
  88. href="{{ \App\Filament\Company\Pages\Reports\AccountTransactions::getUrl([
  89. 'startDate' => $typeAccountCell['start_date'],
  90. 'endDate' => $typeAccountCell['end_date'],
  91. 'selectedAccount' => $typeAccountCell['id']
  92. ]) }}"
  93. >
  94. {{ $typeAccountCell['name'] }}
  95. </x-filament::link>
  96. @else
  97. {{ $typeAccountCell['name'] }}
  98. @endif
  99. @else
  100. {{ $typeAccountCell }}
  101. @endif
  102. </x-company.tables.cell>
  103. @endforeach
  104. </tr>
  105. @endforeach
  106. <tr>
  107. @foreach($accountType->summary as $accountTypeSummaryIndex => $accountTypeSummaryCell)
  108. <x-company.tables.cell :alignment-class="$report->getAlignmentClass($accountTypeSummaryIndex)"
  109. indent="true" bold="true">
  110. {{ $accountTypeSummaryCell }}
  111. </x-company.tables.cell>
  112. @endforeach
  113. </tr>
  114. @endforeach
  115. <tr>
  116. @foreach($accountCategory->summary as $accountCategorySummaryIndex => $accountCategorySummaryCell)
  117. <x-company.tables.cell :alignment-class="$report->getAlignmentClass($accountCategorySummaryIndex)"
  118. bold="true" :underline-bold="$loop->last">
  119. {{ $accountCategorySummaryCell }}
  120. </x-company.tables.cell>
  121. @endforeach
  122. </tr>
  123. <tr>
  124. <td colspan="{{ count($report->getHeaders()) }}">
  125. <div class="min-h-12"></div>
  126. </td>
  127. </tr>
  128. </tbody>
  129. @endforeach
  130. @foreach($report->getOverview() as $overviewCategory)
  131. <tbody class="divide-y divide-gray-200 whitespace-nowrap dark:divide-white/5">
  132. <x-company.tables.category-header :category-headers="$overviewCategory->header"
  133. :alignment-class="[$report, 'getAlignmentClass']"/>
  134. @foreach($overviewCategory->data as $overviewAccount)
  135. <tr>
  136. @foreach($overviewAccount as $overviewIndex => $overviewCell)
  137. <x-company.tables.cell :alignment-class="$report->getAlignmentClass($overviewIndex)">
  138. @if(is_array($overviewCell) && isset($overviewCell['name']))
  139. @if(isset($overviewCell['id']) && isset($overviewCell['start_date']) && isset($overviewCell['end_date']))
  140. <x-filament::link
  141. color="primary"
  142. target="_blank"
  143. icon="heroicon-o-arrow-top-right-on-square"
  144. :icon-position="\Filament\Support\Enums\IconPosition::After"
  145. :icon-size="\Filament\Support\Enums\IconSize::Small"
  146. href="{{ \App\Filament\Company\Pages\Reports\AccountTransactions::getUrl([
  147. 'startDate' => $overviewCell['start_date'],
  148. 'endDate' => $overviewCell['end_date'],
  149. 'selectedAccount' => $overviewCell['id']
  150. ]) }}"
  151. >
  152. {{ $overviewCell['name'] }}
  153. </x-filament::link>
  154. @else
  155. {{ $overviewCell['name'] }}
  156. @endif
  157. @else
  158. {{ $overviewCell }}
  159. @endif
  160. </x-company.tables.cell>
  161. @endforeach
  162. </tr>
  163. @endforeach
  164. <tr>
  165. @foreach($overviewCategory->summary as $overviewSummaryIndex => $overviewSummaryCell)
  166. <x-company.tables.cell :alignment-class="$report->getAlignmentClass($overviewSummaryIndex)" bold="true">
  167. {{ $overviewSummaryCell }}
  168. </x-company.tables.cell>
  169. @endforeach
  170. </tr>
  171. @if($overviewCategory->header['account_name'] === 'Starting Balance')
  172. <!-- Insert Gross Cash Inflow, Gross Cash Outflow, and Net Cash Change here -->
  173. @foreach($report->getSummaryAlignedWithColumns() as $summaryRow)
  174. <tr>
  175. @foreach($summaryRow as $summaryIndex => $summaryCell)
  176. <x-company.tables.cell :alignment-class="$report->getAlignmentClass($summaryIndex)"
  177. :bold="$loop->parent->last"
  178. :underline-bold="$loop->parent->last && $summaryIndex === 'net_movement'"
  179. :underline-thin="$loop->parent->remaining === 1 && $summaryIndex === 'net_movement'"
  180. >
  181. {{ $summaryCell }}
  182. </x-company.tables.cell>
  183. @endforeach
  184. </tr>
  185. @endforeach
  186. @endif
  187. </tbody>
  188. @endforeach
  189. <x-company.tables.footer :totals="$report->getOverallTotals()" :alignment-class="[$report, 'getAlignmentClass']"/>
  190. </table>