Do not need to sort. Fix MySQL 5.7 compatibility.

This commit is contained in:
James Cole 2016-09-16 09:31:40 +02:00
parent bb58f605f7
commit fb649779d6
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -580,7 +580,7 @@ class AccountRepository implements AccountRepositoryInterface
public function spentInPeriod(Collection $accounts, Carbon $start, Carbon $end): string
{
/** @var HasMany $query */
$query = $this->user->transactionJournals()->expanded()->sortCorrectly()
$query = $this->user->transactionJournals()->expanded()
->transactionTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER]);
if ($end >= $start) {
$query->before($end)->after($start);