blend_spreadsheet_loan_generator 0.1.29 → 0.1.30
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: c65bb8dcbc3561cd3fa134d4eac3153934937c0de336afd2f41054a87e87a1e0
|
4
|
+
data.tar.gz: d90db3f308d1b6580f70d3c898e9ff38c0dc2fdbb59cd5c688b08a12169b232d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 531b9805eb3433e1835010a33fda24014e7071b5a21692bf8e66c78aeebe6cd45a1d05048158d97ccb484c2e9b3b76315034aad73efd7923b6b511a5e695331d
|
7
|
+
data.tar.gz: 0c2e0a0d93fff9c3620abbf6cea28750f7375e1fb4becc799447e481ec655b02c94ca07907712aef2aed350bd5a798b03ffc22ce85a7f3d184294de0336ebaf8
|
@@ -27,24 +27,3 @@ module BlendSpreadsheetLoanGenerator
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
30
|
-
|
31
|
-
|
32
|
-
def generate_csv(data:, name:)
|
33
|
-
CSV.open(name, 'wb') do |csv|
|
34
|
-
data.each do |datum|
|
35
|
-
row = []
|
36
|
-
datum.each.with_index do |value, index|
|
37
|
-
row << (
|
38
|
-
if index == 0
|
39
|
-
value.to_i
|
40
|
-
elsif index == 1
|
41
|
-
Date.parse(value).strftime('%m/%d/%Y')
|
42
|
-
else
|
43
|
-
value.gsub(',', '.').to_f
|
44
|
-
end
|
45
|
-
)
|
46
|
-
end
|
47
|
-
csv << row
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
@@ -191,7 +191,9 @@ module BlendSpreadsheetLoanGenerator
|
|
191
191
|
def capitalized_fees_end_formula(line:)
|
192
192
|
term = line - 1
|
193
193
|
if term <= loan.deferred_and_capitalized
|
194
|
-
"
|
194
|
+
with_fees = "#{remaining_capital_start_formula(line)} * (1 + #{period_fees_rate(line)} + #{period_rate(line)})^#{index(line)}"
|
195
|
+
without_fees = "#{remaining_capital_start_formula(line)} * (1 + #{period_rate(line)})^#{index(line)}"
|
196
|
+
"=ARRONDI(#{with_fees} - #{without_fees})"
|
195
197
|
else
|
196
198
|
"=ARRONDI(#{capitalized_fees_start(line)} - #{period_reimbursed_capitalized_fees(line)}; 2)"
|
197
199
|
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.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MZiserman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|