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\Http\Controllers\Account;
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
use FireflyIII\Helpers\Collector\TransactionCollectorInterface;
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType;
@@ -114,11 +114,11 @@ class ShowController extends Controller
$subTitle = (string)trans('firefly.journals_in_period_for_account', ['name' => $account->name, 'start' => $fStart, 'end' => $fEnd]);
$chartUri = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
$periods = $this->getAccountPeriodOverview($account, $end);
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class);
/** @var TransactionCollectorInterface $collector */
$collector = app(TransactionCollectorInterface::class);
$collector->setAccounts(new Collection([$account]))->setLimit($pageSize)->setPage($page);
$collector->setRange($start, $end);
$transactions = $collector->getPaginatedJournals();
$transactions = $collector->getPaginatedTransactions();
$transactions->setPath(route('accounts.show', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]));
$showAll = false;
@@ -157,10 +157,10 @@ class ShowController extends Controller
}
$subTitle = (string)trans('firefly.all_journals_for_account', ['name' => $account->name]);
$periods = new Collection;
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class);
/** @var TransactionCollectorInterface $collector */
$collector = app(TransactionCollectorInterface::class);
$collector->setAccounts(new Collection([$account]))->setLimit($pageSize)->setPage($page);
$transactions = $collector->getPaginatedJournals();
$transactions = $collector->getPaginatedTransactions();
$transactions->setPath(route('accounts.show.all', [$account->id]));
$chartUri = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
$showAll = true;