Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Use arbitrary precision math
Ben7e590fb6b342
diff --git a/app/Support/Import/Routine/FinTS/StageImportDataHandler.php b/app/Support/Import/Routine/FinTS/StageImportDataHandler.phpindex 1f120c5600..e22927ffce 100644--- a/app/Support/Import/Routine/FinTS/StageImportDataHandler.php+++ b/app/Support/Import/Routine/FinTS/StageImportDataHandler.php@@ -71,7 +71,7 @@ class StageImportDataHandler{Log::debug(sprintf('Start converting transaction %s', $transaction->getDescription1()));- $amount = $transaction->getAmount();+ $amount = (string) $transaction->getAmount();$debitOrCredit = $transaction->getCreditDebit();Log::debug(sprintf('Amount is %s', $amount));@@ -79,7 +79,7 @@ class StageImportDataHandler$type = TransactionType::DEPOSIT;} else {$type = TransactionType::WITHDRAWAL;- $amount = -$amount;+ $amount = bcmul($amount, '-1');}$destination = $this->mapper->map(