The personal finance app for everyone
Allow cents in start balance for accounts
Zach Gollwitzerc744237b5522
diff --git a/app/views/accounts/_form.html.erb b/app/views/accounts/_form.html.erbindex 8a81c49e..4fa0cce1 100644--- a/app/views/accounts/_form.html.erb+++ b/app/views/accounts/_form.html.erb@@ -16,7 +16,7 @@<% if account.new_record? %><div class="flex items-center gap-2 mt-3 mb-6"><div class="w-1/2"><%= f.date_field :start_date, label: t(".start_date"), max: Date.yesterday, min: Account::Entry.min_supported_date %></div>- <div class="w-1/2"><%= f.number_field :start_balance, label: t(".start_balance"), placeholder: 90 %></div>+ <div class="w-1/2"><%= f.money_field :start_balance, label: t(".start_balance"), placeholder: 90, hide_currency: true, default_currency: Current.family.currency %></div></div><% end %>diff --git a/test/system/accounts_test.rb b/test/system/accounts_test.rbindex 1e9d93fe..1b7248c0 100644--- a/test/system/accounts_test.rb+++ b/test/system/accounts_test.rb@@ -88,7 +88,7 @@ class AccountsTest < ApplicationSystemTestCasefill_in "Account name", with: account_namefill_in "account[balance]", with: 100.99fill_in "Start date (optional)", with: 10.days.ago.to_date- fill_in "Start balance (optional)", with: 95+ fill_in "account[start_balance]", with: 95.25yield if block_given?