mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 13:10:35 +00:00
Clean up code.
This commit is contained in:
@@ -43,16 +43,16 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class BudgetReportGenerator
|
||||
{
|
||||
private Collection $accounts;
|
||||
private Collection $accounts;
|
||||
private readonly BudgetLimitRepositoryInterface $blRepository;
|
||||
private Collection $budgets;
|
||||
private TransactionCurrency $currency;
|
||||
private Carbon $end;
|
||||
private Collection $budgets;
|
||||
private TransactionCurrency $currency;
|
||||
private Carbon $end;
|
||||
private readonly NoBudgetRepositoryInterface $nbRepository;
|
||||
private readonly OperationsRepositoryInterface $opsRepository;
|
||||
private array $report;
|
||||
private array $report;
|
||||
private readonly BudgetRepositoryInterface $repository;
|
||||
private Carbon $start;
|
||||
private Carbon $start;
|
||||
|
||||
/**
|
||||
* BudgetReportGenerator constructor.
|
||||
@@ -213,16 +213,16 @@ class BudgetReportGenerator
|
||||
// make sum information:
|
||||
$this->report['sums'][$currencyId]
|
||||
??= [
|
||||
'budgeted' => '0',
|
||||
'spent' => '0',
|
||||
'left' => '0',
|
||||
'overspent' => '0',
|
||||
'currency_id' => $currencyId,
|
||||
'currency_code' => $limitCurrency->code,
|
||||
'currency_name' => $limitCurrency->name,
|
||||
'currency_symbol' => $limitCurrency->symbol,
|
||||
'currency_decimal_places' => $limitCurrency->decimal_places,
|
||||
];
|
||||
'budgeted' => '0',
|
||||
'spent' => '0',
|
||||
'left' => '0',
|
||||
'overspent' => '0',
|
||||
'currency_id' => $currencyId,
|
||||
'currency_code' => $limitCurrency->code,
|
||||
'currency_name' => $limitCurrency->name,
|
||||
'currency_symbol' => $limitCurrency->symbol,
|
||||
'currency_decimal_places' => $limitCurrency->decimal_places,
|
||||
];
|
||||
$this->report['sums'][$currencyId]['budgeted'] = bcadd((string) $this->report['sums'][$currencyId]['budgeted'], $limit->amount);
|
||||
$this->report['sums'][$currencyId]['spent'] = bcadd((string) $this->report['sums'][$currencyId]['spent'], $spent);
|
||||
$this->report['sums'][$currencyId]['left'] = bcadd((string) $this->report['sums'][$currencyId]['left'], bcadd($limit->amount, $spent));
|
||||
|
||||
Reference in New Issue
Block a user