[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>
- [lmi-commits] [lmi] master 9695e9e 112/156: Create InitAnnLoanDueRate vector in addition to the scalar, (continued)
- [lmi-commits] [lmi] master 9695e9e 112/156: Create InitAnnLoanDueRate vector in addition to the scalar, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 5f6dc89 131/156: Use string objects for illustration_table_column fields, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master fb01571 035/156: Pass what is being expanded to interpolation function, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master fc6d8b7 034/156: Implement the "Columns Headings" page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 46788b8 119/156: Start implementing individual private placement illustration kind, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 1287474 114/156: Start private group placement illustration class implementation, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 0f78daf 050/156: Compute the footer size in page_with_footer::pre_render(), Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 6b3b5b2 054/156: Factor out illustration_table_generator from tabular_detail2_page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 23d26f8 055/156: Factor out reusable page_with_tabular_report class, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master f484622 044/156: Only show numeric summary if not in force, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 67db94b 042/156: Implement more of numeric summary page,
Greg Chicares <=
- [lmi-commits] [lmi] master dbaf3c4 048/156: Render PDF illustrations in two passes, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master de9567e 152/156: Fix misplaced commas in ledger PDF generator code, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 783befa 006/156: Add separate class for representing HTML contents, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 8c5be11 128/156: Use proper types for get_two_column_header() parameters, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 257ff4b 065/156: Add numeric summary table to PDF illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master ef38c9d 141/156: Revert the title map related changes, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master b1ab0fa 126/156: Leave a gap between upper footer part and main page contents, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 940198c 059/156: Add numeric summary attachment page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master b341a2a 061/156: Factor out using_illustration_table helper class, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 1b46585 076/156: Use MarketingNameFootnote & StateMarketingImprimatur on cover page, Greg Chicares, 2018/01/30