blend_spreadsheet_loan_generator 0.1.43 → 0.1.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 67df2b7e1ae954e3a178958ff9ae38eac5c075dad5da0e0746a2dbe5d2ef12a4
|
|
4
|
+
data.tar.gz: 8fb75d6abae44e6df84aa79a3df562ee468c70d904db568a4cc452988af47f7d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e3920a396b1195ce22bb4d20682747d98896c37e68bc93bee8936505192357a71c09e10a5c5e8cfee7116309a45d61b421c58a79dbaba4b6a530249919884167
|
|
7
|
+
data.tar.gz: ea1a0ea185b50379b64f0425f2f18967bad50a893c06531cd89f751da36c911827f8ac1c2611603b8177d037716b390e9fa2126527702900cef0b4844d7ac8c2
|
|
@@ -170,12 +170,7 @@ module BlendSpreadsheetLoanGenerator
|
|
|
170
170
|
|
|
171
171
|
def period_calculated_fees_formula(line:, early_repayment: false)
|
|
172
172
|
term = line - 1
|
|
173
|
-
if loan.
|
|
174
|
-
with_fees = "#{remaining_capital_start(line)} * (1 + #{period_rate(line)} + #{period_fees_rate(line)})^#{loan.deferred_and_capitalized} * (#{period_rate(line)} + #{period_fees_rate(line)})"
|
|
175
|
-
without_fees = "#{remaining_capital_start(line)} * (1 + #{period_rate(line)})^#{loan.deferred_and_capitalized} * #{period_rate(line)}"
|
|
176
|
-
|
|
177
|
-
"=#{with_fees} - #{without_fees}"
|
|
178
|
-
elsif loan.bullet_term?(term)
|
|
173
|
+
if loan.bullet_term?(term)
|
|
179
174
|
index = (
|
|
180
175
|
if early_repayment
|
|
181
176
|
index(line - 1)
|
|
@@ -188,6 +183,11 @@ module BlendSpreadsheetLoanGenerator
|
|
|
188
183
|
current = "#{with_fees} - #{without_fees}"
|
|
189
184
|
|
|
190
185
|
"=#{current} - #{capitalized_fees_start(line)}"
|
|
186
|
+
elsif loan.deferred_and_capitalized > 0 && term > loan.deferred_and_capitalized
|
|
187
|
+
with_fees = "#{remaining_capital_start(line)} * (1 + #{period_rate(line)} + #{period_fees_rate(line)})^#{loan.deferred_and_capitalized} * (#{period_rate(line)} + #{period_fees_rate(line)})"
|
|
188
|
+
without_fees = "#{remaining_capital_start(line)} * (1 + #{period_rate(line)})^#{loan.deferred_and_capitalized} * #{period_rate(line)}"
|
|
189
|
+
|
|
190
|
+
"=#{with_fees} - #{without_fees}"
|
|
191
191
|
else
|
|
192
192
|
amount_to_capitalize = [
|
|
193
193
|
'(',
|