1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 13:35:21 +02:00

loan: Set the first valuation as the original principal. (#2088)

Fix: #1645.
This commit is contained in:
Joseph Ho 2025-04-14 09:09:25 -04:00 committed by GitHub
parent 5cb2183bdf
commit f181ba941f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 59 additions and 13 deletions

View file

@ -5,6 +5,13 @@
<div class="space-y-2">
<%= form.fields_for :accountable do |loan_form| %>
<div class="flex items-center gap-2">
<%= loan_form.money_field :initial_balance,
label: t("loans.form.initial_balance"),
default_currency: Current.family.currency,
required: true %>
</div>
<div class="flex items-center gap-2">
<%= loan_form.number_field :interest_rate,
label: t("loans.form.interest_rate"),

View file

@ -2,7 +2,7 @@
<div class="grid grid-cols-3 gap-2">
<%= summary_card title: t(".original_principal") do %>
<%= format_money account.original_balance %>
<%= format_money account.loan.original_balance %>
<% end %>
<%= summary_card title: t(".remaining_principal") do %>