[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 8f85d09 1/2: Move "ultimate" rate from MST he
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 8f85d09 1/2: Move "ultimate" rate from MST header to '.policy' |
Date: |
Mon, 19 Aug 2019 19:21:01 -0400 (EDT) |
branch: master
commit 8f85d091272ba37e715a7ad927b2fd7d766af8d3
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Move "ultimate" rate from MST header to '.policy'
The convoluted conditionals ported from XSL-FO:
if SinglePremium
if ModifiedSinglePremium0
then XXX
else
then YYY
endif
endif
are no longer required: instead, each proprietary product has
"Ultimate Illustrated Crediting Rate: {{AnnGAIntRate_Current[5]}}¶"
or the same with index 10, or a blank string. Thus, the pure mustache
implementation was logic-riddled, but its replacement is more nearly
logic-free.
The residual inforce-year logic could similarly be moved, but a major
release is coming very soon, so a conservative approach is better; and
the logic ported from XSL-FO was flawed anyway:
if year < 5 then print Nth-year value; else print nothing;
is specified for N ∈ {5,10}, where clearly this is wanted:
if year < N then print Nth-year value; else print nothing;
^
---
ill_reg_header.mst | 14 +++-----------
ledger_invariant.cpp | 2 ++
ledger_invariant.hpp | 1 +
ledger_invariant_init.cpp | 1 +
product_data.cpp | 1 +
product_data.hpp | 1 +
6 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/ill_reg_header.mst b/ill_reg_header.mst
index 9682460..9ed0e08 100644
--- a/ill_reg_header.mst
+++ b/ill_reg_header.mst
@@ -88,17 +88,9 @@
Current Illustrated Crediting Rate:
{{PresentCreditingRate}}<br>
- {{#SinglePremium}}
- {{#InforceYearLT5}}
- Ultimate Illustrated Crediting Rate:
- {{#ModifiedSinglePremium0}}
- {{AnnGAIntRate_Current[10]}}<br>
- {{/ModifiedSinglePremium0}}
- {{^ModifiedSinglePremium0}}
- {{AnnGAIntRate_Current[5]}}<br>
- {{/ModifiedSinglePremium0}}
- {{/InforceYearLT5}}
- {{/SinglePremium}}
+ {{#InforceYearLT5}}
+ {{UltCreditingRateHeader}}
+ {{/InforceYearLT5}}
{{^Composite}}
Underwriting Type:
diff --git a/ledger_invariant.cpp b/ledger_invariant.cpp
index 0036b5a..7020438 100644
--- a/ledger_invariant.cpp
+++ b/ledger_invariant.cpp
@@ -301,6 +301,7 @@ void LedgerInvariant::Alloc(int len)
Strings["SinglePremiumFootnote" ] = &SinglePremiumFootnote
;
Strings["MonthlyChargesFootnote" ] = &MonthlyChargesFootnote
;
Strings["UltCreditingRateFootnote" ] = &UltCreditingRateFootnote
;
+ Strings["UltCreditingRateHeader" ] = &UltCreditingRateHeader
;
Strings["MaxNaarFootnote" ] = &MaxNaarFootnote
;
Strings["PremTaxSurrChgFootnote" ] = &PremTaxSurrChgFootnote
;
Strings["PolicyFeeFootnote" ] = &PolicyFeeFootnote
;
@@ -694,6 +695,7 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant
const& a_Addend)
SinglePremiumFootnote = a_Addend.SinglePremiumFootnote;
MonthlyChargesFootnote = a_Addend.MonthlyChargesFootnote;
UltCreditingRateFootnote = a_Addend.UltCreditingRateFootnote;
+ UltCreditingRateHeader = a_Addend.UltCreditingRateHeader;
MaxNaarFootnote = a_Addend.MaxNaarFootnote;
PremTaxSurrChgFootnote = a_Addend.PremTaxSurrChgFootnote;
PolicyFeeFootnote = a_Addend.PolicyFeeFootnote;
diff --git a/ledger_invariant.hpp b/ledger_invariant.hpp
index 86705d6..5dda2cd 100644
--- a/ledger_invariant.hpp
+++ b/ledger_invariant.hpp
@@ -345,6 +345,7 @@ class LMI_SO LedgerInvariant final
std::string SinglePremiumFootnote;
std::string MonthlyChargesFootnote;
std::string UltCreditingRateFootnote;
+ std::string UltCreditingRateHeader;
std::string MaxNaarFootnote;
std::string PremTaxSurrChgFootnote;
std::string PolicyFeeFootnote;
diff --git a/ledger_invariant_init.cpp b/ledger_invariant_init.cpp
index ae538b7..89e351c 100644
--- a/ledger_invariant_init.cpp
+++ b/ledger_invariant_init.cpp
@@ -416,6 +416,7 @@ void LedgerInvariant::Init(BasicValues const* b)
SinglePremiumFootnote = p.datum("SinglePremiumFootnote"
);
MonthlyChargesFootnote = p.datum("MonthlyChargesFootnote"
);
UltCreditingRateFootnote = p.datum("UltCreditingRateFootnote"
);
+ UltCreditingRateHeader = p.datum("UltCreditingRateHeader"
);
MaxNaarFootnote = p.datum("MaxNaarFootnote"
);
PremTaxSurrChgFootnote = p.datum("PremTaxSurrChgFootnote"
);
PolicyFeeFootnote = p.datum("PolicyFeeFootnote"
);
diff --git a/product_data.cpp b/product_data.cpp
index 314da20..37c8e4c 100644
--- a/product_data.cpp
+++ b/product_data.cpp
@@ -315,6 +315,7 @@ void product_data::ascribe_members()
ascribe("SinglePremiumFootnote" ,
&product_data::SinglePremiumFootnote );
ascribe("MonthlyChargesFootnote" ,
&product_data::MonthlyChargesFootnote );
ascribe("UltCreditingRateFootnote" ,
&product_data::UltCreditingRateFootnote );
+ ascribe("UltCreditingRateHeader" ,
&product_data::UltCreditingRateHeader );
ascribe("MaxNaarFootnote" , &product_data::MaxNaarFootnote
);
ascribe("PremTaxSurrChgFootnote" ,
&product_data::PremTaxSurrChgFootnote );
ascribe("PolicyFeeFootnote" , &product_data::PolicyFeeFootnote
);
diff --git a/product_data.hpp b/product_data.hpp
index 0e9c33c..1387e85 100644
--- a/product_data.hpp
+++ b/product_data.hpp
@@ -305,6 +305,7 @@ class LMI_SO product_data
glossed_string SinglePremiumFootnote;
glossed_string MonthlyChargesFootnote;
glossed_string UltCreditingRateFootnote;
+ glossed_string UltCreditingRateHeader;
glossed_string MaxNaarFootnote;
glossed_string PremTaxSurrChgFootnote;
glossed_string PolicyFeeFootnote;