blend_spreadsheet_loan_generator 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/bslg +0 -1
- data/lib/blend_spreadsheet_loan_generator/concerns/spreadsheet_concern.rb +2 -0
- data/lib/blend_spreadsheet_loan_generator/early_repay.rb +6 -2
- data/lib/blend_spreadsheet_loan_generator/formula.rb +7 -1
- data/lib/blend_spreadsheet_loan_generator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a4482f5c0a0e93b8085f1bc9d064a15873d9da91d4a3c945febb087b9a233ff
|
4
|
+
data.tar.gz: a00f98340c0aa4109b950d59c132bbbeab5878992b474875db21078010762162
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a7e731e49a56746d8a0b60e7a867efa6f10c65e59ad785fed1dd0529e3f1ca748582f1c6e54867b3c25cf54fb553d05f3b5d4a915194815960868c1c0fda226
|
7
|
+
data.tar.gz: 3337ca2d8d85a4eabb170869097eded13b92404f5ea402bb70ef6b943946479784f8e46d0fa868a58498f9b0c52184958671050d3a4944ce3a7099a7e1a2f1c3
|
data/exe/bslg
CHANGED
@@ -33,6 +33,7 @@ module BlendSpreadsheetLoanGenerator
|
|
33
33
|
capitalized_fees_end
|
34
34
|
period_reimbursed_capitalized_fees
|
35
35
|
period_fees_rate
|
36
|
+
period_reimbursed_guaranteed_interests
|
36
37
|
]
|
37
38
|
end
|
38
39
|
|
@@ -53,6 +54,7 @@ module BlendSpreadsheetLoanGenerator
|
|
53
54
|
capitalized_fees_start
|
54
55
|
capitalized_fees_end
|
55
56
|
period_reimbursed_capitalized_fees
|
57
|
+
period_reimbursed_guaranteed_interests
|
56
58
|
]
|
57
59
|
end
|
58
60
|
|
@@ -44,7 +44,7 @@ module BlendSpreadsheetLoanGenerator
|
|
44
44
|
values.map! { |r| set_types([columns, r].transpose.to_h.with_indifferent_access) }
|
45
45
|
|
46
46
|
last_paid_line = values.index { |term| term[:index] == last_paid_term.to_i }
|
47
|
-
guaranteed_line = values.index { |term| term[:index] == options.fetch(:guaranteed_terms,
|
47
|
+
guaranteed_line = values.index { |term| term[:index] == options.fetch(:guaranteed_terms, -1).to_i } || nil
|
48
48
|
total_guaranteed_interests = (
|
49
49
|
if guaranteed_line.present? && guaranteed_line > last_paid_line
|
50
50
|
values[(last_paid_line + 1)..guaranteed_line].sum { |value| value[:period_calculated_interests] }
|
@@ -109,7 +109,7 @@ module BlendSpreadsheetLoanGenerator
|
|
109
109
|
"=#{excel_float(values[last_paid_line][:remaining_capital_end])} - #{period_capital(2)}"
|
110
110
|
|
111
111
|
worksheet[2, columns.index('period_interests') + 1] =
|
112
|
-
"=ARRONDI(#{period_theoric_interests(2)}
|
112
|
+
"=ARRONDI(#{period_theoric_interests(2)}; 2)"
|
113
113
|
|
114
114
|
worksheet[2, columns.index('period_theoric_interests') + 1] =
|
115
115
|
"=#{excel_float(values[last_paid_line + 1][:period_calculated_interests])}"
|
@@ -136,6 +136,9 @@ module BlendSpreadsheetLoanGenerator
|
|
136
136
|
worksheet[2, columns.index('period_reimbursed_capitalized_fees') + 1] =
|
137
137
|
excel_float(values[last_paid_line + 1][:capitalized_fees_start])
|
138
138
|
|
139
|
+
worksheet[2, columns.index('period_reimbursed_guaranteed_interests') + 1] =
|
140
|
+
excel_float(guaranteed_interests_paid)
|
141
|
+
|
139
142
|
apply_formats(worksheet: worksheet)
|
140
143
|
|
141
144
|
worksheet.save
|
@@ -175,6 +178,7 @@ module BlendSpreadsheetLoanGenerator
|
|
175
178
|
h[:capitalized_fees_end] = h[:capitalized_fees_end].to_f
|
176
179
|
h[:period_reimbursed_capitalized_fees] = h[:period_reimbursed_capitalized_fees].to_f
|
177
180
|
h[:period_fees_rate] = h[:period_fees_rate].to_f
|
181
|
+
h[:period_reimbursed_guaranteed_interests] = h[:period_reimbursed_guaranteed_interests].to_f
|
178
182
|
|
179
183
|
h
|
180
184
|
end
|
@@ -42,7 +42,9 @@ module BlendSpreadsheetLoanGenerator
|
|
42
42
|
'+',
|
43
43
|
period_interests(line),
|
44
44
|
'+',
|
45
|
-
period_reimbursed_capitalized_interests(line)
|
45
|
+
period_reimbursed_capitalized_interests(line),
|
46
|
+
'+',
|
47
|
+
period_reimbursed_guaranteed_interests(line)
|
46
48
|
].join(' ')
|
47
49
|
"=ARRONDI(#{total}; 2)"
|
48
50
|
end
|
@@ -207,5 +209,9 @@ module BlendSpreadsheetLoanGenerator
|
|
207
209
|
def period_fees_rate_formula(line:)
|
208
210
|
@interests_formula.period_fees_rate_formula(line: line)
|
209
211
|
end
|
212
|
+
|
213
|
+
def period_reimbursed_guaranteed_interests_formula(line:)
|
214
|
+
excel_float(0.0)
|
215
|
+
end
|
210
216
|
end
|
211
217
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blend_spreadsheet_loan_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MZiserman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|