blend_spreadsheet_loan_generator 0.1.21 → 0.1.23

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: 2f28ea47a7ea85e82f8bb7e6235025a727c4ed68e48ca775b8504a55e0ae104c
4
- data.tar.gz: 933c6ad4f65149b569d0ac66e695b1896e6cd80d7e4b259cbd95920af99d811a
3
+ metadata.gz: 97656de6803defd1af54366733c9f096f2a571fba89576b0a96ced269bfdebae
4
+ data.tar.gz: 9b0036e1d46ae2835d7d1add57af17e18b29107a9b29e1f8e00dde54d86fef48
5
5
  SHA512:
6
- metadata.gz: acf4406ebca9f8ec7bee91d47d8ab9f187b7e5da5253d64ddf58d2e66f451c1f54522ae43eaee1a9002f490101c7b4323bf0591ad0765d49befffdd4134e1c6b
7
- data.tar.gz: 39c9ce533a34f54a95ee4147759fddfb5ebcc0c985c0b32b9ea0cdbe75865752aba7c4add64c0a60c51f7acae4585342c73a08a1c165c2eb8ed0b0852d116f37
6
+ metadata.gz: 5ae85edc2da12b6d1689f33e7564486fad79968c51c5cbb8d3ffb998b2c563d544f5267dd3b3df5a869ac98bd28742d9ccd0e1908e0f8b186b0b7b04835edfc2
7
+ data.tar.gz: 5896188fffc2c776cf8f9a8ba847c35f4848830ac8f1a893bc59a216e24a5f11b994d1e41dd4304fa15c38e1513ecd543721e22ba93e19ece033ed8021221744
@@ -75,7 +75,13 @@ module BlendSpreadsheetLoanGenerator
75
75
  values[last_paid_line + 1][:capitalized_interests_start] +
76
76
  values[last_paid_line + 1][:capitalized_fees_start]
77
77
  )
78
- ratio = options.fetch(:ratio, (capital_paid.to_f / values[last_paid_line + 1][:remaining_capital_start])).to_f
78
+ actual_capital_paid = (
79
+ capital_paid -
80
+ values[last_paid_line + 1][:period_calculated_interests] -
81
+ values[last_paid_line + 1][:period_calculated_fees]
82
+ )
83
+
84
+ ratio = options.fetch(:ratio, (actual_capital_paid.to_f / values[last_paid_line + 1][:remaining_capital_start])).to_f
79
85
  guaranteed_interests_paid = (
80
86
  ratio * total_guaranteed_interests
81
87
  )
@@ -1,7 +1,7 @@
1
1
  require 'dry/cli'
2
2
 
3
3
  module BlendSpreadsheetLoanGenerator
4
- VERSION = '0.1.21'.freeze
4
+ VERSION = '0.1.23'.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.21
4
+ version: 0.1.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - MZiserman