mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 22:58:09 +00:00
Code cleanup.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ class TransactionController extends Controller
|
||||
$types = config('firefly.transactionTypesByWhat.' . $what);
|
||||
$subTitle = trans('firefly.title_' . $what);
|
||||
$page = intval(Input::get('page'));
|
||||
$journals = $repository->getJournalsOfTypes($types, $page, $pageSize);
|
||||
$journals = $repository->getJournals($types, $page, $pageSize);
|
||||
|
||||
$journals->setPath('transactions/' . $what);
|
||||
|
||||
@@ -384,8 +384,8 @@ class TransactionController extends Controller
|
||||
$order = 0;
|
||||
foreach ($ids as $id) {
|
||||
|
||||
$journal = $repository->getWithDate($id, $date);
|
||||
if ($journal) {
|
||||
$journal = $repository->find($id);
|
||||
if ($journal && $journal->date->format('Y-m-d') == $date->format('Y-m-d')) {
|
||||
$journal->order = $order;
|
||||
$order++;
|
||||
$journal->save();
|
||||
|
||||
Reference in New Issue
Block a user