mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
This commit is contained in:
parent
e8ec13ca5f
commit
d49809c939
@ -119,8 +119,8 @@ class AccountController extends Controller
|
|||||||
|
|
||||||
// see if there is an accompanying start amount.
|
// see if there is an accompanying start amount.
|
||||||
// grab the difference and find the currency.
|
// grab the difference and find the currency.
|
||||||
$startAmount = $startBalances[$accountId][$currencyId] ?? '0';
|
$startAmount = (string) ($startBalances[$accountId][$currencyId] ?? '0')
|
||||||
$diff = bcsub($endAmount, $startAmount);
|
$diff = bcsub((string)$endAmount, $startAmount);
|
||||||
$currencies[$currencyId] = $currencies[$currencyId] ?? $this->currencyRepository->find($currencyId);
|
$currencies[$currencyId] = $currencies[$currencyId] ?? $this->currencyRepository->find($currencyId);
|
||||||
if (0 !== bccomp($diff, '0')) {
|
if (0 !== bccomp($diff, '0')) {
|
||||||
// store the values in a temporary array.
|
// store the values in a temporary array.
|
||||||
@ -578,8 +578,8 @@ class AccountController extends Controller
|
|||||||
|
|
||||||
// see if there is an accompanying start amount.
|
// see if there is an accompanying start amount.
|
||||||
// grab the difference and find the currency.
|
// grab the difference and find the currency.
|
||||||
$startAmount = $startBalances[$accountId][$currencyId] ?? '0';
|
$startAmount = (string)($startBalances[$accountId][$currencyId] ?? '0');
|
||||||
$diff = bcsub($endAmount, $startAmount);
|
$diff = bcsub((string) $endAmount, $startAmount);
|
||||||
$currencies[$currencyId] = $currencies[$currencyId] ?? $this->currencyRepository->find($currencyId);
|
$currencies[$currencyId] = $currencies[$currencyId] ?? $this->currencyRepository->find($currencyId);
|
||||||
if (0 !== bccomp($diff, '0')) {
|
if (0 !== bccomp($diff, '0')) {
|
||||||
// store the values in a temporary array.
|
// store the values in a temporary array.
|
||||||
|
@ -353,7 +353,7 @@ class TransactionGroupTransformer extends AbstractTransformer
|
|||||||
$destination = $this->getDestinationTransaction($journal);
|
$destination = $this->getDestinationTransaction($journal);
|
||||||
$type = $journal->transactionType->type;
|
$type = $journal->transactionType->type;
|
||||||
$amount = $this->getAmount($type, (string) $source->amount);
|
$amount = $this->getAmount($type, (string) $source->amount);
|
||||||
$foreignAmount = $this->getForeignAmount($type, $source->foreign_amount);
|
$foreignAmount = $this->getForeignAmount($type, null === $source->foreign_amount ? null : (string) $source->foreign_amount);
|
||||||
$metaFieldData = $this->groupRepos->getMetaFields($journal->id, $this->metaFields);
|
$metaFieldData = $this->groupRepos->getMetaFields($journal->id, $this->metaFields);
|
||||||
$metaDates = $this->getDates($this->groupRepos->getMetaDateFields($journal->id, $this->metaDateFields));
|
$metaDates = $this->getDates($this->groupRepos->getMetaDateFields($journal->id, $this->metaDateFields));
|
||||||
$currency = $source->transactionCurrency;
|
$currency = $source->transactionCurrency;
|
||||||
|
Loading…
Reference in New Issue
Block a user