reportService = $reportService; $this->exportService = $exportService; } public function getTable(): array { return [ Column::make('account_code') ->label('Account Code') ->toggleable() ->alignment(Alignment::Center), Column::make('account_name') ->label('Account') ->alignment(Alignment::Left), Column::make('ending_balance') ->label('Amount') ->alignment(Alignment::Right), ]; } public function filtersForm(Form $form): Form { return $form ->inlineLabel() ->columns(3) ->schema([ DateRangeSelect::make('dateRange') ->label('As of') ->selectablePlaceholder(false) ->endDateField('asOfDate'), $this->getAsOfDateFormComponent() ->hiddenLabel() ->extraFieldWrapperAttributes([]), ]); } protected function buildReport(array $columns): ReportDTO { return $this->reportService->buildBalanceSheetReport($this->getFormattedAsOfDate(), $columns); } protected function getTransformer(ReportDTO $reportDTO): ExportableReport { return new BalanceSheetReportTransformer($reportDTO); } public function exportCSV(): StreamedResponse { return $this->exportService->exportToCsv($this->company, $this->report, $this->getFilterState('asOfDate')); } public function exportPDF(): StreamedResponse { return $this->exportService->exportToPdf($this->company, $this->report, $this->getFilterState('asOfDate')); } }