mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 10:33:30 +00:00
Use arbitrary precision math
This commit is contained in:
@@ -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(
|
||||
|
Reference in New Issue
Block a user