From fc631e698d13a79380c7228cc8d51230fa368874 Mon Sep 17 00:00:00 2001 From: Pieter Beulque Date: Mon, 15 Apr 2024 17:27:39 +0200 Subject: [PATCH] Allow 2 decimals when adding a balance (#614) --- app/helpers/application_form_builder.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_form_builder.rb b/app/helpers/application_form_builder.rb index 16d3ffba..b84f6d0a 100644 --- a/app/helpers/application_form_builder.rb +++ b/app/helpers/application_form_builder.rb @@ -36,7 +36,8 @@ class ApplicationFormBuilder < ActionView::Helpers::FormBuilder default_options = { class: "form-field__input", value: money&.amount, - placeholder: Money.new(0, money&.currency || Money.default_currency).format + placeholder: Money.new(0, money&.currency || Money.default_currency).format, + step: "0.01" # Not all currencies have 2 decimal places } merged_options = default_options.merge(options)