mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
Fixed a sum.
This commit is contained in:
@@ -187,8 +187,8 @@ class PiggyBankController extends Controller
|
||||
'name' => $account->name,
|
||||
'balance' => Steam::balance($account, $end, true),
|
||||
'leftForPiggyBanks' => $repository->leftOnAccount($account, $end),
|
||||
'sumOfSaved' => $piggyBank->savedSoFar,
|
||||
'sumOfTargets' => round($piggyBank->targetamount, 2),
|
||||
'sumOfSaved' => strval($piggyBank->savedSoFar),
|
||||
'sumOfTargets' => strval(round($piggyBank->targetamount, 2)),
|
||||
'leftToSave' => $piggyBank->leftToSave,
|
||||
];
|
||||
} else {
|
||||
|
@@ -333,7 +333,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
$balance = Steam::balance($account, $date, true);
|
||||
/** @var PiggyBank $p */
|
||||
foreach ($account->piggyBanks()->get() as $p) {
|
||||
$balance = bcsub($p->currentRelevantRep()->currentamount, $balance);
|
||||
$balance = bcsub($balance, $p->currentRelevantRep()->currentamount);
|
||||
}
|
||||
|
||||
return $balance;
|
||||
@@ -544,7 +544,7 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
* @return bool
|
||||
*/
|
||||
private function storeMetadata(Account $account, array $data): bool
|
||||
{
|
||||
{
|
||||
foreach ($this->validFields as $field) {
|
||||
if (isset($data[$field])) {
|
||||
$metaData = new AccountMeta(
|
||||
|
Reference in New Issue
Block a user