Clean up code.

This commit is contained in:
James Cole
2020-10-23 19:11:25 +02:00
parent 0845e1cb7d
commit 8dbd785ab8
57 changed files with 84 additions and 441 deletions

View File

@@ -58,10 +58,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
{
$count = $currency->transactions()->whereNull('deleted_at')->count() + $currency->transactionJournals()->whereNull('deleted_at')->count();
// also count foreign:
$count += Transaction::where('foreign_currency_id', $currency->id)->count();
return $count;
return $count + Transaction::where('foreign_currency_id', $currency->id)->count();
}
/**