lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 110f4b9 7/7: Round apportioned AV increments


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 110f4b9 7/7: Round apportioned AV increments
Date: Wed, 26 Aug 2020 20:09:03 -0400 (EDT)

branch: master
commit 110f4b9a03c08199123595616c179ddda387a13d
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Round apportioned AV increments
---
 ihs_avmly.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/ihs_avmly.cpp b/ihs_avmly.cpp
index 0b5ec85..6baff52 100644
--- a/ihs_avmly.cpp
+++ b/ihs_avmly.cpp
@@ -333,8 +333,11 @@ void AccountValue::process_payment(double payment)
 // portions of unloaned account value according to input allocations.
 void AccountValue::IncrementAVProportionally(double increment)
 {
-    AVGenAcct += increment * GenAcctPaymentAllocation;
-    AVSepAcct += increment * SepAcctPaymentAllocation;
+    increment = round_minutiae()(increment);
+    double genacct_increment = increment * GenAcctPaymentAllocation;
+    genacct_increment = round_minutiae()(genacct_increment);
+    AVGenAcct += genacct_increment;
+    AVSepAcct += increment - genacct_increment;
 }
 
 //============================================================================



reply via email to

[Prev in Thread] Current Thread [Next in Thread]