apply not recurring and split scopes by default

This commit is contained in:
Denis Duliçi
2022-06-05 03:33:26 +03:00
parent 3ac8186d4a
commit 2cdeaad00d
10 changed files with 72 additions and 33 deletions

View File

@@ -36,7 +36,7 @@ class Accounts extends Controller
public function show(Account $account)
{
// Handle transactions
$transactions = Transaction::with('account', 'category')->where('account_id', $account->id)->isNotRecurring()->collect('paid_at');
$transactions = Transaction::with('account', 'category')->where('account_id', $account->id)->collect('paid_at');
$transfers = Transfer::with('expense_transaction', 'income_transaction')->get()->filter(function ($transfer) use($account) {
if ($transfer->expense_account->id == $account->id || $transfer->income_account->id == $account->id) {