mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 11:48:05 +00:00
Revamp multi-account report.
This commit is contained in:
@@ -52,13 +52,14 @@ class MonthReportGenerator implements ReportGeneratorInterface
|
||||
public function generate(): string
|
||||
{
|
||||
$accountIds = implode(',', $this->accounts->pluck('id')->toArray());
|
||||
$expenseIds = implode(',', $this->expense->pluck('id')->toArray());
|
||||
$doubleIds = implode(',', $this->expense->pluck('id')->toArray());
|
||||
$reportType = 'account';
|
||||
$preferredPeriod = $this->preferredPeriod();
|
||||
try {
|
||||
$result = view(
|
||||
'reports.double.report', compact('accountIds', 'reportType', 'expenseIds', 'preferredPeriod')
|
||||
)->with('start', $this->start)->with('end', $this->end)->render();
|
||||
$result = view('reports.double.report', compact('accountIds', 'reportType', 'doubleIds', 'preferredPeriod'))
|
||||
->with('start', $this->start)->with('end', $this->end)
|
||||
->with('doubles', $this->expense)
|
||||
->render();
|
||||
} catch (Throwable $e) {
|
||||
Log::error(sprintf('Cannot render reports.double.report: %s', $e->getMessage()));
|
||||
$result = sprintf('Could not render report view: %s', $e->getMessage());
|
||||
|
Reference in New Issue
Block a user