lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 67db94b 042/156: Implement more of numeric su


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 67db94b 042/156: Implement more of numeric summary page
Date: Tue, 30 Jan 2018 17:22:06 -0500 (EST)

branch: master
commit 67db94b02db68dba31ca115e77704c65e6545767
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>

    Implement more of numeric summary page
---
 ledger_pdf_generator_wx.cpp |  65 +++++++++++++++++
 numeric_summary.mustache    | 172 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 237 insertions(+)

diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index d5036c7..db84015 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -33,6 +33,7 @@
 #include "ledger.hpp"
 #include "ledger_evaluator.hpp"
 #include "ledger_invariant.hpp"
+#include "ledger_variant.hpp"
 #include "miscellany.hpp"               // lmi_tolower()
 #include "pdf_writer_wx.hpp"
 #include "value_cast.hpp"
@@ -325,6 +326,15 @@ class pdf_illustration : protected html_interpolator
         indent += indent;
         add_variable("Space8", indent);
 
+        indent += indent;
+        add_variable("Space16", indent);
+
+        indent += indent;
+        add_variable("Space32", indent);
+
+        indent += indent;
+        add_variable("Space64", indent);
+
         auto const abbreviate_if_necessary = [](std::string s, size_t len)
             {
             if(s.length() > len)
@@ -1567,11 +1577,21 @@ class pdf_illustration_regular : public pdf_illustration
             );
 
         add_variable
+            ("HasInterestDisclaimer"
+            ,!invar.InterestDisclaimer.empty()
+            );
+
+        add_variable
             ("HasGuarPrem"
             ,invar.GuarPrem != 0
             );
 
         add_variable
+            ("HasScaleUnit"
+            ,!invar.ScaleUnit().empty()
+            );
+
+        add_variable
             ("DefnLifeInsIsGPT"
             ,invar.DefnLifeIns == "GPT"
             );
@@ -1582,6 +1602,11 @@ class pdf_illustration_regular : public pdf_illustration
             );
 
         add_variable
+            ("StateIsIllinois"
+            ,state_abbrev == "IL"
+            );
+
+        add_variable
             ("StateIsMaryland"
             ,state_abbrev == "MD"
             );
@@ -1592,6 +1617,11 @@ class pdf_illustration_regular : public pdf_illustration
             );
 
         add_variable
+            ("StateIsIllinoisOrTexas"
+            ,state_abbrev == "IL" || state_abbrev == "TX"
+            );
+
+        add_variable
             ("UWTypeIsMedical"
             ,invar.UWType == "Medical"
             );
@@ -1601,6 +1631,41 @@ class pdf_illustration_regular : public pdf_illustration
             ,evaluate("AnnGAIntRate_Current", invar.InforceYear + 1)
             );
 
+        auto const max_duration = invar.EndtAge - invar.Age;
+        auto const lapse_year_guaruanteed = ledger.GetGuarFull().LapseYear;
+        auto const lapse_year_midpoint = ledger.GetMdptFull().LapseYear;
+        auto const lapse_year_current = ledger.GetCurrFull().LapseYear;
+
+        add_variable
+            ("LapseYear_Guaranteed_LT_MaxDuration"
+            ,lapse_year_guaruanteed < max_duration
+            );
+
+        add_variable
+            ("LapseYear_Guaranteed_Plus1"
+            ,lapse_year_guaruanteed + 1
+            );
+
+        add_variable
+            ("LapseYear_Midpoint_LT_MaxDuration"
+            ,lapse_year_midpoint < max_duration
+            );
+
+        add_variable
+            ("LapseYear_Midpoint_Plus1"
+            ,lapse_year_midpoint + 1
+            );
+
+        add_variable
+            ("LapseYear_Current_LT_MaxDuration"
+            ,lapse_year_current < max_duration
+            );
+
+        add_variable
+            ("LapseYear_Current_Plus1"
+            ,lapse_year_current + 1
+            );
+
         // Add all the pages.
         add<cover_page>();
         add<narrative_summary_page>();
diff --git a/numeric_summary.mustache b/numeric_summary.mustache
index 275a3ea..fa224e4 100644
--- a/numeric_summary.mustache
+++ b/numeric_summary.mustache
@@ -1,3 +1,175 @@
 {{>header}}
 
 <p align="center">Numeric Summary</p>
