lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 61430d2 092/156: Move some variable definitio


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 61430d2 092/156: Move some variable definitions to the base illustration class
Date: Tue, 30 Jan 2018 17:22:20 -0500 (EST)

branch: master
commit 61430d28188344db9ef0074301763a89ada1dc3d
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>

    Move some variable definitions to the base illustration class
    
    No real changes, this is done in preparation for reusing these variables
    for the other illustration kinds.
---
 ledger_pdf_generator_wx.cpp | 42 ++++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index 84577a8..bcd2819 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -761,6 +761,28 @@ class pdf_illustration : protected html_interpolator
         add_abbreviated_variable("MasterContractNumber", full_abbrev_length / 
2);
         add_abbreviated_variable("ContractNumber", full_abbrev_length);
         add_abbreviated_variable("ContractNumber", full_abbrev_length / 2);
+
+        add_variable
+            ("UWTypeIsMedical"
+            ,invar.UWType == "Medical"
+            );
+
+        add_variable
+            ("UWClassIsRated"
+            ,invar.UWClass == "Rated"
+            );
+
+        auto const& policy_name = invar.PolicyLegalName;
+        add_variable
+            ("GroupCarveout"
+            ,policy_name == "Group Flexible Premium Adjustable Life Insurance 
Certificate"
+            );
+
+        auto const& state_abbrev = invar.GetStatePostalAbbrev();
+        add_variable
+            ("StateIsCarolina"
+            ,state_abbrev == "NC" || state_abbrev == "SC"
+            );
     }
 
     // Use non-default font sizes to make it simpler to replicate the existing
@@ -1689,11 +1711,6 @@ class pdf_illustration_regular : public pdf_illustration
             );
 
         add_variable
-            ("GroupCarveout"
-            ,policy_name == "Group Flexible Premium Adjustable Life Insurance 
Certificate"
-            );
-
-        add_variable
             ("GroupExperienceRating"
             ,policy_name == "Group Flexible Premium Adjustable Life Insurance 
Policy"
             );
@@ -1742,11 +1759,6 @@ class pdf_illustration_regular : public pdf_illustration
             );
 
         add_variable
-            ("StateIsCarolina"
-            ,state_abbrev == "NC" || state_abbrev == "SC"
-            );
-
-        add_variable
             ("StateIsIllinois"
             ,state_abbrev == "IL"
             );
@@ -1767,16 +1779,6 @@ class pdf_illustration_regular : public pdf_illustration
             );
 
         add_variable
-            ("UWTypeIsMedical"
-            ,invar.UWType == "Medical"
-            );
-
-        add_variable
-            ("UWClassIsRated"
-            ,invar.UWClass == "Rated"
-            );
-
-        add_variable
             ("UltimateInterestRate"
             ,evaluate("AnnGAIntRate_Current", invar.InforceYear + 1)
             );



reply via email to

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