mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix rounding issues.
This commit is contained in:
parent
cf7c01e5d0
commit
4706cd44de
@ -300,7 +300,7 @@ class UpdateRequest extends FormRequest
|
||||
if (array_key_exists($fieldName, $transaction)) {
|
||||
$value = $transaction[$fieldName];
|
||||
if (is_float($value)) {
|
||||
$current[$fieldName] = sprintf('%.24f', $value);
|
||||
$current[$fieldName] = sprintf('%.12f', $value);
|
||||
}
|
||||
if (!is_float($value)) {
|
||||
$current[$fieldName] = (string)$value;
|
||||
|
@ -351,7 +351,7 @@ class Steam
|
||||
}
|
||||
// if the number contains "E", it's in scientific notation, so we need to convert it to a normal number first.
|
||||
if (false !== stripos($number, 'e')) {
|
||||
$number = sprintf('%.24f', $number);
|
||||
$number = sprintf('%.12f', $number);
|
||||
}
|
||||
|
||||
// Log::debug(sprintf('Trying bcround("%s",%d)', $number, $precision));
|
||||
|
Loading…
Reference in New Issue
Block a user