-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
Description
when parsing 1.234 with a currency that has , as decimal_mark and . as thousands_separator, the currency settings are ignored, and . is considered to be the decimail_mark.
I patched the code locally in my rails project:
module Monetize
class << self
def extract_cents_with_decimals_addition(input, currency = Money.default_currency)
decimal_mark = I18n.t('number.currency.format.separator')
input = "#{input}#{decimal_mark}0" unless input.include?(decimal_mark)
extract_cents_without_decimals_addition(input, currency)
end
alias_method_chain :extract_cents, :decimals_addition
end
end```
trooster
Metadata
Metadata
Assignees
Labels
No labels