Fixed some math things.

This commit is contained in:
James Cole
2015-07-26 19:42:28 +02:00
parent eef28d96f4
commit e211c9812e
9 changed files with 28 additions and 18 deletions

View File

@@ -246,10 +246,11 @@ class TransactionController extends Controller
*/
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 = $t->before + $t->amount;
$t->after = bcadd($t->before, $t->amount);
}
);
$what = strtolower($journal->transactionType->type);