lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [5645] Allow rated term, ADB, and WP in GUI iff allowed by


From: Greg Chicares
Subject: [lmi-commits] [5645] Allow rated term, ADB, and WP in GUI iff allowed by database
Date: Sat, 05 Jan 2013 13:04:12 +0000

Revision: 5645
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5645
Author:   chicares
Date:     2013-01-05 13:04:12 +0000 (Sat, 05 Jan 2013)
Log Message:
-----------
Allow rated term, ADB, and WP in GUI iff allowed by database

Modified Paths:
--------------
    lmi/trunk/input_harmonization.cpp

Modified: lmi/trunk/input_harmonization.cpp
===================================================================
--- lmi/trunk/input_harmonization.cpp   2013-01-05 13:03:15 UTC (rev 5644)
+++ lmi/trunk/input_harmonization.cpp   2013-01-05 13:04:12 UTC (rev 5645)
@@ -439,7 +439,16 @@
     // TODO ?? WX PORT !! Perhaps those rules leave no choice allowed
     // for gender or smoker.
 
-    bool allow_term = database_->Query(DB_AllowTerm);
+    // Analysis of database vector quantities is generally avoided
+    // in this function, in the interest of simplicity and speed.
+    // Otherwise, this condition would include flat extras. But
+    // this rider restriction is incidental, not essential.
+    bool contract_is_rated(mce_rated == UnderwritingClass);
+
+    bool allow_term =
+           database_->Query(DB_AllowTerm)
+        && (database_->Query(DB_AllowRatedTerm) || !contract_is_rated)
+        ;
     TermRider.enable(        allow_term);
     TermRider.allow(mce_yes, allow_term);
 
@@ -460,16 +469,16 @@
     TermAdjustmentMethod.allow(mce_adjust_term, enable_term);
     TermAdjustmentMethod.allow(mce_adjust_both, enable_term);
 
-    // Analysis of database vector quantities is generally avoided
-    // in this function, in the interest of simplicity and speed.
-    // Otherwise, this condition would include flat extras. But
-    // this WP and ADB restriction is incidental, not essential.
-    bool contract_is_rated(mce_rated == UnderwritingClass);
-
-    bool allow_wp = database_->Query(DB_AllowWp) && !contract_is_rated;
+    bool allow_wp =
+           database_->Query(DB_AllowWp)
+        && (database_->Query(DB_AllowRatedWp) || !contract_is_rated)
+        ;
     WaiverOfPremiumBenefit.enable(        allow_wp);
     WaiverOfPremiumBenefit.allow(mce_yes, allow_wp);
-    bool allow_adb = database_->Query(DB_AllowAdb) && !contract_is_rated;
+    bool allow_adb =
+           database_->Query(DB_AllowAdb)
+        && (database_->Query(DB_AllowRatedAdb) || !contract_is_rated)
+        ;
     AccidentalDeathBenefit.enable(        allow_adb);
     AccidentalDeathBenefit.allow(mce_yes, allow_adb);
 




reply via email to

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