diff options
author | Guillermo Ramos | 2025-03-16 20:07:37 +0100 |
---|---|---|
committer | Guillermo Ramos | 2025-03-16 20:11:12 +0100 |
commit | 274e67b2021d23e036a76b9ae947e8dace0c2de1 (patch) | |
tree | caf422723e1155f9b2b0693a78ac7b43920dc535 | |
parent | 18e4ca440cf1b9d8d20e3e24bac0c55bbd9efada (diff) | |
download | hiccup-274e67b2021d23e036a76b9ae947e8dace0c2de1.tar.gz |
Fix rate parsing
-rw-r--r-- | front/src/Main.elm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/front/src/Main.elm b/front/src/Main.elm index ad43e46..dfdc55a 100644 --- a/front/src/Main.elm +++ b/front/src/Main.elm @@ -576,13 +576,13 @@ type alias SimSpecs = parseSimSpecs : RawSpecs -> Maybe SimSpecs parseSimSpecs { total, rate, i1, years, updates } = case - ( List.map String.toFloat [ total, i1 ] - , List.map String.toInt [ rate, years ] + ( List.map String.toFloat [ total, i1, rate ] + , List.map String.toInt [ years ] ) of - ( [ Just totalValueF, Just i1F ], [ Just rateI, Just yearsI ] ) -> + ( [ Just totalValueF, Just i1F, Just rateF ], [ Just yearsI ] ) -> Just - { principal = totalValueF * toFloat rateI / 100 + { principal = totalValueF * rateF / 100 , i1 = i1F , years = yearsI , updates = updates |