[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5647] Enforce spouse and child rider amount limits
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5647] Enforce spouse and child rider amount limits |
Date: |
Sun, 06 Jan 2013 08:44:16 +0000 |
Revision: 5647
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5647
Author: chicares
Date: 2013-01-06 08:44:15 +0000 (Sun, 06 Jan 2013)
Log Message:
-----------
Enforce spouse and child rider amount limits
Modified Paths:
--------------
lmi/trunk/ChangeLog
lmi/trunk/input_harmonization.cpp
Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2013-01-05 22:07:47 UTC (rev 5646)
+++ lmi/trunk/ChangeLog 2013-01-06 08:44:15 UTC (rev 5647)
@@ -31738,3 +31738,33 @@
Rearrange. Work with riders before specamt, because term rider can
affect some specamt fields.
+20130104T1738Z <address@hidden> [544]
+
+ input_harmonization.cpp
+Use cached value instead of querying database unnecessarily.
+
+20130105T0109Z <address@hidden> [544]
+
+ input_harmonization.cpp
+Save and reuse results of database queries.
+
+20130105T1303Z <address@hidden> [544]
+
+ dbdict.cpp
+Forbid sample-product rated riders where unsupported by calculations.
+
+20130105T1304Z <address@hidden> [544]
+
+ input_harmonization.cpp
+Allow rated term, ADB, and WP in GUI iff allowed by database.
+
+20130105T2207Z <address@hidden> [544]
+
+ input_harmonization.cpp
+Enforce rider age restrictions.
+
+20130106T0844Z <address@hidden> [544]
+
+ input_harmonization.cpp
+Enforce spouse and child rider amount limits.
+
Modified: lmi/trunk/input_harmonization.cpp
===================================================================
--- lmi/trunk/input_harmonization.cpp 2013-01-05 22:07:47 UTC (rev 5646)
+++ lmi/trunk/input_harmonization.cpp 2013-01-06 08:44:15 UTC (rev 5647)
@@ -492,19 +492,30 @@
ChildRider .enable( allow_child_rider);
ChildRider .allow(mce_yes, allow_child_rider);
ChildRiderAmount .enable(mce_yes == ChildRider);
+ // Child and spouse riders generally have a nonzero minimum amount
+ // if elected, but zero must be allowed if not elected (e.g., for
+ // inforce). Given that the amount field is enabled only when the
+ // rider is elected, it could never be set back to zero manually
+ // when unelected--so it's forced to zero when unelected.
+ ChildRiderAmount .minimum_and_maximum
+ ((mce_yes == ChildRider) ? database_->Query(DB_ChildRiderMinAmt) : 0.0
+ ,(mce_yes == ChildRider) ? database_->Query(DB_ChildRiderMaxAmt) : 0.0
+ );
bool allow_spouse_rider = database_->Query(DB_AllowSpouseRider);
SpouseRider .enable( allow_spouse_rider);
SpouseRider .allow(mce_yes, allow_spouse_rider);
SpouseRiderAmount.enable(mce_yes == SpouseRider);
+ SpouseRiderAmount.minimum_and_maximum
+ ((mce_yes == SpouseRider) ? database_->Query(DB_SpouseRiderMinAmt) :
0.0
+ ,(mce_yes == SpouseRider) ? database_->Query(DB_SpouseRiderMaxAmt) :
0.0
+ );
SpouseIssueAge .enable(mce_yes == SpouseRider);
-// DATABASE !! Add spouse minimum and maximum issue ages, as well as
-// minimum and maximum amounts for both spouse and child.
// If 'SpouseIssueAge' were always enabled, then it might make
// sense to enable 'SpouseRider' only if the issue age is in the
// allowable range (as is done above for ADB and WP). However,
// 'SpouseIssueAge' is useful only if the spouse rider is elected,
// so it makes more sense to constrain its value this way.
- SpouseIssueAge.minimum_and_maximum
+ SpouseIssueAge .minimum_and_maximum
(static_cast<int>(database_->Query(DB_SpouseRiderMinIssAge))
,static_cast<int>(database_->Query(DB_SpouseRiderMaxIssAge))
);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5647] Enforce spouse and child rider amount limits,
Greg Chicares <=