[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 7a17f90 4/4: Improve an error message
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 7a17f90 4/4: Improve an error message |
Date: |
Fri, 21 May 2021 09:05:43 -0400 (EDT) |
branch: master
commit 7a17f90f92ad176769441c1f0fef06a7bd3bb6e6
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Improve an error message
It would be nicer to change AccountValue::CalculateSpecAmtFromStrategy()
to use total first-year premium including any 1035 exchange, so that a
'gsp' strategy would just work. But that's a more ambitious change than
is wanted at this moment.
---
ihs_avmly.cpp | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/ihs_avmly.cpp b/ihs_avmly.cpp
index fad7cd4..a491f1e 100644
--- a/ihs_avmly.cpp
+++ b/ihs_avmly.cpp
@@ -555,7 +555,17 @@ void AccountValue::TxExch1035()
// 7702 !! Adding one cent to z here is bogus; premiums
// are inherently currency amounts, and should be tested
// as such.
- LMI_ASSERT(dblize(GrossPmts[Month]) <= 0.01 + z);
+ if((0.01 + z) < dblize(GrossPmts[Month]))
+ {
+ alarum()
+ << "1035 exchange exceeds guideline limit."
+ << " Increase specified amount to at least "
+ << std::fixed
+ << GetModalSpecAmtGSP(GrossPmts[Month])
+ << "."
+ << LMI_FLUSH
+ ;
+ }
GrossPmts[Month] = round_gross_premium().c(z);
}
// Limit external 1035 first, then internal, as necessary to avoid