blend_spreadsheet_loan_generator 0.1.105 → 0.1.106
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3decf3ef46d2a7636475a1364d97c98089a323fafaa671f2aaf0741b665887a5
|
4
|
+
data.tar.gz: 612c00e81f10f7da63d2c780596b5b1a3a9c5f110a8fd3e7633574fe5d779c23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a249a15ffc47d20f3aea1ff65b9fe7708de9e439c214e9855b3092cfd866c6e3bf0080a14ba40fd0379b74d5e29289f138f5526e8a8184030c115d631b32b5e7
|
7
|
+
data.tar.gz: 9a2dfca3ff564d50acbda00a914019dfe9d68bc63379aa00684ceabcf24d4f83df04c03770abc4a3bc8c579f6c531c74832a43d95f994982314515a9d6ac5f08
|
@@ -80,19 +80,15 @@ module BlendSpreadsheetLoanGenerator
|
|
80
80
|
due_on = values[last_paid_line + 1][:due_on] + 1.month
|
81
81
|
|
82
82
|
capital_paid = amount_paid.to_f - (
|
83
|
-
values[last_paid_line + 1][:
|
84
|
-
values[last_paid_line + 1][:
|
85
|
-
values[last_paid_line + 1][:period_calculated_interests] +
|
86
|
-
values[last_paid_line + 1][:period_calculated_fees]
|
83
|
+
values[last_paid_line + 1][:capitalized_interests_end] +
|
84
|
+
values[last_paid_line + 1][:capitalized_fees_end]
|
87
85
|
)
|
88
86
|
capital_paid_for_ratio = amount_paid.to_f - (
|
89
|
-
values[last_paid_line + 1][:
|
90
|
-
values[last_paid_line + 1][:period_calculated_fees]
|
87
|
+
values[last_paid_line + 1][:capitalized_fees_end]
|
91
88
|
)
|
92
89
|
remaining_capital_for_ratio = (
|
93
|
-
values[last_paid_line + 1][:
|
94
|
-
values[last_paid_line + 1][:
|
95
|
-
values[last_paid_line + 1][:period_calculated_interests]
|
90
|
+
values[last_paid_line + 1][:remaining_capital_end] +
|
91
|
+
values[last_paid_line + 1][:capitalized_interests_end]
|
96
92
|
)
|
97
93
|
|
98
94
|
ratio = options.fetch(:ratio, capital_paid_for_ratio.to_f / remaining_capital_for_ratio).to_f
|