[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [6196] Establish input for supplemental specified amount
From: |
Greg Chicares |
Subject: |
[lmi-commits] [6196] Establish input for supplemental specified amount |
Date: |
Sun, 31 May 2015 02:56:42 +0000 |
Revision: 6196
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6196
Author: chicares
Date: 2015-05-31 02:56:39 +0000 (Sun, 31 May 2015)
Log Message:
-----------
Establish input for supplemental specified amount
Modified Paths:
--------------
lmi/trunk/input.hpp
lmi/trunk/input_harmonization.cpp
lmi/trunk/input_realization.cpp
lmi/trunk/skin.xrc
lmi/trunk/yare_input.cpp
lmi/trunk/yare_input.hpp
Modified: lmi/trunk/input.hpp
===================================================================
--- lmi/trunk/input.hpp 2015-05-28 17:15:57 UTC (rev 6195)
+++ lmi/trunk/input.hpp 2015-05-31 02:56:39 UTC (rev 6196)
@@ -199,6 +199,7 @@
std::string RealizeTaxBracket ();
std::string RealizeProjectedSalary ();
std::string RealizeSpecifiedAmount ();
+ std::string RealizeSupplementalAmount ();
std::string RealizeDeathBenefitOption ();
std::string RealizePayment ();
std::string RealizePaymentMode ();
@@ -392,6 +393,7 @@
numeric_sequence TaxBracket ;
numeric_sequence ProjectedSalary ;
specamt_sequence SpecifiedAmount ;
+ // For brevity, "SupplementalAmount" would seem better.
specamt_sequence SupplementalSpecifiedAmount ;
dbo_sequence DeathBenefitOption ;
payment_sequence Payment ;
@@ -454,6 +456,8 @@
std::vector<tnr_unrestricted_double> ProjectedSalaryRealized_ ;
// tnr_nonnegative_double
std::vector<tnr_unrestricted_double> SpecifiedAmountRealized_ ;
// [permit negative for term adjustment?]
std::vector<mce_sa_strategy> SpecifiedAmountStrategyRealized_ ;
+ std::vector<tnr_unrestricted_double> SupplementalAmountRealized_ ;
+ std::vector<mce_sa_strategy> SupplementalAmountStrategyRealized_;
std::vector<mce_dbopt> DeathBenefitOptionRealized_ ;
std::vector<tnr_unrestricted_double> PaymentRealized_ ;
// tnr_nonnegative_double
std::vector<mce_pmt_strategy> PaymentStrategyRealized_ ;
Modified: lmi/trunk/input_harmonization.cpp
===================================================================
--- lmi/trunk/input_harmonization.cpp 2015-05-28 17:15:57 UTC (rev 6195)
+++ lmi/trunk/input_harmonization.cpp 2015-05-31 02:56:39 UTC (rev 6196)
@@ -430,8 +430,10 @@
&& database_->Query(DB_TermMinIssAge) <= IssueAge.value()
&& IssueAge.value() <=
database_->Query(DB_TermMaxIssAge)
;
- TermRider.enable( allow_term);
- TermRider.allow(mce_yes, allow_term);
+ bool term_is_a_rider = !database_->Query(DB_TermIsNotRider);
+ bool allow_term_rider = allow_term && term_is_a_rider;
+ TermRider.enable( allow_term_rider);
+ TermRider.allow(mce_yes, allow_term_rider);
bool enable_term = mce_yes == TermRider;
bool specamt_indeterminate_for_term =
@@ -519,7 +521,7 @@
bool specamt_solve = mce_solve_specamt == SolveType;
bool specamt_from_term_proportion =
- allow_term
+ allow_term_rider
&& mce_yes == TermRiderUseProportion
&& mce_yes == TermRider
;
@@ -559,6 +561,9 @@
bool inhibit_sequence = specamt_solve || specamt_from_term_proportion;
SpecifiedAmount.enable(!inhibit_sequence);
+ // Unaffected by solves: no solve offered for supplemental specamt.
+ SupplementalSpecifiedAmount.enable(allow_term && !term_is_a_rider);
+
bool prem_solve = mce_solve_ee_prem == SolveType;
// Many payment strategies are forbidden if specamt is a function
Modified: lmi/trunk/input_realization.cpp
===================================================================
--- lmi/trunk/input_realization.cpp 2015-05-28 17:15:57 UTC (rev 6195)
+++ lmi/trunk/input_realization.cpp 2015-05-31 02:56:39 UTC (rev 6196)
@@ -222,6 +222,7 @@
s.push_back(RealizeTaxBracket ());
s.push_back(RealizeProjectedSalary ());
s.push_back(RealizeSpecifiedAmount ());
+ s.push_back(RealizeSupplementalAmount ());
s.push_back(RealizeDeathBenefitOption ());
s.push_back(RealizePayment ());
s.push_back(RealizePaymentMode ());
@@ -522,6 +523,19 @@
}
//============================================================================
+std::string Input::RealizeSupplementalAmount()
+{
+ return realize_sequence_string
+ (*this
+ ,SupplementalAmountRealized_
+ ,SupplementalAmountStrategyRealized_
+ ,SupplementalSpecifiedAmount
+ ,SupplementalSpecifiedAmount.allowed_keywords()
+ ,SupplementalSpecifiedAmount.default_keyword()
+ );
+}
+
+//============================================================================
std::string Input::RealizeDeathBenefitOption()
{
std::string s = realize_sequence_string
Modified: lmi/trunk/skin.xrc
===================================================================
--- lmi/trunk/skin.xrc 2015-05-28 17:15:57 UTC (rev 6195)
+++ lmi/trunk/skin.xrc 2015-05-31 02:56:39 UTC (rev 6196)
@@ -2242,6 +2242,21 @@
<flag>wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT</flag>
<border>4</border>
<object class="wxStaticText">
+ <label>Supplemental amount</label>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxGROW</flag>
+ <object class="InputSequenceEntry"
name="SupplementalSpecifiedAmount">
+ <title>Supplemental amount</title>
+ <help>Supplemental amount, or corridor, glp, gsp,
maximum, salary, sevenpay, target</help>
+ <size>180,-1</size>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT</flag>
+ <border>4</border>
+ <object class="wxStaticText">
<label>Death benefit option</label>
</object>
</object>
Modified: lmi/trunk/yare_input.cpp
===================================================================
--- lmi/trunk/yare_input.cpp 2015-05-28 17:15:57 UTC (rev 6195)
+++ lmi/trunk/yare_input.cpp 2015-05-31 02:56:39 UTC (rev 6196)
@@ -163,6 +163,7 @@
TaxBracket = convert_vector_type<double
>(z.TaxBracketRealized_ );
ProjectedSalary = convert_vector_type<double
>(z.ProjectedSalaryRealized_ );
SpecifiedAmount = convert_vector_type<double
>(z.SpecifiedAmountRealized_ );
+ SupplementalAmount = convert_vector_type<double
>(z.SupplementalAmountRealized_ );
DeathBenefitOption = convert_vector_type<mcenum_dbopt
>(z.DeathBenefitOptionRealized_ );
Payment = convert_vector_type<double
>(z.PaymentRealized_ );
PaymentMode = convert_vector_type<mcenum_mode
>(z.PaymentModeRealized_ );
@@ -177,6 +178,7 @@
FundAllocations = convert_vector_type<double
>(z.FundAllocationsRealized_ ); // INPUT !! Not yet implemented.
CashValueEnhancementRate = convert_vector_type<double
>(z.CashValueEnhancementRateRealized_ );
SpecifiedAmountStrategy = convert_vector_type<mcenum_sa_strategy
>(z.SpecifiedAmountStrategyRealized_ );
+ SupplementalAmountStrategy = convert_vector_type<mcenum_sa_strategy
>(z.SupplementalAmountStrategyRealized_ );
PaymentStrategy = convert_vector_type<mcenum_pmt_strategy
>(z.PaymentStrategyRealized_ );
CorporationPaymentStrategy = convert_vector_type<mcenum_pmt_strategy
>(z.CorporationPaymentStrategyRealized_ );
}
Modified: lmi/trunk/yare_input.hpp
===================================================================
--- lmi/trunk/yare_input.hpp 2015-05-28 17:15:57 UTC (rev 6195)
+++ lmi/trunk/yare_input.hpp 2015-05-31 02:56:39 UTC (rev 6196)
@@ -217,6 +217,7 @@
std::vector<double> TaxBracket ;
std::vector<double> ProjectedSalary ;
std::vector<double> SpecifiedAmount ;
+ std::vector<double> SupplementalAmount ;
std::vector<mcenum_dbopt> DeathBenefitOption ;
std::vector<double> Payment ;
std::vector<mcenum_mode> PaymentMode ;
@@ -255,6 +256,7 @@
// mcenum_pmt_strategy IndividualPaymentStrategy ;
std::vector<mcenum_sa_strategy > SpecifiedAmountStrategy ;
+ std::vector<mcenum_sa_strategy > SupplementalAmountStrategy ;
std::vector<mcenum_pmt_strategy > PaymentStrategy ;
std::vector<mcenum_pmt_strategy > CorporationPaymentStrategy ;
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [6196] Establish input for supplemental specified amount,
Greg Chicares <=