blend_spreadsheet_loan_generator 0.1.28 → 0.1.29

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: bf94149d6402855a08bf289dbbe244a061ff53b2b9c985ec6ad986990c80bc07
4
- data.tar.gz: e4b12c44ab4f2cfaa75214532bcb172cc753be7e1e8971e68314e133b2ec5748
3
+ metadata.gz: c2feb14eec33c86a032e711df82ad3b93bf8fd5b3f97c3746a5a24bef7814398
4
+ data.tar.gz: e526d50983256ede22d4d54d3e5f0486c36ca88509d254d57b8ad77f5e86a8a4
5
5
  SHA512:
6
- metadata.gz: d029eec619738f060c7d202960b2ef0531fea597e6d4687658e5bf23f0f5bcd84482783b880b16b418103b3c20da5b7b5a78057809621dd29441d685c134dc1c
7
- data.tar.gz: 7b92eadb27db35a729117b2b3b89d72217e4281d72606e78a8c44cd715c772da0a2d42a2a3783a5949dd329336b8ca59450696270f707b67b7be4bfdb2f6d8d1
6
+ metadata.gz: 59c7cf8b548249e27dd0c945598ab2d9a8287c32372b370d6bbbec2f7ffaf960ed978e9fd6e747564541152659dc841f57410769c3fd2571721898f2b389163a
7
+ data.tar.gz: 3a83c45004a61448074532f5d7ee1d0541b54734657821d965ab8de33649b056108470d9ac26c1056c3f78d8dd1630ce3b3fad32e01b1795679e2ed492bddd2f
@@ -89,8 +89,13 @@ module BlendSpreadsheetLoanGenerator
89
89
  values[last_paid_line + 1][:capitalized_fees_start] +
90
90
  values[last_paid_line + 1][:period_calculated_fees]
91
91
  )
92
+ remaining_capital_for_ratio = (
93
+ values[last_paid_line + 1][:remaining_capital_start] +
94
+ values[last_paid_line + 1][:capitalized_interests_start] +
95
+ values[last_paid_line + 1][:period_calculated_interests]
96
+ )
92
97
 
93
- ratio = options.fetch(:ratio, (capital_paid_for_ratio.to_f / values[last_paid_line + 1][:remaining_capital_start])).to_f
98
+ ratio = options.fetch(:ratio, capital_paid_for_ratio.to_f / remaining_capital_for_ratio).to_f
94
99
  guaranteed_interests_paid = ratio * total_guaranteed_interests
95
100
  guaranteed_fees_paid = ratio * total_guaranteed_fees
96
101
 
@@ -1,7 +1,7 @@
1
1
  require 'dry/cli'
2
2
 
3
3
  module BlendSpreadsheetLoanGenerator
4
- VERSION = '0.1.28'.freeze
4
+ VERSION = '0.1.29'.freeze
5
5
 
6
6
  class Version < Dry::CLI::Command
7
7
  desc 'Print version'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blend_spreadsheet_loan_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.28
4
+ version: 0.1.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - MZiserman