Skip to content

Commit

Permalink
Allow cents in start balance for accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
zachgoll committed Oct 11, 2024
1 parent 7dfd740 commit c744237
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/accounts/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>

Expand Down
2 changes: 1 addition & 1 deletion test/system/accounts_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def assert_account_created(accountable_type, &block)
fill_in "Account name", with: account_name
fill_in "account[balance]", with: 100.99
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?

Expand Down

0 comments on commit c744237

Please sign in to comment.