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

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