[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 956fcca 071/156: Change the second narrative
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 956fcca 071/156: Change the second narrative summary page to use a template too |
Date: |
Tue, 30 Jan 2018 17:22:13 -0500 (EST) |
branch: master
commit 956fccad09e6a26246c5903cee43ef18faebc065
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>
Change the second narrative summary page to use a template too
Define the page contents in the template instead of hard-coding it.
---
ledger_pdf_generator_wx.cpp | 301 +---------------------------------------
narrative_summary_cont.mustache | 237 +++++++++++++++++++++++++++++++
2 files changed, 238 insertions(+), 300 deletions(-)
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index cb5d95b..10dc903 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -1013,306 +1013,7 @@ class narrative_summary_cont_page : public numbered_page
{
numbered_page::render(ledger, writer, interpolate_html);
- // Just a convenient helper performing a common operation.
- auto const add_body_paragraph = [=](std::string const& s) -> text
- {
- return add_body_paragraph_html(interpolate_html(s));
- };
-
- text summary_html = tag::p[attr::align("center")]
- (text::from("NARRATIVE SUMMARY (Continued)")
- );
-
- summary_html += tag::br;
-
- if(interpolate_html.test_variable("HasSalesLoadRefund"))
- {
- summary_html += add_body_paragraph
- (R"(
-Sales Load Refund: We will refund a portion of the sales load
-to you, as part of your {{CsvName}}
-Value, if you surrender your contract within the first two
-policy years. In policy year 1, we will refund
-{{SalesLoadRefundRate0}}
-of the first contract year sales load collected
-and in contract year 2, we will refund
-{{SalesLoadRefundRate1}}
-of the first contract year sales load collected.
-)"
- );
- }
-
- if(interpolate_html.test_variable("NoLapse"))
- {
- summary_html += add_body_paragraph
- (R"(
-{{NoLapseProvisionName}}:
-The contract will remain in force after the first premium
-has been paid, even if there is insufficient
-{{AvName}} Value
-to cover the monthly charges provided that the insured
-is not in a substandard rating class and the policy debt
-does not exceed {{AvName}} Value.
-)"
- );
- }
-
- summary_html += add_body_paragraph("{{GuarMortalityFootnote}}");
-
- summary_html += add_body_paragraph
- (R"(
-This illustration assumes death of the insured at age {{EndtAge}}.
-)"
- );
-
- summary_html += add_body_paragraph
- (R"(
- The loan interest rate is fixed at {{InitAnnLoanDueRate}} per year.
-)"
- );
-
- summary_html += add_body_paragraph
- (R"(
-The state of issue is {{StatePostalAbbrev}}.
-)"
- );
-
- summary_html += add_body_paragraph
- (R"(
-This illustration assumes an initial Selected Face Amount of
-${{InitBaseSpecAmt}}. Selected Face
-Amount reductions assumed in this illustration (if any) are shown
-in the Tabular Detail.
-)"
- );
-
- if(interpolate_html.test_variable("IsInforce"))
- {
- summary_html += add_body_paragraph
- (R"(
-This illustration assumes a beginning account value of
-${{InforceUnloanedAV}} as of the date of this illustration.
-)"
- );
-
- summary_html += add_body_paragraph
- (R"(
-This illustration assumes a beginning cost basis of
-${{InforceTaxBasis}} as
-of the date of this illustration; the actual cost basis
-may be higher or lower. Consult the Home Office for cost
-basis information.
-)"
- );
- }
-
- if(interpolate_html.test_variable("Composite"))
- {
- summary_html += add_body_paragraph
- (R"(
-Please see the attached census, listing the face amounts,
-underwriting classes and issue ages for individual participants.
-)"
- );
- }
-
- if(interpolate_html.test_variable("StateIsCarolina"))
- {
- summary_html += add_body_paragraph
- (R"(
-In the states of North Carolina and South Carolina,
-Guaranteed Issue Underwriting is referred
-to as "Limited Underwriting" and Simplified
-Issue Underwriting is referred to as "Simplified Underwriting".
-)"
- );
- }
-
- if(interpolate_html.test_variable("StateIsMaryland"))
- {
- summary_html += add_body_paragraph
- (R"(
-In the state of Maryland, Guaranteed Issue Underwriting
-is referred to as "Nonstandard Limited Underwriting"
-and Simplified Issue Underwriting is referred to as
-"Nonstandard Simplified Underwriting".
-)"
- );
- }
-
- if(interpolate_html.test_variable("GroupExperienceRating"))
- {
- summary_html += add_body_paragraph
- (R"(
-We may assess a Market Value Adjustment upon a surrender
-of the certificate when the surrender proceeds are intended
-to be applied to an insurance policy issued by an insurer
-unaffiliated with
-{{InsCoShortName}}
-with an intent to qualify the exchange as a tax free exchange
-under IRC section 1035.
-)"
- );
-
- if(!interpolate_html.test_variable("UseExperienceRating"))
- {
- summary_html += add_body_paragraph
- ("This illustration does not reflect experience rating."
- );
- }
-
- summary_html += add_body_paragraph
- (R"(
-The guaranteed values reflect the maximum charges permitted
-by the contract, which may include an Experience Rating
-Risk Charge.
-)"
- );
-
- summary_html += add_body_paragraph
- (R"(
-No Experience Rating Risk Charge or a distribution
-of an Experience Rating Reserve Credit is reflected
-in the current, non-guaranteed values. Actual charges
-and credits will be based on the actual experience of the group.
-)"
- );
- }
-
- if(interpolate_html.test_variable("Has1035ExchCharge"))
- {
- summary_html += add_body_paragraph
- (R"(
-{{^SinglePremium}}
- Upon surrender of this policy, where the surrender
- proceeds are intended to be applied to an insurance policy
- or certificate issued in conjunction with an intent
- to qualify the exchange as a tax free exchange
- under Section 1035 of the Internal Revenue Code,
- we may assess an Exchange Charge. The Exchange Charge
- is the greater of the Market Value Adjustment Charge
- and the Percentage of Premium Charge. In the states
- of Florida or Indiana, the Exchange charge
- (referred to as Assignment Charge in Florida)
- will be the Percentage of Premium Charge only.
- The Exchange Charge will potentially reduce
- the surrender proceeds, but will never increase
- the surrender proceeds. Please refer to your policy
- for details.
-{{/SinglePremium}}
-{{#SinglePremium}}
- Upon surrender of this policy, where the surrender proceeds
- are intended to be applied to an insurance policy
- or certificate issued in conjunction with an intent
- to qualify the exchange as a tax free exchange
- under Section 1035 of the Internal Revenue Code (1035
- Exchange), we may assess an Exchange Charge. The Exchange
- Charge will potentially reduce the surrender proceeds,
- but will never increase the surrender proceeds.
- Please refer to your policy for details.
-{{/SinglePremium}}
-)"
- );
- }
-
- if(interpolate_html.test_variable("HasSpouseRider"))
- {
- summary_html += add_body_paragraph
- (R"(
-The ${{SpouseRiderAmount}} Spouse
-rider provides term life insurance on the spouse
-(issue age {{SpouseIssueAge}})
-for a limited duration, for an extra charge.
-Please refer to your contract for specific provisions
-and a detailed schedule of charges.
-)"
- );
- }
-
- if(interpolate_html.test_variable("HasChildRider"))
- {
- summary_html += add_body_paragraph
- (R"(
-The ${{ChildRiderAmount}} Child
-rider provides term life insurance on the insured's children
-for a limited duration, for an extra charge. Please refer
-to your contract for specific provisions
-and a detailed schedule of charges.
-)"
- );
- }
-
- summary_html += add_body_paragraph("{{SurrenderFootnote}}");
-
- summary_html += add_body_paragraph("{{FundRateFootnote}}");
-
- summary_html += add_body_paragraph("{{Space2}}{{FundRateFootnote0}}");
-
- summary_html += add_body_paragraph("{{Space2}}{{FundRateFootnote1}}");
-
- summary_html += tag::p[attr::align("center")]
- (tag::b
- (text::from("IMPORTANT TAX DISCLOSURE")
- )
- );
-
- summary_html += add_body_paragraph
- (R"(
-As illustrated, this contract
-{{#IsMec}}
- becomes
-{{/IsMec}}
-{{^IsMec}}
- would not become
-{{/IsMec}}
-a Modified Endowment Contract (MEC)
-under the Internal Revenue Code
-{{#IsMec}}
-{{MecYearPlus1}}
-{{/IsMec}}
-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 penalty tax.
-)"
- );
-
- if
- ( !interpolate_html.test_variable("SinglePremium")
- && !interpolate_html.test_variable("IsInforce")
- )
- {
- summary_html += add_body_paragraph
- (R"(
-The initial 7-pay premium limit is ${{InitSevenPayPrem}}.
-)"
- );
- }
-
- summary_html += tag::p
- (tag::font[attr::size("-1")]
- (tag::b
- (interpolate_html
- (R"(
-The information contained in this illustration is not written
-or intended as tax or legal advice, and may not be relied upon
-for purposes of avoiding any federal tax penalties.
-Neither {{InsCoShortName}} nor any
-of its employees or representatives are authorized to give tax
-or legal advice. For more information pertaining
-to the tax consequences of purchasing or owning this policy,
-consult with your own independent tax or legal counsel.
-)"
- )
- )
- )
- );
-
- writer.output_html
- (writer.get_horz_margin()
- ,writer.get_vert_margin()
- ,writer.get_page_width()
- ,summary_html
- );
+ render_page_template("narrative_summary_cont", writer,
interpolate_html);
}
};
diff --git a/narrative_summary_cont.mustache b/narrative_summary_cont.mustache
new file mode 100644
index 0000000..3737024
--- /dev/null
+++ b/narrative_summary_cont.mustache
@@ -0,0 +1,237 @@
+<!-- No header for this page, just the logo -->
+<img src="company_logo.png"></img>
+
+<p align="center">NARRATIVE SUMMARY (Continued)</p>
+
+<br></br>
+
+<font size="-1">
+
+{{#HasSalesLoadRefund}}
+ <p>
+ Sales Load Refund: We will refund a portion of the sales load
+ to you, as part of your {{CsvName}}
+ Value, if you surrender your contract within the first two
+ policy years. In policy year 1, we will refund
+ {{SalesLoadRefundRate0}}
+ of the first contract year sales load collected
+ and in contract year 2, we will refund
+ {{SalesLoadRefundRate1}}
+ of the first contract year sales load collected.
+ </p>
+{{/HasSalesLoadRefund}}
+
+{{#NoLapse}}
+ <p>
+ {{NoLapseProvisionName}}:
+ The contract will remain in force after the first premium
+ has been paid, even if there is insufficient
+ {{AvName}} Value
+ to cover the monthly charges provided that the insured
+ is not in a substandard rating class and the policy debt
+ does not exceed {{AvName}} Value.
+ </p>
+{{/NoLapse}}
+
+<p>
+{{GuarMortalityFootnote}}
+</p>
+
+<p>
+This illustration assumes death of the insured at age {{EndtAge}}.
+</p>
+
+<p>
+The loan interest rate is fixed at {{InitAnnLoanDueRate}} per year.
+</p>
+
+<p>
+The state of issue is {{StatePostalAbbrev}}.
+</p>
+
+<p>
+This illustration assumes an initial Selected Face Amount of
+${{InitBaseSpecAmt}}. Selected Face
+Amount reductions assumed in this illustration (if any) are shown
+in the Tabular Detail.
+</p>
+
+{{#IsInforce}}
+ <p>
+ This illustration assumes a beginning account value of
+ ${{InforceUnloanedAV}} as of the date of this illustration.
+ </p>
+
+ <p>
+ This illustration assumes a beginning cost basis of
+ ${{InforceTaxBasis}} as
+ of the date of this illustration; the actual cost basis
+ may be higher or lower. Consult the Home Office for cost
+ basis information.
+ </p>
+{{/IsInforce}}
+
+{{#Composite}}
+ <p>
+ Please see the attached census, listing the face amounts,
+ underwriting classes and issue ages for individual participants.
+ </p>
+{{/Composite}}
+
+{{#StateIsCarolina}}
+ <p>
+ In the states of North Carolina and South Carolina,
+ Guaranteed Issue Underwriting is referred
+ to as "Limited Underwriting" and Simplified
+ Issue Underwriting is referred to as "Simplified Underwriting".
+ </p>
+{{/StateIsCarolina}}
+
+{{#StateIsMaryland}}
+ <p>
+ In the state of Maryland, Guaranteed Issue Underwriting
+ is referred to as "Nonstandard Limited Underwriting"
+ and Simplified Issue Underwriting is referred to as
+ "Nonstandard Simplified Underwriting".
+ </p>
+{{/StateIsMaryland}}
+
+{{#GroupExperienceRating}}
+ <p>
+ We may assess a Market Value Adjustment upon a surrender
+ of the certificate when the surrender proceeds are intended
+ to be applied to an insurance policy issued by an insurer
+ unaffiliated with
+ {{InsCoShortName}}
+ with an intent to qualify the exchange as a tax free exchange
+ under IRC section 1035.
+ </p>
+
+ {{^UseExperienceRating}}
+ <p>
+ This illustration does not reflect experience rating.
+ </p>
+ {{/UseExperienceRating}}
+
+ <p>
+ The guaranteed values reflect the maximum charges permitted
+ by the contract, which may include an Experience Rating
+ Risk Charge.
+ </p>
+
+ <p>
+ No Experience Rating Risk Charge or a distribution
+ of an Experience Rating Reserve Credit is reflected
+ in the current, non-guaranteed values. Actual charges
+ and credits will be based on the actual experience of the group.
+ </p>
+{{/GroupExperienceRating}}
+
+{{#Has1035ExchCharge}}
+ <p>
+ {{^SinglePremium}}
+ Upon surrender of this policy, where the surrender
+ proceeds are intended to be applied to an insurance policy
+ or certificate issued in conjunction with an intent
+ to qualify the exchange as a tax free exchange
+ under Section 1035 of the Internal Revenue Code,
+ we may assess an Exchange Charge. The Exchange Charge
+ is the greater of the Market Value Adjustment Charge
+ and the Percentage of Premium Charge. In the states
+ of Florida or Indiana, the Exchange charge
+ (referred to as Assignment Charge in Florida)
+ will be the Percentage of Premium Charge only.
+ The Exchange Charge will potentially reduce
+ the surrender proceeds, but will never increase
+ the surrender proceeds. Please refer to your policy
+ for details.
+ {{/SinglePremium}}
+ {{#SinglePremium}}
+ Upon surrender of this policy, where the surrender proceeds
+ are intended to be applied to an insurance policy
+ or certificate issued in conjunction with an intent
+ to qualify the exchange as a tax free exchange
+ under Section 1035 of the Internal Revenue Code (1035
+ Exchange), we may assess an Exchange Charge. The Exchange
+ Charge will potentially reduce the surrender proceeds,
+ but will never increase the surrender proceeds.
+ Please refer to your policy for details.
+ {{/SinglePremium}}
+ </p>
+{{/Has1035ExchCharge}}
+
+{{#HasSpouseRider}}
+ <p>
+ The ${{SpouseRiderAmount}} Spouse
+ rider provides term life insurance on the spouse
+ (issue age {{SpouseIssueAge}})
+ for a limited duration, for an extra charge.
+ Please refer to your contract for specific provisions
+ and a detailed schedule of charges.
+ </p>
+{{/HasSpouseRider}}
+
+{{#HasChildRider}}
+ <p>
+ The ${{ChildRiderAmount}} Child
+ rider provides term life insurance on the insured's children
+ for a limited duration, for an extra charge. Please refer
+ to your contract for specific provisions
+ and a detailed schedule of charges.
+ </p>
+{{/HasChildRider}}
+
+<p>{{SurrenderFootnote}}</p>
+
+<p>{{FundRateFootnote}}</p>
+
+<p> {{FundRateFootnote0}}</p>
+
+<p> {{FundRateFootnote1}}</p>
+
+</font>
+
+<p align="center">IMPORTANT TAX DISCLOSURE</p>
+
+<font size="-1">
+
+<p>
+As illustrated, this contract
+{{#IsMec}}
+ becomes
+{{/IsMec}}
+{{^IsMec}}
+ would not become
+{{/IsMec}}
+a Modified Endowment Contract (MEC)
+under the Internal Revenue Code
+{{#IsMec}}
+{{MecYearPlus1}}
+{{/IsMec}}
+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 penalty tax.
+</p>
+
+{{^SinglePremium}}
+ {{^IsInforce}}
+ <p>
+ The initial 7-pay premium limit is ${{InitSevenPayPrem}}.
+ </p>
+ {{/IsInforce}}
+{{/SinglePremium}}
+
+<p>
+<b>
+The information contained in this illustration is not written
+or intended as tax or legal advice, and may not be relied upon
+for purposes of avoiding any federal tax penalties.
+Neither {{InsCoShortName}} nor any
+of its employees or representatives are authorized to give tax
+or legal advice. For more information pertaining
+to the tax consequences of purchasing or owning this policy,
+consult with your own independent tax or legal counsel.
+</b>
+</p>
+
+</font>
- [lmi-commits] [lmi] master de9567e 152/156: Fix misplaced commas in ledger PDF generator code, (continued)
- [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
- [lmi-commits] [lmi] master 234cd39 012/156: Use custom font sizes to be closer to the existing illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 956fcca 071/156: Change the second narrative summary page to use a template too,
Greg Chicares <=
- [lmi-commits] [lmi] master dbe5955 015/156: Factor out html_interpolator from pdf_illustration, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 9665573 070/156: Change narrative summary page to use an external template, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master a629602 083/156: Use custom <scaled_image> HTML tag for the embedded images, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master b425030 082/156: Factor out html_cell_for_pdf_output from numeric_summary_table_cell, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master d99576a 069/156: Change cover page to use an external template, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 416ab02 030/156: Add support for vector variables to PDF generating code, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master d4dfaa9 075/156: Also use data directory for image files referenced from HTML, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 4f98db5 081/156: Don't show "Age 70" row in numeric summary for composites, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master f8853b9 090/156: Add "contract numbers" fragment to the header, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 61430d2 092/156: Move some variable definitions to the base illustration class, Greg Chicares, 2018/01/30