Rename journal collector to more fitting transaction collector.

This commit is contained in:
James Cole
2018-08-11 14:33:47 +02:00
parent 96baf5d3c7
commit 9914c0791e
75 changed files with 595 additions and 1833 deletions

View File

@@ -25,7 +25,7 @@ namespace FireflyIII\Transformers;
use Carbon\Carbon;
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
use FireflyIII\Helpers\Collector\TransactionCollectorInterface;
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
use FireflyIII\Models\TransactionCurrency;
@@ -104,7 +104,7 @@ class AccountTransformer extends TransformerAbstract
$pageSize = (int)app('preferences')->getForUser($account->user, 'listPageSize', 50)->data;
// journals always use collector and limited using URL parameters.
$collector = app(JournalCollectorInterface::class);
$collector = app(TransactionCollectorInterface::class);
$collector->setUser($account->user);
$collector->withOpposingAccount()->withCategoryInformation()->withBudgetInformation();
if ($account->accountType->type === AccountType::ASSET) {
@@ -116,7 +116,7 @@ class AccountTransformer extends TransformerAbstract
$collector->setRange($this->parameters->get('start'), $this->parameters->get('end'));
}
$collector->setLimit($pageSize)->setPage($this->parameters->get('page'));
$journals = $collector->getJournals();
$journals = $collector->getTransactions();
return $this->collection($journals, new TransactionTransformer($this->parameters), 'transactions');
}