aboutsummaryrefslogtreecommitdiff
path: root/front/src
diff options
context:
space:
mode:
Diffstat (limited to 'front/src')
-rw-r--r--front/src/Main.elm27
1 files changed, 17 insertions, 10 deletions
diff --git a/front/src/Main.elm b/front/src/Main.elm
index 4ff3dab..696bc71 100644
--- a/front/src/Main.elm
+++ b/front/src/Main.elm
@@ -111,6 +111,9 @@ make_t lang str =
"Saved: " ->
"Ahorro: "
+ "% of early payed)" ->
+ "% de anticipado)"
+
"Initial payment: " ->
"Pago inicial: "
@@ -135,11 +138,11 @@ make_t lang str =
"Interest:" ->
"Interés:"
- "Period:" ->
- "Periodo:"
+ "Period: " ->
+ "Periodo: "
- "To:" ->
- "Hasta:"
+ "To: " ->
+ "Hasta: "
"Cancel" ->
"Cancelar"
@@ -1383,7 +1386,7 @@ simUpdateView m periodic onRemove upd =
( m.t "New interest rate"
, i1Attrs
, [ text (m.t "Interest: ")
- , text <| String.fromFloat (f * 100)
+ , text <| Round.round 2 (f * 100)
, text "%"
]
)
@@ -1517,16 +1520,14 @@ quotaView m { updates } { month, payed, pending_principal } =
[ text "⟳" ]
, div [ class "flex flex-col" ]
[ div []
- [ text <| m.t "Period:"
- , text " "
+ [ text <| m.t "Period: "
, txtInput
[ class "w-[40px] border" ]
(\newTxt -> setUpdate { au | periodic = Just { period = newTxt, to = to } })
period
]
, div []
- [ text <| m.t "To:"
- , text " "
+ [ text <| m.t "To: "
, txtInput
[ class "w-[40px] border" ]
(\newTxt -> setUpdate { au | periodic = Just { period = period, to = newTxt } })
@@ -1670,6 +1671,9 @@ simView m ( rawSpecs, sim ) =
fee =
total * parseFloat rawSpecs.fee / 100
+ saved =
+ sim.payed_noprepays.interest - sim.payed.interest
+
overview title financed extraLis =
div [ class "my-2 p-1 border-2 rounded-md border-gray-400" ]
[ p []
@@ -1726,7 +1730,10 @@ simView m ( rawSpecs, sim ) =
]
, li []
[ text <| t "Saved: "
- , amountView [] currency (sim.payed_noprepays.interest - sim.payed.interest)
+ , amountView [] currency saved
+ , text " ("
+ , text <| Round.round 2 <| 100 * (saved / sim.payed_amortized)
+ , text <| m.t "% of early payed)"
]
]