Some math fixes. Not bugs.

This commit is contained in:
James Cole
2015-07-06 18:04:13 +02:00
parent a4cc25175a
commit 93b6c68938
6 changed files with 26 additions and 18 deletions

View File

@@ -70,6 +70,7 @@ class HomeController extends Controller
{
$types = Config::get('firefly.accountTypesByIdentifier.asset');
$count = $repository->countAccounts($types);
bcscale(2);
if ($count == 0) {
@@ -92,7 +93,7 @@ class HomeController extends Controller
$savingsTotal = 0;
foreach ($savings as $savingAccount) {
$savingsTotal += Steam::balance($savingAccount, $end);
$savingsTotal = bcadd($savingsTotal, Steam::balance($savingAccount, $end));
}
$sum = $repository->sumOfEverything();