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.

Reports.php 4.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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\IncomeStatement;
  7. use App\Filament\Company\Pages\Reports\TrialBalance;
  8. use App\Infolists\Components\ReportEntry;
  9. use Filament\Infolists\Components\Section;
  10. use Filament\Infolists\Infolist;
  11. use Filament\Pages\Page;
  12. use Filament\Support\Colors\Color;
  13. class Reports extends Page
  14. {
  15. protected static ?string $navigationIcon = 'heroicon-o-document-chart-bar';
  16. protected static string $view = 'filament.company.pages.reports';
  17. public function reportsInfolist(Infolist $infolist): Infolist
  18. {
  19. return $infolist
  20. ->state([])
  21. ->schema([
  22. Section::make('Financial Statements')
  23. ->aside()
  24. ->description('Key financial statements that provide a snapshot of your company’s financial health.')
  25. ->extraAttributes(['class' => 'es-report-card'])
  26. ->schema([
  27. ReportEntry::make('income_statement')
  28. ->hiddenLabel()
  29. ->heading('Income Statement')
  30. ->description('Tracks revenue and expenses to show profit or loss over a specific period of time.')
  31. ->icon('heroicon-o-chart-bar')
  32. ->iconColor(Color::Indigo)
  33. ->url(IncomeStatement::getUrl()),
  34. ReportEntry::make('balance_sheet')
  35. ->hiddenLabel()
  36. ->heading('Balance Sheet')
  37. ->description('Snapshot of assets, liabilities, and equity at a specific point in time.')
  38. ->icon('heroicon-o-clipboard-document-list')
  39. ->iconColor(Color::Emerald)
  40. ->url(BalanceSheet::getUrl()),
  41. ReportEntry::make('cash_flow_statement')
  42. ->hiddenLabel()
  43. ->heading('Cash Flow Statement')
  44. ->description('Shows cash inflows and outflows over a specific period of time.')
  45. ->icon('heroicon-o-document-currency-dollar')
  46. ->iconColor(Color::Cyan)
  47. ->url('#'),
  48. ]),
  49. Section::make('Detailed Reports')
  50. ->aside()
  51. ->description('Dig into the details of your company’s transactions, balances, and accounts.')
  52. ->extraAttributes(['class' => 'es-report-card'])
  53. ->schema([
  54. ReportEntry::make('account_balances')
  55. ->hiddenLabel()
  56. ->heading('Account Balances')
  57. ->description('Summary view of balances and activity for all accounts.')
  58. ->icon('heroicon-o-currency-dollar')
  59. ->iconColor(Color::Teal)
  60. ->url(AccountBalances::getUrl()),
  61. ReportEntry::make('trial_balance')
  62. ->hiddenLabel()
  63. ->heading('Trial Balance')
  64. ->description('The sum of all debit and credit balances for all accounts on a single day. This helps to ensure that the books are in balance.')
  65. ->icon('heroicon-o-scale')
  66. ->iconColor(Color::Sky)
  67. ->url(TrialBalance::getUrl()),
  68. ReportEntry::make('account_transactions')
  69. ->hiddenLabel()
  70. ->heading('Account Transactions')
  71. ->description('A record of all transactions for a company. The general ledger is the core of a company\'s financial records.')
  72. ->icon('heroicon-o-adjustments-horizontal')
  73. ->iconColor(Color::Amber)
  74. ->url(AccountTransactions::getUrl()),
  75. ]),
  76. ]);
  77. }
  78. }