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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. namespace App\Filament\Company\Pages;
  3. use App\Filament\Company\Pages\Reports\AccountBalances;
  4. use App\Filament\Company\Pages\Reports\AccountTransactions;
  5. use App\Filament\Company\Pages\Reports\BalanceSheet;
  6. use App\Filament\Company\Pages\Reports\CashFlowStatement;
  7. use App\Filament\Company\Pages\Reports\IncomeStatement;
  8. use App\Filament\Company\Pages\Reports\TrialBalance;
  9. use App\Infolists\Components\ReportEntry;
  10. use Filament\Infolists\Components\Section;
  11. use Filament\Infolists\Infolist;
  12. use Filament\Pages\Page;
  13. use Filament\Support\Colors\Color;
  14. class Reports extends Page
  15. {
  16. protected static ?string $navigationIcon = 'heroicon-o-document-chart-bar';
  17. protected static string $view = 'filament.company.pages.reports';
  18. public function reportsInfolist(Infolist $infolist): Infolist
  19. {
  20. return $infolist
  21. ->state([])
  22. ->schema([
  23. Section::make('Financial Statements')
  24. ->aside()
  25. ->description('Key financial statements that provide an overview of your company’s financial health and performance.')
  26. ->extraAttributes(['class' => 'es-report-card'])
  27. ->schema([
  28. ReportEntry::make('income_statement')
  29. ->hiddenLabel()
  30. ->heading('Income Statement')
  31. ->description('Shows revenue, expenses, and net earnings over a period, indicating overall financial performance.')
  32. ->icon('heroicon-o-chart-bar')
  33. ->iconColor(Color::Indigo)
  34. ->url(IncomeStatement::getUrl()),
  35. ReportEntry::make('balance_sheet')
  36. ->hiddenLabel()
  37. ->heading('Balance Sheet')
  38. ->description('Displays your company’s assets, liabilities, and equity at a single point in time, showing overall financial health and stability.')
  39. ->icon('heroicon-o-clipboard-document-list')
  40. ->iconColor(Color::Emerald)
  41. ->url(BalanceSheet::getUrl()),
  42. ReportEntry::make('cash_flow_statement')
  43. ->hiddenLabel()
  44. ->heading('Cash Flow Statement')
  45. ->description('Tracks cash inflows and outflows, giving insight into liquidity and cash management over a period.')
  46. ->icon('heroicon-o-document-currency-dollar')
  47. ->iconColor(Color::Cyan)
  48. ->url(CashFlowStatement::getUrl()),
  49. ]),
  50. Section::make('Detailed Reports')
  51. ->aside()
  52. ->description('Detailed reports that provide a comprehensive view of your company’s financial transactions and account balances.')
  53. ->extraAttributes(['class' => 'es-report-card'])
  54. ->schema([
  55. ReportEntry::make('account_balances')
  56. ->hiddenLabel()
  57. ->heading('Account Balances')
  58. ->description('Lists all accounts and their balances, including starting, debit, credit, net movement, and ending balances.')
  59. ->icon('heroicon-o-currency-dollar')
  60. ->iconColor(Color::Teal)
  61. ->url(AccountBalances::getUrl()),
  62. ReportEntry::make('trial_balance')
  63. ->hiddenLabel()
  64. ->heading('Trial Balance')
  65. ->description('Summarizes all account debits and credits on a specific date to verify the ledger is balanced.')
  66. ->icon('heroicon-o-scale')
  67. ->iconColor(Color::Sky)
  68. ->url(TrialBalance::getUrl()),
  69. ReportEntry::make('account_transactions')
  70. ->hiddenLabel()
  71. ->heading('Account Transactions')
  72. ->description('A record of all transactions, essential for monitoring and reconciling financial activity in the ledger.')
  73. ->icon('heroicon-o-adjustments-horizontal')
  74. ->iconColor(Color::Amber)
  75. ->url(AccountTransactions::getUrl()),
  76. ]),
  77. ]);
  78. }
  79. }