mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Various code cleanup and fixed alignments.
This commit is contained in:
@@ -56,13 +56,13 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
$collector->setBudgets($this->getBudgets());
|
||||
}
|
||||
$collector->withBudgetInformation()->withAccountInformation()->withCategoryInformation();
|
||||
$journals = $collector->getExtractedJournals();
|
||||
$array = [];
|
||||
$journals = $collector->getExtractedJournals();
|
||||
$array = [];
|
||||
|
||||
foreach ($journals as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$budgetId = (int)$journal['budget_id'];
|
||||
$budgetName = (string)$journal['budget_name'];
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$budgetId = (int)$journal['budget_id'];
|
||||
$budgetName = (string)$journal['budget_name'];
|
||||
|
||||
// catch "no budget" entries.
|
||||
if (0 === $budgetId) {
|
||||
@@ -70,7 +70,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
}
|
||||
|
||||
// info about the currency:
|
||||
$array[$currencyId] ??= [
|
||||
$array[$currencyId] ??= [
|
||||
'budgets' => [],
|
||||
'currency_id' => $currencyId,
|
||||
'currency_name' => $journal['currency_name'],
|
||||
@@ -88,8 +88,8 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
|
||||
// add journal to array:
|
||||
// only a subset of the fields.
|
||||
$journalId = (int)$journal['transaction_journal_id'];
|
||||
$final = [
|
||||
$journalId = (int)$journal['transaction_journal_id'];
|
||||
$final = [
|
||||
'amount' => app('steam')->negative($journal['amount']),
|
||||
'currency_id' => $journal['currency_id'],
|
||||
'foreign_amount' => null,
|
||||
|
Reference in New Issue
Block a user