mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-17 01:42:19 +00:00
merge
This commit is contained in:
@@ -82,25 +82,25 @@ class IndexController extends Controller
|
||||
{
|
||||
$this->cleanupObjectGroups();
|
||||
$this->piggyRepos->resetOrder();
|
||||
$collection = $this->piggyRepos->getPiggyBanks();
|
||||
$collection = $this->piggyRepos->getPiggyBanks();
|
||||
|
||||
/** @var Carbon $end */
|
||||
$end = session('end', today(config('app.timezone'))->endOfMonth());
|
||||
$end = session('end', today(config('app.timezone'))->endOfMonth());
|
||||
|
||||
// transform piggies using the transformer:
|
||||
//$parameters = new ParameterBag();
|
||||
//$parameters->set('end', $end);
|
||||
// $parameters = new ParameterBag();
|
||||
// $parameters->set('end', $end);
|
||||
|
||||
|
||||
///** @var AccountTransformer $accountTransformer */
|
||||
//$accountTransformer = app(AccountTransformer::class);
|
||||
//$accountTransformer->setParameters($parameters);
|
||||
// /** @var AccountTransformer $accountTransformer */
|
||||
// $accountTransformer = app(AccountTransformer::class);
|
||||
// $accountTransformer->setParameters($parameters);
|
||||
|
||||
// data
|
||||
$piggyBanks = $this->groupPiggyBanks($collection);
|
||||
$accounts = $this->collectAccounts($collection);
|
||||
$accounts = $this->mergeAccountsAndPiggies($piggyBanks, $accounts);
|
||||
$piggyBanks = $this->makeSums($piggyBanks);
|
||||
$piggyBanks = $this->groupPiggyBanks($collection);
|
||||
$accounts = $this->collectAccounts($collection);
|
||||
$accounts = $this->mergeAccountsAndPiggies($piggyBanks, $accounts);
|
||||
$piggyBanks = $this->makeSums($piggyBanks);
|
||||
|
||||
ksort($piggyBanks);
|
||||
|
||||
@@ -150,7 +150,6 @@ class IndexController extends Controller
|
||||
$enrichment->setUser(auth()->user());
|
||||
$enrichment->setConvertToNative($this->convertToNative);
|
||||
$enrichment->setNative($this->defaultCurrency);
|
||||
|
||||
$return = [];
|
||||
|
||||
/** @var PiggyBank $piggy */
|
||||
@@ -159,7 +158,7 @@ class IndexController extends Controller
|
||||
|
||||
/** @var Account $account */
|
||||
foreach ($accounts as $account) {
|
||||
$account = $enrichment->enrichSingle($account);
|
||||
$account = $enrichment->enrichSingle($account);
|
||||
$array = $accountTransformer->transform($account);
|
||||
$accountId = (int) $array['id'];
|
||||
if (!array_key_exists($accountId, $return)) {
|
||||
|
@@ -62,7 +62,7 @@ class AccountTransformer extends AbstractTransformer
|
||||
*/
|
||||
public function transform(Account $account): array
|
||||
{
|
||||
if(null === $account->meta) {
|
||||
if (null === $account->meta) {
|
||||
$account->meta = [];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user