mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 02:26:58 +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()));
|
Log::debug(sprintf('Start converting transaction %s', $transaction->getDescription1()));
|
||||||
|
|
||||||
$amount = $transaction->getAmount();
|
$amount = (string) $transaction->getAmount();
|
||||||
$debitOrCredit = $transaction->getCreditDebit();
|
$debitOrCredit = $transaction->getCreditDebit();
|
||||||
|
|
||||||
Log::debug(sprintf('Amount is %s', $amount));
|
Log::debug(sprintf('Amount is %s', $amount));
|
||||||
@@ -79,7 +79,7 @@ class StageImportDataHandler
|
|||||||
$type = TransactionType::DEPOSIT;
|
$type = TransactionType::DEPOSIT;
|
||||||
} else {
|
} else {
|
||||||
$type = TransactionType::WITHDRAWAL;
|
$type = TransactionType::WITHDRAWAL;
|
||||||
$amount = -$amount;
|
$amount = bcmul($amount, '-1');
|
||||||
}
|
}
|
||||||
|
|
||||||
$destination = $this->mapper->map(
|
$destination = $this->mapper->map(
|
||||||
|
Reference in New Issue
Block a user