blend_spreadsheet_loan_generator 0.1.37 → 0.1.38
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: 7600f8eb355e9e5505dbddbbf4fee01c9f3830f20a3f33d40e64d90a1ef4ca92
|
4
|
+
data.tar.gz: 34f88205215b6c1885061567a2e506500749bba02e4ea37c859abb192a392f66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a98439ca0cc32a014b5eb9a319db03e1ea5e176b20dbde268dc4f81d54da3b702d33ffc085a329988858d0f0448880e76fae10ad5440009253031dfc1d340439
|
7
|
+
data.tar.gz: 0663020d3eecf5a36d7c7eff0fedfa2f166692eac16d4959a32e2157c4e7cd3aede6dc60c981e2de0b444eee82bec8c07621011d7876caa980adc01ec6779dec
|
@@ -174,7 +174,7 @@ module BlendSpreadsheetLoanGenerator
|
|
174
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
175
|
without_fees = "#{remaining_capital_start(line)} * (1 + #{period_rate(line)})^#{loan.deferred_and_capitalized} * #{period_rate(line)}"
|
176
176
|
"=#{with_fees} - #{without_fees}"
|
177
|
-
elsif loan.
|
177
|
+
elsif loan.bullet_term?(term)
|
178
178
|
with_fees = "#{remaining_capital_start(line)} * (1 + #{period_fees_rate(line)} + #{period_rate(line)})^#{index(line)}"
|
179
179
|
without_fees = "#{remaining_capital_start(line)} * (1 + #{period_rate(line)})^#{index(line)}"
|
180
180
|
current = "#{with_fees} - #{without_fees}"
|
@@ -112,6 +112,10 @@ module BlendSpreadsheetLoanGenerator
|
|
112
112
|
fully_deferred? && deferred_and_capitalized == total_deferred_duration
|
113
113
|
end
|
114
114
|
|
115
|
+
def bullet_term?(term)
|
116
|
+
deferred_and_capitalized <= term || bullet? # for last term
|
117
|
+
end
|
118
|
+
|
115
119
|
def in_fine?
|
116
120
|
fully_deferred? && deferred == total_deferred_duration
|
117
121
|
end
|