blend_spreadsheet_loan_generator 0.1.25 → 0.1.26

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: 169f284925fdd8ff961eecf431c8fd62625cf9b5cc1006cf2c0d1fe2ff3d290d
4
- data.tar.gz: af871dff6102cbb857cd7fbc65f75265b597cee10689adc820c1b7060cf72dbe
3
+ metadata.gz: 46ffd519aaf8bc1d7b8bb2bb84c376e107f04cf2c8af6ee23ad028a563e63d8b
4
+ data.tar.gz: da8b157b33839272a2647e201111a4349451a62c569195e95c293071c77800df
5
5
  SHA512:
6
- metadata.gz: 483fbcafe2c4f763f2b1a53108d4d80f344471a730de69e2a938370ae5159581925f93b1efa33e29530afbc74897a0aaf4251a9885c46ac2f7926478a15c51cc
7
- data.tar.gz: da813c5b56325a72db5023b2fad4be50008bb112c2198ac491a99d7d17c57131245eb2bc48750aef5c19addd9b2825a27e34a7e639a59ac125844c63e4aa4e11
6
+ metadata.gz: 3ba10779043886b9870cd78fbbda175362c231a9afd824fa4d0a2107284d16ce493dd76469f542f8508359efd57041306e1727f645c409100e16e50712cf74a9
7
+ data.tar.gz: 6c497e6e9d39c7b537a5f07fb14306850b53cfe77b12653cb0ce6dd2b1e4329ce199fb73c007beb50c945e193146cddb7ad20cd1526f1beb15a5b3ee828f86b3
@@ -47,8 +47,8 @@ module BlendSpreadsheetLoanGenerator
47
47
  last_paid_line = values.index { |term| term[:index] == last_paid_term.to_i } || -1
48
48
  guaranteed_line = values.index { |term| term[:index] == options.fetch(:guaranteed_terms, -1).to_i } || nil
49
49
  total_guaranteed_interests = (
50
- if guaranteed_line.present? && guaranteed_line > last_paid_line
51
- values[(last_paid_line + 1)..guaranteed_line].sum { |value| value[:period_calculated_interests] }
50
+ if guaranteed_line.present? && guaranteed_line >= (last_paid_line + 2)
51
+ values[(last_paid_line + 2)..guaranteed_line].sum { |value| value[:period_calculated_interests] }
52
52
  else
53
53
  0
54
54
  end
@@ -1,7 +1,7 @@
1
1
  require 'dry/cli'
2
2
 
3
3
  module BlendSpreadsheetLoanGenerator
4
- VERSION = '0.1.25'.freeze
4
+ VERSION = '0.1.26'.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.25
4
+ version: 0.1.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - MZiserman