mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 00:27:30 +00:00
FF3 will now correctly store exchanged / foreign amounts.
This commit is contained in:
@@ -275,7 +275,7 @@ class ExpandedForm
|
||||
$classes = $this->getHolderClasses($name);
|
||||
$value = $this->fillFieldValue($name, $value);
|
||||
$options['step'] = 'any';
|
||||
$options['min'] = '0.01';
|
||||
$options['min'] = '0.01';
|
||||
$selectedCurrency = isset($options['currency']) ? $options['currency'] : Amt::getDefaultCurrency();
|
||||
unset($options['currency']);
|
||||
unset($options['placeholder']);
|
||||
@@ -312,7 +312,8 @@ class ExpandedForm
|
||||
|
||||
// make sure value is formatted nicely:
|
||||
if (!is_null($value) && $value !== '') {
|
||||
$value = round($value, $selectedCurrency->decimal_places);
|
||||
$decimals = $selectedCurrency->decimal_places ?? 2;
|
||||
$value = round($value, $decimals);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user