lmi-commits
[Top][All Lists]
Advanced

[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>();
     }
 };
 



reply via email to

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