mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 20:22:07 +00:00
Fix rounding issues.
This commit is contained in:
@@ -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));
|
||||
|
Reference in New Issue
Block a user