[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master d2b2cae 038/156: Change column_headings page
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master d2b2cae 038/156: Change column_headings page to use external template |
Date: |
Tue, 30 Jan 2018 17:22:05 -0500 (EST) |
branch: master
commit d2b2caeca29ede44fe5d87916e24ac348fc8edb9
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>
Change column_headings page to use external template
Replace C++ code with just the expansion of an externally defined
template.
---
column_headings.mustache | 182 ++++++++++++++++++++++++++++++++
ledger_pdf_generator_wx.cpp | 252 ++------------------------------------------
2 files changed, 189 insertions(+), 245 deletions(-)
diff --git a/column_headings.mustache b/column_headings.mustache
new file mode 100644
index 0000000..4ea154d
--- /dev/null
+++ b/column_headings.mustache
@@ -0,0 +1,182 @@
+<html>
+<body>
+<p align="center">
+Column Headings and Key Terms Used in This Illustration
+</p>
+<font size="-1">
+<p>
+<b>{{AvName}} Value:</b>
+The accumulation at interest of the net premiums paid,
+{{#SinglePremium}}
+less any withdrawals,
+{{/SinglePremium}}
+less any monthly charges deducted.
+</p>
+<p>
+<b>{{CsvName}} Value:</b>
+{{AvName}} Value less policy debt.
+{{#Has1035ExchCharge}}
+{{CashSurrValueFootnote}}
+{{/Has1035ExchCharge}}
+</p>
+{{^IsInforce}}
+<p>
+<b>Current Illustrated Crediting Rate:</b>
+{{CreditingRateFootnote}}
+</p>
+{{/IsInforce}}
+<p>
+<b>Current Values:</b>
+Values assuming current interest crediting rates
+and current monthly charges. These values are not guaranteed
+and are based on the assumption that premium is paid
+as illustrated.
+</p>
+<p>
+<b>Death Benefit:</b>
+The amount of benefit provided by the Death Benefit Option
+in effect on the date of death, prior to adjustments
+for policy debt and monthly charges payable to the date of death.
+<!--
+Presumably the description of death benefit options should be moved into
+'ProductDescription' (as has already been done in other '.xsl' files).
+-->
+</p>
+<p>
+<b>Death Benefit Option 1:</b>
+Option in which the death benefit is equal to the selected
+face amount of the contract on the date of death of the insured,
+or if greater the {{AvName}} Value
+{{#HasSalesLoadRefund}}
+plus the refund of sales loads (if applicable)
+{{/HasSalesLoadRefund}}
+on the insured's date of death multiplied by the minimum face
+amount percentage for the insured's attained age at death
+(minimum face amount). Please refer to the contract
+for a detailed schedule of death benefit factors.
+</p>
+<!-- Group Experience Rating Logic -->
+{{^GroupExperienceRating}}
+<p>
+<b>Death Benefit Option 2:</b>
+Option in which the death benefit is equal to the selected
+face amount of the contract
+plus the {{AvName}} Value
+on the date of death of the insured, or if greater,
+the {{AvName}} Value
+{{#HasSalesLoadRefund}}
+plus the refund of sales loads (if applicable)
+{{/HasSalesLoadRefund}}
+on the insured's date of death multiplied
+by the death benefit factor for the insured's attained age
+at death (minimum face amount). Please refer to the contract
+for a detailed schedule of death benefit factors.
+{{/GroupExperienceRating}}
+<!-- Group Experience Rating Logic -->
+{{#GroupExperienceRating}}
+</p>
+<p>
+<b>Experience Rating Risk Charge:</b>
+Applies only to certain experience rated groups.
+This charge is based on the cost of insurance charges
+assessed during the certificate year. It may be assessed against
+the account value once per certificate anniversary date
+and upon surrender of the group policy.
+</p>
+{{/GroupExperienceRating}}
+<!-- Group Experience Rating Logic -->
+{{^GroupExperienceRating}}
+{{#Has1035ExchCharge}}
+<p>
+<b>Exchange Charge:</b>
+{{ExchangeChargeFootnote1}}
+</p>
+{{/Has1035ExchCharge}}
+{{/GroupExperienceRating}}
+
+<!-- Single Premium Logic -->
+{{^SinglePremium}}
+<p>
+<b>Flexible Premiums:</b>
+Premiums that may be increased, reduced, or not paid,
+if the account value is sufficient to cover the monthly charges.
+{{/SinglePremium}}
+</p>
+<p>
+<b>Guaranteed Values:</b>
+Values assuming the guaranteed crediting rate
+and the guaranteed maximum monthly charges. These values
+are based on the assumption that premium is paid as illustrated.
+</p>
+<p>
+<b>MEC:</b>
+Modified Endowment Contract - this classification is given
+to a contract in violation of TAMRA
+(Technical and Miscellaneous Revenue Act), which limits
+the amount of premium that can be paid into a life
+insurance contract. To the extent of gain in the contract, loans,
+distributions and withdrawals from a MEC are subject
+to income tax and may also trigger a tax penalty.
+</p>
+{{^IsInforce}}
+<p>
+<b>Midpoint Values:</b>
+Values assuming interest rates that are the average
+of the illustrated current crediting rates
+and the guaranteed minimum interest rate, and monthly charges
+that are the average of the current monthly charges
+and the guaranteed monthly charges.
+These values are not guaranteed and are based on the assumption
+that premium is paid as illustrated.
+</p>
+{{/IsInforce}}
+<!-- Single Premium Logic -->
+{{#ModifiedSinglePremiumOrModifiedSinglePremium0}}
+<p>
+<b>Modified Single Premium:</b>
+After the single premium is paid, additional payment
+under this policy will only be accepted for repayment
+of policy debt, payment required to keep the policy
+from lapsing, or payment required to reinstate the policy.
+</p>
+{{/ModifiedSinglePremiumOrModifiedSinglePremium0}}
+<p>
+<b>Monthly Charges:</b>
+The monthly charges for the following month which include:
+cost of insurance, plus face amount charges (if applicable),
+plus the administrative charge shown
+on the contract schedule page.
+</p>
+<p>
+<b>Premium Outlay:</b>
+The amount of premium assumed to be paid by the contract owner
+or other premium payor.
+</p>
+<p>
+<b>Selected Face Amount:</b>
+The Selected Face Amount may be decreased upon written application
+satisfactory to {{InsCoName}}. A
+requested decrease is allowed only once per Policy Year, and the
+resulting Selected Face Amount after decrease must meet the
+minimum defined in your policy.
+</p>
+<!-- Single Premium Logic -->
+{{#SinglePremium}}
+{{#ModifiedSinglePremiumOrModifiedSinglePremium0}}
+<p>
+<b>Single Premium:</b>
+After the single premium is paid, additional payment
+under this policy will only be accepted for repayment
+of policy debt, payment required to keep the policy
+from lapsing, or payment required to reinstate the policy.
+</p>
+{{/ModifiedSinglePremiumOrModifiedSinglePremium0}}
+<!-- Single Premium Logic -->
+<p>
+<b>Ultimate Illustrated Crediting Rate:</b>
+{{UltCreditingRateFootnote}}
+{{/SinglePremium}}
+</p>
+</font>
+</body>
+</html>
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index bb4ce0d..779e5f1 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -1470,255 +1470,11 @@ class columns_headings_page : public numbered_page
{
numbered_page::render(ledger, writer, dc, interpolate_html);
- text page_html = tag::p[attr::align("center")]
- (text::from("Column Headings and Key Terms Used in This
Illustration")
- );
-
- auto const add_term_paragraph = [=]
- (std::string const& term
- ,std::string const& definition
- ) -> text
- {
- return tag::p
- (tag::b
- (interpolate_html(term)
- )
- )
- (interpolate_html(definition)
- )
- ;
- };
-
- text terms_html;
- terms_html += add_term_paragraph
- ("{{AvName}} Value:"
- ,R"(
-The accumulation at interest of the net premiums paid,
-{{^SinglePremium}}
-less any withdrawals,
-{{/SinglePremium}}
-less any monthly charges deducted.
-)"
- );
-
- terms_html += add_term_paragraph
- ("{{CsvName}} Value:"
- ,R"(
-{{AvName}} Value less policy debt.
-{{#Has1035ExchCharge}}
-{{CashSurrValueFootnote}}
-{{/Has1035ExchCharge}}
-)"
- );
-
- if(!interpolate_html.test_variable("IsInforce"))
- {
- terms_html += add_term_paragraph
- ("Current Illustrated Crediting Rate:"
- ,"{{CreditingRateFootnote}}"
- );
- }
-
- terms_html += add_term_paragraph
- ("Current Values:"
- ,R"(
-Values assuming current interest crediting rates
-and current monthly charges. These values are not guaranteed
-and are based on the assumption that premium is paid
-as illustrated.
-)"
- );
-
- terms_html += add_term_paragraph
- ("Death Benefit:"
- ,R"(
-The amount of benefit provided by the Death Benefit Option
-in effect on the date of death, prior to adjustments
-for policy debt and monthly charges payable to the date of death.
-)"
- );
-
- terms_html += add_term_paragraph
- ("Death Benefit Option 1:"
- ,R"(
-Option in which the death benefit is equal to the selected
-face amount of the contract on the date of death of the insured,
-or if greater the {{AvName}} Value
-{{#HasSalesLoadRefund}}
- plus the refund of sales loads (if applicable)
-{{/HasSalesLoadRefund}}
-on the insured's date of death multiplied by the minimum face
-amount percentage for the insured's attained age at death
-(minimum face amount). Please refer to the contract
-for a detailed schedule of death benefit factors.
-)"
- );
-
- if(!interpolate_html.test_variable("GroupExperienceRating"))
- {
- terms_html += add_term_paragraph
- ("Death Benefit Option 2:"
- ,R"(
-Option in which the death benefit is equal to the selected
-face amount of the contract
-plus the {{AvName}} Value
-on the date of death of the insured, or if greater,
-the {{AvName}} Value
-{{#HasSalesLoadRefund}}
- plus the refund of sales loads (if applicable)
-{{/HasSalesLoadRefund}}
-on the insured's date of death multiplied
-by the death benefit factor for the insured's attained age
-at death (minimum face amount). Please refer to the contract
-for a detailed schedule of death benefit factors.
-)"
- );
-
- if(interpolate_html.test_variable("Has1035ExchCharge"))
- {
- terms_html += add_term_paragraph
- ("Exchange Charge:"
- ,"{{ExchangeChargeFootnote1}}"
- );
- }
- }
- else
- {
- terms_html += add_term_paragraph
- ("Experience Rating Risk Charge:"
- ,R"(
-Applies only to certain experience rated groups.
-This charge is based on the cost of insurance charges
-assessed during the certificate year. It may be assessed against
-the account value once per certificate anniversary date
-and upon surrender of the group policy.
-)"
- );
- }
-
- if(!interpolate_html.test_variable("SinglePremium"))
- {
- terms_html += add_term_paragraph
- ("Flexible Premiums:"
- ,R"(
-Premiums that may be increased, reduced, or not paid,
-if the account value is sufficient to cover the monthly charges.
-)"
- );
- }
-
- terms_html += add_term_paragraph
- ("Guaranteed Values:"
- ,R"(
- Values assuming the guaranteed crediting rate
- and the guaranteed maximum monthly charges. These values
- are based on the assumption that premium is paid as illustrated.
-)"
- );
-
- terms_html += add_term_paragraph
- ("MEC:"
- ,R"(
-Modified Endowment Contract - this classification is given
-to a contract in violation of TAMRA
-(Technical and Miscellaneous Revenue Act), which limits
-the amount of premium that can be paid into a life
-insurance contract. To the extent of gain in the contract, loans,
-distributions and withdrawals from a MEC are subject
-to income tax and may also trigger a tax penalty.
-)"
- );
-
- if(!interpolate_html.test_variable("IsInforce"))
- {
- terms_html += add_term_paragraph
- ("Midpoint Values:"
- ,R"(
-Values assuming interest rates that are the average
-of the illustrated current crediting rates
-and the guaranteed minimum interest rate, and monthly charges
-that are the average of the current monthly charges
-and the guaranteed monthly charges.
-These values are not guaranteed and are based on the assumption
-that premium is paid as illustrated.
-)"
- );
- }
-
- if( interpolate_html.test_variable("ModifiedSinglePremium")
- || interpolate_html.test_variable("ModifiedSinglePremium0")
- )
- {
- terms_html += add_term_paragraph
- ("Modified Single Premium:"
- ,R"(
-After the single premium is paid, additional payment
-under this policy will only be accepted for repayment
-of policy debt, payment required to keep the policy
-from lapsing, or payment required to reinstate the policy.
-)"
- );
- }
-
- terms_html += add_term_paragraph
- ("Monthly Charges:"
- ,R"(
-The monthly charges for the following month which include:
-cost of insurance, plus face amount charges (if applicable),
-plus the administrative charge shown
-on the contract schedule page.
-)"
- );
-
- terms_html += add_term_paragraph
- ("Premium Outlay:"
- ,R"(
-The amount of premium assumed to be paid by the contract owner
-or other premium payor.
-)"
- );
-
- terms_html += add_term_paragraph
- ("Selected Face Amount:"
- ,R"(
-The Selected Face Amount may be decreased upon written application
-satisfactory to {{InsCoName}}. A
-requested decrease is allowed only once per Policy Year, and the
-resulting Selected Face Amount after decrease must meet the
-minimum defined in your policy.
-)"
- );
-
- if(interpolate_html.test_variable("SinglePremium"))
- {
- if( interpolate_html.test_variable("ModifiedSinglePremium")
- || interpolate_html.test_variable("ModifiedSinglePremium0")
- )
- {
- terms_html += add_term_paragraph
- ("Single Premium:"
- ,R"(
-After the single premium is paid, additional payment
-under this policy will only be accepted for repayment
-of policy debt, payment required to keep the policy
-from lapsing, or payment required to reinstate the policy.
-)"
- );
- }
-
- terms_html += add_term_paragraph
- ("Ultimate Illustrated Crediting Rate:"
- ,"{{UltCreditingRateFootnote}}"
- );
- }
-
- page_html += tag::font[attr::size("-1")](terms_html);
-
writer.output_html
(writer.get_horz_margin()
,writer.get_vert_margin()
,writer.get_page_width()
- ,page_html
+ ,interpolate_html("{{>column_headings}}")
);
}
};
@@ -1769,6 +1525,12 @@ class pdf_illustration_regular : public pdf_illustration
);
add_variable
+ ("ModifiedSinglePremiumOrModifiedSinglePremium0"
+ , test_variable("ModifiedSinglePremium")
+ ||test_variable("ModifiedSinglePremium0")
+ );
+
+ add_variable
("SinglePremium"
,starts_with(policy_name, "Single") || starts_with(policy_name,
"Modified")
);
- [lmi-commits] [lmi] master 76881d8 019/156: Refactor: extra add_body_paragraph() helper, (continued)
- [lmi-commits] [lmi] master 76881d8 019/156: Refactor: extra add_body_paragraph() helper, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 08127f1 028/156: Add symbolic constant for the "valign" HTML attribute, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 0d6c7f0 062/156: Get rid of separate wxDC parameter in the code, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master bbada54 084/156: Add image to the columns headings page too, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 3cf5a1c 056/156: Add wx_table_generator::output_super_header(), Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 95e616e 105/156: Add wx_table_generator::columns_count() accessor, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 3f1d437 088/156: Add add_abbreviated_variable() helper, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 118a249 097/156: Add "Column Definitions and Key Terms" page to NASD illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 1ab47c0 063/156: Fix definition of integer-valued variable in PDF illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master bb21f4d 077/156: Fix header for composite illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master d2b2cae 038/156: Change column_headings page to use external template,
Greg Chicares <=
- [lmi-commits] [lmi] master 2bb1c91 041/156: Remove unnecessary outer html and body tags, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 1afd45c 040/156: Avoid spurious coding style violation, Greg Chicares, 2018/01/30
- [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