use journal repository instead of direct calls.

This commit is contained in:
James Cole
2018-02-25 19:09:05 +01:00
parent 99983a5c8f
commit 1b304bf85e
18 changed files with 175 additions and 222 deletions

View File

@@ -103,24 +103,6 @@ class Tag extends Model
throw new NotFoundHttpException;
}
/**
* @param Tag $tag
*
* @return string
*
* @throws \FireflyIII\Exceptions\FireflyException
*/
public static function tagSum(Tag $tag): string
{
$sum = '0';
/** @var TransactionJournal $journal */
foreach ($tag->transactionjournals as $journal) {
bcadd($sum, $journal->amount());
}
return $sum;
}
/**
* @codeCoverageIgnore
*