1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 05:09:38 +02:00

Allow cents in start balance for accounts

This commit is contained in:
Zach Gollwitzer 2024-10-11 12:43:50 -04:00
parent 7dfd7408c7
commit c744237b55
2 changed files with 2 additions and 2 deletions

View file

@ -16,7 +16,7 @@
<% if account.new_record? %> <% if account.new_record? %>
<div class="flex items-center gap-2 mt-3 mb-6"> <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.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> </div>
<% end %> <% end %>

View file

@ -88,7 +88,7 @@ class AccountsTest < ApplicationSystemTestCase
fill_in "Account name", with: account_name fill_in "Account name", with: account_name
fill_in "account[balance]", with: 100.99 fill_in "account[balance]", with: 100.99
fill_in "Start date (optional)", with: 10.days.ago.to_date fill_in "Start date (optional)", with: 10.days.ago.to_date
fill_in "Start balance (optional)", with: 95 fill_in "account[start_balance]", with: 95.25
yield if block_given? yield if block_given?