/**
  * @param JournalRepositoryInterface $repository
  * @param TransactionJournal         $journal
  *
  * @return \Illuminate\View\View
  */
 public function show(JournalRepositoryInterface $repository, TransactionJournal $journal)
 {
     /** @var Collection $set */
     $events = $journal->piggyBankEvents()->get();
     $events->each(function (PiggyBankEvent $event) {
         $event->piggyBank = $event->piggyBank()->withTrashed()->first();
     });
     bcscale(2);
     $journal->transactions->each(function (Transaction $t) use($journal, $repository) {
         $t->before = $repository->getAmountBefore($journal, $t);
         $t->after = bcadd($t->before, $t->amount);
     });
     $what = strtolower($journal->getTransactionType());
     $subTitle = trans('firefly.' . $journal->getTransactionType()) . ' "' . e($journal->description) . '"';
     return view('transactions.show', compact('journal', 'events', 'subTitle', 'what'));
 }
 /**
  * @param JournalRepositoryInterface $repository
  * @param TransactionJournal         $journal
  *
  * @return \Illuminate\View\View
  */
 public function show(JournalRepositoryInterface $repository, TransactionJournal $journal)
 {
     bcscale(2);
     $journal->transactions->each(function (Transaction $t) use($journal, $repository) {
         $t->before = $repository->getAmountBefore($journal, $t);
         $t->after = bcadd($t->before, $t->amount);
     });
     $what = strtolower($journal->transactionType->type);
     $subTitle = trans('firefly.' . $journal->transactionType->type) . ' "' . e($journal->description) . '"';
     return view('transactions.show', compact('journal', 'subTitle', 'what'));
 }