Code cleanup.

This commit is contained in:
James Cole
2016-05-01 09:42:08 +02:00
parent ac8ff4e565
commit c66df3cb2c
6 changed files with 87 additions and 179 deletions

View File

@@ -275,9 +275,9 @@ class JsonController extends Controller
public function transactionJournals(JournalRepositoryInterface $repository, $what)
{
$descriptions = [];
$dbType = $repository->getTransactionType($what);
$journals = $repository->getJournalsOfType($dbType);
$type = config('firefly.transactionTypesByWhat.' . $what);
$types = [$type];
$journals = $repository->getJournals($types, 1, 50);
foreach ($journals as $j) {
$descriptions[] = $j->description;
}