blend_spreadsheet_loan_generator 0.1.25 → 0.1.26
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: 46ffd519aaf8bc1d7b8bb2bb84c376e107f04cf2c8af6ee23ad028a563e63d8b
|
4
|
+
data.tar.gz: da8b157b33839272a2647e201111a4349451a62c569195e95c293071c77800df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ba10779043886b9870cd78fbbda175362c231a9afd824fa4d0a2107284d16ce493dd76469f542f8508359efd57041306e1727f645c409100e16e50712cf74a9
|
7
|
+
data.tar.gz: 6c497e6e9d39c7b537a5f07fb14306850b53cfe77b12653cb0ce6dd2b1e4329ce199fb73c007beb50c945e193146cddb7ad20cd1526f1beb15a5b3ee828f86b3
|
@@ -47,8 +47,8 @@ module BlendSpreadsheetLoanGenerator
|
|
47
47
|
last_paid_line = values.index { |term| term[:index] == last_paid_term.to_i } || -1
|
48
48
|
guaranteed_line = values.index { |term| term[:index] == options.fetch(:guaranteed_terms, -1).to_i } || nil
|
49
49
|
total_guaranteed_interests = (
|
50
|
-
if guaranteed_line.present? && guaranteed_line
|
51
|
-
values[(last_paid_line +
|
50
|
+
if guaranteed_line.present? && guaranteed_line >= (last_paid_line + 2)
|
51
|
+
values[(last_paid_line + 2)..guaranteed_line].sum { |value| value[:period_calculated_interests] }
|
52
52
|
else
|
53
53
|
0
|
54
54
|
end
|