mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-10 07:55:21 +02:00
fix do not round up when abbreviating
This commit is contained in:
parent
5d8954b332
commit
63f4c77160
1 changed files with 2 additions and 2 deletions
|
@ -45,8 +45,8 @@ module Money::Formatting
|
|||
value = abs_amount / 1000.0
|
||||
end
|
||||
|
||||
# Always use period as decimal separator for abbreviations
|
||||
abbrev_options = options.merge(precision: 1, separator: ".")
|
||||
# Always use period as decimal separator for abbreviations and don't round up
|
||||
abbrev_options = options.merge(precision: 1, separator: ".", round_mode: :down)
|
||||
value_formatted = number_to_rounded(value, abbrev_options)
|
||||
abbreviated_num = "#{value_formatted}#{unit_suffix}"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue