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: c2feb14eec33c86a032e711df82ad3b93bf8fd5b3f97c3746a5a24bef7814398
4
- data.tar.gz: e526d50983256ede22d4d54d3e5f0486c36ca88509d254d57b8ad77f5e86a8a4
3
+ metadata.gz: c65bb8dcbc3561cd3fa134d4eac3153934937c0de336afd2f41054a87e87a1e0
4
+ data.tar.gz: d90db3f308d1b6580f70d3c898e9ff38c0dc2fdbb59cd5c688b08a12169b232d
5
5
  SHA512:
6
- metadata.gz: 59c7cf8b548249e27dd0c945598ab2d9a8287c32372b370d6bbbec2f7ffaf960ed978e9fd6e747564541152659dc841f57410769c3fd2571721898f2b389163a
7
- data.tar.gz: 3a83c45004a61448074532f5d7ee1d0541b54734657821d965ab8de33649b056108470d9ac26c1056c3f78d8dd1630ce3b3fad32e01b1795679e2ed492bddd2f
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
- "=ARRONDI(#{capitalized_fees_start(line)} + #{period_calculated_fees(line)}; 2)"
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
@@ -1,7 +1,7 @@
1
1
  require 'dry/cli'
2
2
 
3
3
  module BlendSpreadsheetLoanGenerator
4
- VERSION = '0.1.29'.freeze
4
+ VERSION = '0.1.30'.freeze
5
5
 
6
6
  class Version < Dry::CLI::Command
7
7
  desc 'Print version'
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.29
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-07-30 00:00:00.000000000 Z
11
+ date: 2021-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport