[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master fc6d8b7 034/156: Implement the "Columns Headi
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master fc6d8b7 034/156: Implement the "Columns Headings" page |
Date: |
Tue, 30 Jan 2018 17:22:04 -0500 (EST) |
branch: master
commit fc6d8b74bc82dd6e8165d46b72693be7f956a17e
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>
Implement the "Columns Headings" page
Reproduce the old XSL logic, the only change is due to renaming of
"SalesLoadRefund" to "HasSalesLoadRefund".
---
ledger_pdf_generator_wx.cpp | 267 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 267 insertions(+)
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index cf63b78..bb7987f 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -1423,6 +1423,272 @@ consult with your own independent tax or legal counsel.
}
};
+class columns_headings_page : public numbered_page
+{
+ public:
+ void render
+ (Ledger const& ledger
+ ,pdf_writer_wx& writer
+ ,wxDC& dc
+ ,html_interpolator const& interpolate_html
+ ) override
+ {
+ 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
+ );
+ }
+};
+
+
// Regular illustration.
class pdf_illustration_regular : public pdf_illustration
{
@@ -1519,6 +1785,7 @@ class pdf_illustration_regular : public pdf_illustration
add<cover_page>();
add<narrative_summary_page>();
add<narrative_summary_cont_page>();
+ add<columns_headings_page>();
}
};
- [lmi-commits] [lmi] master 3f1d437 088/156: Add add_abbreviated_variable() helper, (continued)
- [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, 2018/01/30
- [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 <=
- [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, 2018/01/30
- [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