James Cole
2024-09-28 18:18:53 +02:00
parent cc7c6e02c5
commit dbf3d24ae7

View File

@@ -89,12 +89,12 @@ class AccountBalanceCalculator
->whereNull('transactions.deleted_at') ->whereNull('transactions.deleted_at')
->where('transaction_journals.transaction_currency_id', $currencyId) ->where('transaction_journals.transaction_currency_id', $currencyId)
->whereNull('transaction_journals.deleted_at') ->whereNull('transaction_journals.deleted_at')
// this order is the same as GroupCollector, but in the exact reverse. // this order is the same as GroupCollector
->orderBy('transaction_journals.date', 'asc') ->orderBy('transaction_journals.date', 'DESC')
->orderBy('transaction_journals.order', 'desc') ->orderBy('transaction_journals.order', 'ASC')
->orderBy('transaction_journals.id', 'asc') ->orderBy('transaction_journals.id', 'DESC')
->orderBy('transaction_journals.description', 'asc') ->orderBy('transaction_journals.description', 'DESC')
->orderBy('transactions.amount', 'asc') ->orderBy('transactions.amount', 'DESC')
->where('transactions.account_id', $accountId); ->where('transactions.account_id', $accountId);
$notBefore->startOfDay(); $notBefore->startOfDay();
$query->where('transaction_journals.date', '<', $notBefore); $query->where('transaction_journals.date', '<', $notBefore);