mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-10 12:24:50 +00:00
Auto commit for release 'develop' on 2025-03-14
This commit is contained in:
@@ -263,7 +263,7 @@ abstract class Controller extends BaseController
|
||||
|
||||
// the transformer, at this point, needs to collect information that ALL items in the collection
|
||||
// require, like meta-data and stuff like that, and save it for later.
|
||||
//$objects = $transformer->collectMetaData($objects);
|
||||
// $objects = $transformer->collectMetaData($objects);
|
||||
$paginator->setCollection($objects);
|
||||
|
||||
$resource = new FractalCollection($objects, $transformer, $key);
|
||||
@@ -284,7 +284,7 @@ abstract class Controller extends BaseController
|
||||
$baseUrl = sprintf('%s/api/v1', request()->getSchemeAndHttpHost());
|
||||
$manager->setSerializer(new JsonApiSerializer($baseUrl));
|
||||
|
||||
//$transformer->collectMetaData(new Collection([$object]));
|
||||
// $transformer->collectMetaData(new Collection([$object]));
|
||||
|
||||
$resource = new Item($object, $transformer, $key);
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ class Controller extends BaseController
|
||||
|
||||
// the transformer, at this point, needs to collect information that ALL items in the collection
|
||||
// require, like meta-data and stuff like that, and save it for later.
|
||||
//$objects = $transformer->collectMetaData($objects);
|
||||
// $objects = $transformer->collectMetaData($objects);
|
||||
$paginator->setCollection($objects);
|
||||
|
||||
$resource = new FractalCollection($objects, $transformer, $key);
|
||||
@@ -188,7 +188,7 @@ class Controller extends BaseController
|
||||
$baseUrl = request()->getSchemeAndHttpHost().'/api/v2';
|
||||
$manager->setSerializer(new JsonApiSerializer($baseUrl));
|
||||
|
||||
//$transformer->collectMetaData(new Collection([$object]));
|
||||
// $transformer->collectMetaData(new Collection([$object]));
|
||||
|
||||
$resource = new Item($object, $transformer, $key);
|
||||
|
||||
|
||||
@@ -680,7 +680,8 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfac
|
||||
|
||||
// fields
|
||||
'transaction_journals.date', 'transaction_types.type', 'transaction_journals.transaction_currency_id', 'transactions.amount'])
|
||||
->toArray();
|
||||
->toArray()
|
||||
;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,9 +77,9 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface, UserGroupIn
|
||||
$journalId = (int) $journal['transaction_journal_id'];
|
||||
$array[$currencyId]['categories'][0]['transaction_journals'][$journalId]
|
||||
= [
|
||||
'amount' => app('steam')->negative($journal['amount']),
|
||||
'date' => $journal['date'],
|
||||
];
|
||||
'amount' => app('steam')->negative($journal['amount']),
|
||||
'date' => $journal['date'],
|
||||
];
|
||||
}
|
||||
|
||||
return $array;
|
||||
@@ -123,9 +123,9 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface, UserGroupIn
|
||||
$journalId = (int) $journal['transaction_journal_id'];
|
||||
$array[$currencyId]['categories'][0]['transaction_journals'][$journalId]
|
||||
= [
|
||||
'amount' => app('steam')->positive($journal['amount']),
|
||||
'date' => $journal['date'],
|
||||
];
|
||||
'amount' => app('steam')->positive($journal['amount']),
|
||||
'date' => $journal['date'],
|
||||
];
|
||||
}
|
||||
|
||||
return $array;
|
||||
|
||||
@@ -109,14 +109,14 @@ trait PeriodOverview
|
||||
[$transactions, $transferredIn] = $this->filterTransfers('in', $transactions, $currentDate['start'], $currentDate['end']);
|
||||
$entries[]
|
||||
= [
|
||||
'title' => $title,
|
||||
'route' => route('accounts.show', [$account->id, $currentDate['start']->format('Y-m-d'), $currentDate['end']->format('Y-m-d')]),
|
||||
'total_transactions' => count($spent) + count($earned) + count($transferredAway) + count($transferredIn),
|
||||
'spent' => $this->groupByCurrency($spent),
|
||||
'earned' => $this->groupByCurrency($earned),
|
||||
'transferred_away' => $this->groupByCurrency($transferredAway),
|
||||
'transferred_in' => $this->groupByCurrency($transferredIn),
|
||||
];
|
||||
'title' => $title,
|
||||
'route' => route('accounts.show', [$account->id, $currentDate['start']->format('Y-m-d'), $currentDate['end']->format('Y-m-d')]),
|
||||
'total_transactions' => count($spent) + count($earned) + count($transferredAway) + count($transferredIn),
|
||||
'spent' => $this->groupByCurrency($spent),
|
||||
'earned' => $this->groupByCurrency($earned),
|
||||
'transferred_away' => $this->groupByCurrency($transferredAway),
|
||||
'transferred_in' => $this->groupByCurrency($transferredIn),
|
||||
];
|
||||
}
|
||||
$cache->store($entries);
|
||||
Timer::stop('account-period-total');
|
||||
@@ -603,13 +603,13 @@ trait PeriodOverview
|
||||
}
|
||||
$entries[]
|
||||
= [
|
||||
'title' => $title,
|
||||
'route' => route('transactions.index', [$transactionType, $currentDate['start']->format('Y-m-d'), $currentDate['end']->format('Y-m-d')]),
|
||||
'total_transactions' => count($spent) + count($earned) + count($transferred),
|
||||
'spent' => $this->groupByCurrency($spent),
|
||||
'earned' => $this->groupByCurrency($earned),
|
||||
'transferred' => $this->groupByCurrency($transferred),
|
||||
];
|
||||
'title' => $title,
|
||||
'route' => route('transactions.index', [$transactionType, $currentDate['start']->format('Y-m-d'), $currentDate['end']->format('Y-m-d')]),
|
||||
'total_transactions' => count($spent) + count($earned) + count($transferred),
|
||||
'spent' => $this->groupByCurrency($spent),
|
||||
'earned' => $this->groupByCurrency($earned),
|
||||
'transferred' => $this->groupByCurrency($transferred),
|
||||
];
|
||||
}
|
||||
|
||||
return $entries;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* ExchangeRateTransformer.php
|
||||
* Copyright (c) 2025 james@firefly-iii.org.
|
||||
|
||||
@@ -28,7 +28,6 @@ use FireflyIII\Enums\UserRoleEnum;
|
||||
use FireflyIII\Models\GroupMembership;
|
||||
use FireflyIII\Models\UserGroup;
|
||||
use FireflyIII\Support\Facades\Amount;
|
||||
use FireflyIII\Transformers\AbstractTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
|
||||
/**
|
||||
* Class AbstractTransformer
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
abstract class AbstractTransformer extends TransformerAbstract
|
||||
|
||||
@@ -36,6 +36,7 @@ use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class AccountTransformer
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class AccountTransformer extends AbstractTransformer
|
||||
|
||||
@@ -40,6 +40,7 @@ use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class BillTransformer
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class BillTransformer extends AbstractTransformer
|
||||
|
||||
@@ -30,6 +30,7 @@ use League\Fractal\Resource\Item;
|
||||
|
||||
/**
|
||||
* Class BudgetLimitTransformer
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class BudgetLimitTransformer extends AbstractTransformer
|
||||
|
||||
@@ -30,6 +30,7 @@ use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
|
||||
/**
|
||||
* Class BudgetTransformer
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class BudgetTransformer extends AbstractTransformer
|
||||
|
||||
@@ -29,6 +29,7 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class CurrencyTransformer
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class CurrencyTransformer extends AbstractTransformer
|
||||
|
||||
@@ -29,6 +29,7 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class AccountTransformer
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class ExchangeRateTransformer extends AbstractTransformer
|
||||
|
||||
@@ -41,6 +41,7 @@ use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class PiggyBankTransformer
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class PiggyBankTransformer extends AbstractTransformer
|
||||
|
||||
@@ -29,6 +29,7 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class PreferenceTransformer
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class PreferenceTransformer extends AbstractTransformer
|
||||
|
||||
@@ -43,6 +43,7 @@ use Illuminate\Support\Facades\DB;
|
||||
|
||||
/**
|
||||
* Class TransactionGroupTransformer
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class TransactionGroupTransformer extends AbstractTransformer
|
||||
|
||||
@@ -32,6 +32,7 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class UserGroupTransformer
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class UserGroupTransformer extends AbstractTransformer
|
||||
|
||||
Reference in New Issue
Block a user