+
+<font size="-1">
+
+<p align="center">
+Values shown are in
+{{^HasScaleUnit}}
+dollars
+{{/HasScaleUnit}}
+{{#HasScaleUnit}}
+{{HasScaleUnit}}s of dollars
+{{/HasScaleUnit}}
+</p>
+
+{{#Composite}}
+<p>
+    The year of policy lapse on a guaranteed, midpoint
+    and current basis is not depicted in the above table of values
+    for this composite illustration because it is not applicable
+    on a case basis.
+</p>
+{{/Composite}}
+
+{{#LapseYear_Guaranteed_LT_MaxDuration}}
+<p>
+    Additional premium will be required
+    in year {{LapseYear_Guaranteed_Plus1}}
+    or contract will lapse based on guaranteed monthly charges
+    and interest rate.
+</p>
+{{/LapseYear_Guaranteed_LT_MaxDuration}}
+
+{{#LapseYear_Midpoint_LT_MaxDuration}}
+<p>
+    Additional premium will be required
+    in year {{LapseYear_Midpoint_Plus1}}
+    or contract will lapse based on midpoint monthly charges
+    and interest rate.
+</p>
+{{/LapseYear_Midpoint_LT_MaxDuration}}
+
+{{#LapseYear_Current_LT_MaxDuration}}
+<p>
+    Additional premium will be required
+    in year {{LapseYear_Current_Plus1}}
+    or contract will lapse based on current monthly charges
+    and interest rate.
+</p>
+{{/LapseYear_Current_LT_MaxDuration}}
+
+{{#IsMec}}
+<p>
+            IMPORTANT TAX DISCLOSURE: This is a Modified Endowment Contract.
+            Please refer to the Narrative Summary for additional information.
+</p>
+{{/IsMec}}
+
+<br>
+<br>
+
+<p align="center">Certification Statements</p>
+    <p>
+      CONTRACT OWNER / APPLICANT
+    </p>
+    {{#HasInterestDisclaimer}}
+      <p>
+        I understand that at the present time higher current interest rates
+        are credited for policies with case premiums in the amount
+        of {{InterestDisclaimer}}
+      </p>
+    {{/HasInterestDisclaimer}}
+    <p>
+    {{#StateIsIllinoisOrTexas}}
+        {{#StateIsIllinois}}
+            I have received a copy of this illustration and understand
+            that this illustration assumes that the currently illustrated
+            non-guaranteed elements will continue unchanged
+            for all years shown. This is not likely to occur,
+            and actual results may be more or less favorable than those shown.
+        {{/StateIsIllinois}}
+        {{#StateIsTexas}}
+              A copy of this illustration has been provided
+              to the Applicant/Policyowner.
+        {{/StateIsTexas}}
+    {{/StateIsIllinoisOrTexas}}
+    {{^StateIsIllinoisOrTexas}}
+          I have received a copy of this illustration, and I understand
+          that any non-guaranteed elements illustrated are subject
+          to change and could be either higher or lower. Additionally,
+          I have been informed by my agent that these values
+          are not guaranteed.
+    {{/StateIsIllinoisOrTexas}}
+    </p>
+    <br>
+    <br>
+    <table cellspacing="0" cellpadding="0" valign="top">
+        <tr>
+            <td>
+                <u>{{Space64}}{{Space32}}</u>
+            </td>
+            <td>
+                {{Space32}}
+            </td>
+            <td>
+                <u>{{Space32}}</u>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                CONTRACT OWNER OR APPLICANT SIGNATURE
+            </td>
+            <td>
+                {{Space32}}
+            </td>
+            <td>
+                DATE
+            </td>
+        </tr>
+    </table>
+    <br>
+    <br>
+    <p>
+      AGENT / AUTHORIZED REPRESENTATIVE
+    </p>
+    <p>
+        {{#StateIsIllinoisOrTexas}}
+            {{#StateIsIllinois}}
+                I have informed the applicant or policyowner
+                that this illustration assumes that the currently illustrated
+                non-guaranteed elements will continue unchanged
+                for all years shown. This is not likely to occur,
+                and actual results may be more or less favorable than those 
shown.
+            {{/StateIsIllinois}}
+            {{#StateIsTexas}}
+                A copy of this illustration has been provided
+                to the Applicant/Policyowner.
+            {{/StateIsTexas}}
+        {{/StateIsIllinoisOrTexas}}
+        {{^StateIsIllinoisOrTexas}}
+            I certify that this illustration has been presented
+            to the applicant, and that I have explained
+            that any non-guaranteed elements illustrated
+            are subject to change. I have made no statements
+            that are inconsistent with the illustration.
+        {{/StateIsIllinoisOrTexas}}
+    </p>
+    <br>
+    <br>
+    <table cellspacing="0" cellpadding="0" valign="top">
+        <tr>
+            <td>
+                <u>{{Space64}}{{Space32}}</u>
+            </td>
+            <td>
+                {{Space32}}
+            </td>
+            <td>
+                <u>{{Space32}}</u>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                AGENT OR AUTHORIZED REPRESENTATIVE
+            </td>
+            <td>
+                {{Space32}}
+            </td>
+            <td>
+                DATE
+            </td>
+        </tr>
+    </table>
+</font>



reply via email to

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