lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master a4e3e7e 4/5: Fix defect introduced 20120822T1


From: Greg Chicares
Subject: [lmi-commits] [lmi] master a4e3e7e 4/5: Fix defect introduced 20120822T1138Z: missing inforce specamt-load max
Date: Fri, 15 Sep 2017 07:51:30 -0400 (EDT)

branch: master
commit a4e3e7e1e9b301684527a2a5fb596b6d64441e51
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Fix defect introduced 20120822T1138Z: missing inforce specamt-load max
    
    For details, see the 20170914T2105Z commit message.
---
 input_xml_io.cpp | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/input_xml_io.cpp b/input_xml_io.cpp
index 8a88e67..68dfb47 100644
--- a/input_xml_io.cpp
+++ b/input_xml_io.cpp
@@ -611,9 +611,28 @@ void Input::redintegrate_ex_post
         {
         // Version 7 introduced 'InforceSpecAmtLoadBase'; previously,
         // the first element of 'SpecamtHistory' had been used in its
-        // place, which would have disregarded any term rider.
+        // place, which would have disregarded the load limit as well
+        // as any term rider.
+
+        // This product_database object could be constructed outside
+        // this inner block if it ever becomes useful for any other
+        // purpose. It is not obvious whether it can be merged with
+        // the earlier instantiation in this function, which uses a
+        // dummy value for StateOfJurisdiction.
+        product_database db
+            (ProductName          .value()
+            ,Gender               .value()
+            ,UnderwritingClass    .value()
+            ,Smoking              .value()
+            ,IssueAge             .value()
+            ,GroupUnderwritingType.value()
+            ,StateOfJurisdiction  .value()
+            );
         RealizeSpecifiedAmount();
-        InforceSpecAmtLoadBase = TermRiderAmount.value() + 
SpecifiedAmountRealized_[0].value();
+        InforceSpecAmtLoadBase = std::min
+            (TermRiderAmount.value() + SpecifiedAmountRealized_[0].value()
+            ,db.Query(DB_SpecAmtLoadLimit)
+            );
         }
 }
 



reply via email to

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