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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <x-filament-panels::page>
  2. <x-filament::section>
  3. <div class="flex flex-col md:flex-row items-start md:items-center justify-between gap-4 md:gap-8">
  4. <!-- Form Container -->
  5. <div class="flex-grow">
  6. {{ $this->getFiltersForm() }}
  7. </div>
  8. <!-- Grouping Button and Column Toggle -->
  9. <div class="flex flex-col md:flex-row items-start md:items-center gap-4 md:gap-8 flex-shrink-0">
  10. @if($this->hasToggleableColumns())
  11. <x-filament-tables::column-toggle.dropdown
  12. :form="$this->toggleTableColumnForm"
  13. :trigger-action="$this->toggleColumnsAction"
  14. />
  15. @endif
  16. {{ $this->getFiltersApplyAction() }}
  17. </div>
  18. </div>
  19. </x-filament::section>
  20. <x-filament::section>
  21. <!-- Summary Section -->
  22. @if($this->reportLoaded)
  23. <div
  24. class="flex flex-col md:flex-row items-center md:items-end text-center justify-center gap-4 md:gap-8">
  25. @foreach($this->report->getSummary() as $summary)
  26. <div class="text-sm">
  27. <div class="text-gray-600 font-medium mb-2">{{ $summary['label'] }}</div>
  28. @php
  29. $isNetEarnings = $summary['label'] === 'Net Earnings';
  30. $isPositive = money($summary['value'], \App\Utilities\Currency\CurrencyAccessor::getDefaultCurrency())->isPositive();
  31. @endphp
  32. <strong
  33. @class([
  34. 'text-lg',
  35. 'text-green-700' => $isNetEarnings && $isPositive,
  36. 'text-danger-700' => $isNetEarnings && ! $isPositive,
  37. ])
  38. >
  39. {{ $summary['value'] }}
  40. </strong>
  41. </div>
  42. @if(! $loop->last)
  43. <div class="flex items-center justify-center px-2">
  44. <strong class="text-lg">
  45. {{ $loop->remaining === 1 ? '=' : '-' }}
  46. </strong>
  47. </div>
  48. @endif
  49. @endforeach
  50. </div>
  51. @endif
  52. </x-filament::section>
  53. <x-filament-tables::container>
  54. <div class="es-table__header-ctn"></div>
  55. <div wire:init="applyFilters"
  56. class="relative divide-y divide-gray-200 overflow-x-auto dark:divide-white/10 dark:border-t-white/10 min-h-64">
  57. @if($this->reportLoaded)
  58. <div wire:loading.remove wire:target="applyFilters">
  59. @if($this->report)
  60. <x-company.tables.reports.detailed-report :report="$this->report"/>
  61. @endif
  62. </div>
  63. @else
  64. <div class="absolute inset-0 flex items-center justify-center">
  65. <div wire:loading wire:target="applyFilters">
  66. <x-filament::loading-indicator class="p-6 text-primary-700 dark:text-primary-300"/>
  67. </div>
  68. </div>
  69. @endif
  70. </div>
  71. <div class="es-table__footer-ctn border-t border-gray-200"></div>
  72. </x-filament-tables::container>
  73. </x-filament-panels::page>