mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
Fix phpstan issues
This commit is contained in:
@@ -163,7 +163,7 @@ class AccountBalanceGrouped
|
||||
|
||||
// get conversion rate
|
||||
$rate = $this->getRate($currency, $journal['date']);
|
||||
$amountConverted = bcmul((string)$amount, $rate);
|
||||
$amountConverted = bcmul($amount, $rate);
|
||||
|
||||
// perhaps transaction already has the foreign amount in the primary currency.
|
||||
if ((int)$journal['foreign_currency_id'] === $this->primary->id) {
|
||||
@@ -172,11 +172,11 @@ class AccountBalanceGrouped
|
||||
}
|
||||
|
||||
// add normal entry
|
||||
$this->data[$currencyId][$period][$key] = bcadd((string)$this->data[$currencyId][$period][$key], (string)$amount);
|
||||
$this->data[$currencyId][$period][$key] = bcadd((string)$this->data[$currencyId][$period][$key], $amount);
|
||||
|
||||
// add converted entry
|
||||
$convertedKey = sprintf('pc_%s', $key);
|
||||
$this->data[$currencyId][$period][$convertedKey] = bcadd((string)$this->data[$currencyId][$period][$convertedKey], (string)$amountConverted);
|
||||
$this->data[$currencyId][$period][$convertedKey] = bcadd((string)$this->data[$currencyId][$period][$convertedKey], $amountConverted);
|
||||
}
|
||||
|
||||
private function findCurrency(int $currencyId): TransactionCurrency
|
||||
|
Reference in New Issue
Block a user