blend_spreadsheet_loan_generator 0.1.110 → 0.1.111
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 237e78cc969abb37217013bed00dbf7e8e66b475ad49cfef3a7a626f7bc8950a
|
4
|
+
data.tar.gz: e72e56255ba6140c48a13a3f87a49e942b61a4fd7dc3c05abb070d347f26b1ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c35d3c183d990dabf506005999500e09ee02a5825dae45503db005f843b425e3c4979a49f915249dc964b0960a0efe8417271eefa0fd1355765d857d3f6d30c1
|
7
|
+
data.tar.gz: b3a3552ea4c21554bb8e4f3912008e2ebbe5421f261583f43282269d69a27cbfbf9f40669cd0cceb0b85e80394c6ab3df8baf8e3010399381169239fb9ac1c8d
|
@@ -85,16 +85,16 @@ module BlendSpreadsheetLoanGenerator
|
|
85
85
|
values[last_paid_line + 1][:capitalized_interests_end] +
|
86
86
|
values[last_paid_line + 1][:capitalized_fees_end]
|
87
87
|
)
|
88
|
-
capital_paid_for_ratio = amount_paid.to_f - (
|
89
|
-
|
90
|
-
|
91
|
-
)
|
88
|
+
# capital_paid_for_ratio = amount_paid.to_f - (
|
89
|
+
# values[last_paid_line + 1][:period_interests] +
|
90
|
+
# values[last_paid_line + 1][:period_fees]
|
91
|
+
# )
|
92
92
|
remaining_capital_for_ratio = (
|
93
93
|
values[last_paid_line + 1][:remaining_capital_start] +
|
94
94
|
values[last_paid_line + 1][:capitalized_interests_end]
|
95
95
|
)
|
96
96
|
|
97
|
-
ratio = options.fetch(:ratio,
|
97
|
+
ratio = options.fetch(:ratio, capital_paid.to_f / remaining_capital_for_ratio).to_f
|
98
98
|
guaranteed_interests_paid = ratio * total_guaranteed_interests
|
99
99
|
guaranteed_fees_paid = ratio * total_guaranteed_fees
|
100
100
|
|