mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-03 12:47:17 -06:00
Experimental count thing.
This commit is contained in:
parent
5c55fa5fbb
commit
422f429725
@ -34,20 +34,21 @@ class Steam
|
||||
$firstDate = is_null($firstDateObject) ? clone $date : new Carbon($firstDateObject->date);
|
||||
$date = $date < $firstDate ? $firstDate : $date;
|
||||
|
||||
|
||||
$set = $account->transactions()->leftJoin(
|
||||
bcscale(2);
|
||||
$set = $account->transactions()->leftJoin(
|
||||
'transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id'
|
||||
)->where('transaction_journals.date', '<=', $date->format('Y-m-d'))->get(['transactions.*']);
|
||||
$balance = 0;
|
||||
foreach($set as $entry) {
|
||||
$balance += $entry->amount;
|
||||
$balance = '0';
|
||||
foreach ($set as $entry) {
|
||||
$balance = bcadd($balance, $entry->amount);
|
||||
}
|
||||
|
||||
if (!$ignoreVirtualBalance) {
|
||||
$balance += floatval($account->virtual_balance);
|
||||
$balance = bcadd($balance, $account->virtual_balance);
|
||||
//$balance += floatval($account->virtual_balance);
|
||||
}
|
||||
|
||||
return $balance;
|
||||
return round($balance, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user