mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Finalise account tests
This commit is contained in:
@@ -230,6 +230,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
if (count($accountIds) > 0) {
|
||||
$query->whereIn('accounts.id', $accountIds);
|
||||
}
|
||||
$query->orderBy('accounts.active', 'DESC');
|
||||
$query->orderBy('accounts.name', 'ASC');
|
||||
|
||||
$result = $query->get(['accounts.*']);
|
||||
@@ -249,6 +250,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
if (count($types) > 0) {
|
||||
$query->accountTypeIn($types);
|
||||
}
|
||||
$query->orderBy('accounts.active', 'DESC');
|
||||
$query->orderBy('accounts.name', 'ASC');
|
||||
$result = $query->get(['accounts.*']);
|
||||
|
||||
|
@@ -688,18 +688,14 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
|
||||
/**
|
||||
* @param int $transactionId
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function reconcileById(int $transactionId): bool
|
||||
public function reconcileById(int $journalId): void
|
||||
{
|
||||
/** @var Transaction $transaction */
|
||||
$transaction = $this->user->transactions()->find($transactionId);
|
||||
if (null !== $transaction) {
|
||||
return $this->reconcile($transaction);
|
||||
/** @var TransactionJournal $journal */
|
||||
$journal = $this->user->transactionJournals()->find($journalId);
|
||||
if (null !== $journal) {
|
||||
$journal->transactions()->update(['reconciled' => true]);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -309,11 +309,9 @@ interface JournalRepositoryInterface
|
||||
public function reconcile(Transaction $transaction): bool;
|
||||
|
||||
/**
|
||||
* @param int $transactionId
|
||||
*
|
||||
* @return bool
|
||||
* @param int $journalId
|
||||
*/
|
||||
public function reconcileById(int $transactionId): bool;
|
||||
public function reconcileById(int $journalId): void;
|
||||
|
||||
/**
|
||||
* @param TransactionJournal $journal
|
||||
|
Reference in New Issue
Block a user