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.

balance-sheet.blade.php 3.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <x-filament-panels::page>
  2. <x-filament::section>
  3. <div class="flex flex-col lg:flex-row items-start lg:items-end justify-between gap-4">
  4. <!-- Form Container -->
  5. @if(method_exists($this, 'filtersForm'))
  6. {{ $this->filtersForm }}
  7. @endif
  8. <!-- Grouping Button and Column Toggle -->
  9. @if($this->hasToggleableColumns())
  10. <div class="lg:mb-1">
  11. <x-filament-tables::column-toggle.dropdown
  12. :form="$this->getTableColumnToggleForm()"
  13. :trigger-action="$this->getToggleColumnsTriggerAction()"
  14. />
  15. </div>
  16. @endif
  17. <div class="inline-flex items-center min-w-0 lg:min-w-[9.5rem] justify-end">
  18. {{ $this->applyFiltersAction }}
  19. </div>
  20. </div>
  21. </x-filament::section>
  22. <x-filament::section>
  23. <!-- Summary Section -->
  24. @if($this->reportLoaded)
  25. <div
  26. class="flex flex-col md:flex-row items-center md:items-end text-center justify-center gap-4 md:gap-8">
  27. @foreach($this->report->getSummary() as $summary)
  28. <div class="text-sm">
  29. <div class="text-gray-600 font-medium mb-2">{{ $summary['label'] }}</div>
  30. @php
  31. $isNetAssets = $summary['label'] === 'Net Assets';
  32. $isPositive = money($summary['value'], \App\Utilities\Currency\CurrencyAccessor::getDefaultCurrency())->isPositive();
  33. @endphp
  34. <strong
  35. @class([
  36. 'text-lg',
  37. 'text-green-700' => $isNetAssets && $isPositive,
  38. 'text-danger-700' => $isNetAssets && ! $isPositive,
  39. ])
  40. >
  41. {{ $summary['value'] }}
  42. </strong>
  43. </div>
  44. @if(! $loop->last)
  45. <div class="flex items-center justify-center px-2">
  46. <strong class="text-lg">
  47. {{ $loop->remaining === 1 ? '=' : '-' }}
  48. </strong>
  49. </div>
  50. @endif
  51. @endforeach
  52. </div>
  53. @endif
  54. </x-filament::section>
  55. <x-filament::tabs>
  56. <x-filament::tabs.item
  57. :active="$activeTab === 'summary'"
  58. wire:click="$set('activeTab', 'summary')"
  59. >
  60. Summary
  61. </x-filament::tabs.item>
  62. <x-filament::tabs.item
  63. :active="$activeTab === 'details'"
  64. wire:click="$set('activeTab', 'details')"
  65. >
  66. Details
  67. </x-filament::tabs.item>
  68. </x-filament::tabs>
  69. <x-company.tables.container :report-loaded="$this->reportLoaded">
  70. @if($this->report)
  71. @if($activeTab === 'summary')
  72. <x-company.tables.reports.balance-sheet-summary :report="$this->report"/>
  73. @elseif($activeTab === 'details')
  74. <x-company.tables.reports.balance-sheet :report="$this->report"/>
  75. @endif
  76. @endif
  77. </x-company.tables.container>
  78. </x-filament-panels::page>