blend_spreadsheet_loan_generator 0.1.27 → 0.1.28

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: b500ee01fce00eb5d3a71404f720ae470dd141bf187bef1634f3ad57588ba9f5
4
- data.tar.gz: 46b53438bd6c349e3c5b52fc6fe333c081c1fd24bf5c098b28c4437abadb0ae4
3
+ metadata.gz: bf94149d6402855a08bf289dbbe244a061ff53b2b9c985ec6ad986990c80bc07
4
+ data.tar.gz: e4b12c44ab4f2cfaa75214532bcb172cc753be7e1e8971e68314e133b2ec5748
5
5
  SHA512:
6
- metadata.gz: c2ff7ffde2072fda5f29fb4fcaf61f6e3bccb663855c3527bba5d6f416d2949b2bc6a45bf92be0cc548f0976406dc115e54d225b01716b0072f8092a936b125e
7
- data.tar.gz: 673dd3c59ce84d779cced52348043ce32e216faa5dc54bc332a8653206618f63ef5348b3a36b342e63ecfb26b3e795d99946c569c609314771300f0e47e00a66
6
+ metadata.gz: d029eec619738f060c7d202960b2ef0531fea597e6d4687658e5bf23f0f5bcd84482783b880b16b418103b3c20da5b7b5a78057809621dd29441d685c134dc1c
7
+ data.tar.gz: 7b92eadb27db35a729117b2b3b89d72217e4281d72606e78a8c44cd715c772da0a2d42a2a3783a5949dd329336b8ca59450696270f707b67b7be4bfdb2f6d8d1
@@ -85,8 +85,12 @@ module BlendSpreadsheetLoanGenerator
85
85
  values[last_paid_line + 1][:period_calculated_interests] +
86
86
  values[last_paid_line + 1][:period_calculated_fees]
87
87
  )
88
+ capital_paid_for_ratio = amount_paid.to_f - (
89
+ values[last_paid_line + 1][:capitalized_fees_start] +
90
+ values[last_paid_line + 1][:period_calculated_fees]
91
+ )
88
92
 
89
- ratio = options.fetch(:ratio, (capital_paid.to_f / values[last_paid_line + 1][:remaining_capital_start])).to_f
93
+ ratio = options.fetch(:ratio, (capital_paid_for_ratio.to_f / values[last_paid_line + 1][:remaining_capital_start])).to_f
90
94
  guaranteed_interests_paid = ratio * total_guaranteed_interests
91
95
  guaranteed_fees_paid = ratio * total_guaranteed_fees
92
96
 
@@ -1,7 +1,7 @@
1
1
  require 'dry/cli'
2
2
 
3
3
  module BlendSpreadsheetLoanGenerator
4
- VERSION = '0.1.27'.freeze
4
+ VERSION = '0.1.28'.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.27
4
+ version: 0.1.28
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-15 00:00:00.000000000 Z
11
+ date: 2021-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport