close #2221 Fixed: Account Show wrong show transction date

This commit is contained in:
Cüneyt Şentürk
2021-08-11 10:39:14 +03:00
parent c0ebf807c1
commit d763f99d1b
2 changed files with 3 additions and 5 deletions

View File

@ -34,8 +34,6 @@ class Accounts extends Controller
*/
public function show(Account $account)
{
$limit = (int) request('limit', setting('default.list_limit', '25'));
// Handle transactions
$transactions = Transaction::with('account', 'category')->where('account_id', $account->id)->collect('paid_at');
@ -43,7 +41,7 @@ class Accounts extends Controller
if ($transfer->expense_account->id == $account->id || $transfer->income_account->id == $account->id) {
return true;
}
return false;
})->sortByDesc(function ($transfer) {
return $transfer->expense_transaction->paid_at;