mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fixed all problems related to strict types.
This commit is contained in:
@@ -330,7 +330,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
$balance = Steam::balance($account, $date, true);
|
||||
/** @var PiggyBank $p */
|
||||
foreach ($account->piggybanks()->get() as $p) {
|
||||
$balance -= $p->currentRelevantRep()->currentamount;
|
||||
$balance = bcsub($p->currentRelevantRep()->currentamount, $balance);
|
||||
}
|
||||
|
||||
return $balance;
|
||||
|
@@ -65,9 +65,10 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
->where('transaction_journals.order', '>=', $journal->order)
|
||||
->where('transaction_journals.id', '!=', $journal->id)
|
||||
->get(['transactions.*']);
|
||||
$sum = 0;
|
||||
bcscale(2);
|
||||
$sum = '0';
|
||||
foreach ($set as $entry) {
|
||||
$sum += $entry->amount;
|
||||
$sum = bcadd($entry->amount, $sum);
|
||||
}
|
||||
|
||||
return $sum;
|
||||
|
Reference in New Issue
Block a user