mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +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));
|
||||
|
@@ -35,12 +35,12 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class CategoryReportGenerator
|
||||
{
|
||||
private Collection $accounts;
|
||||
private Carbon $end;
|
||||
private Collection $accounts;
|
||||
private Carbon $end;
|
||||
private readonly NoCategoryRepositoryInterface $noCatRepository;
|
||||
private readonly OperationsRepositoryInterface $opsRepository;
|
||||
private array $report;
|
||||
private Carbon $start;
|
||||
private array $report;
|
||||
private Carbon $start;
|
||||
|
||||
/**
|
||||
* CategoryReportGenerator constructor.
|
||||
|
@@ -31,9 +31,9 @@ use Illuminate\Support\Facades\Log;
|
||||
|
||||
class TransactionSummarizer
|
||||
{
|
||||
private User $user;
|
||||
private TransactionCurrency $default;
|
||||
private bool $convertToNative = false;
|
||||
private TransactionCurrency $default;
|
||||
private User $user;
|
||||
|
||||
public function __construct(?User $user = null)
|
||||
{
|
||||
@@ -163,9 +163,6 @@ class TransactionSummarizer
|
||||
$default = Amount::getNativeCurrencyByUserGroup($this->user->userGroup);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Log::debug(sprintf('groupByDirection(array, %s, %s).', $direction, $method));
|
||||
foreach ($journals as $journal) {
|
||||
// currency
|
||||
|
Reference in New Issue
Block a user