[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master cb5cb7b 021/156: Add more contents to the nar
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master cb5cb7b 021/156: Add more contents to the narrative summary page |
Date: |
Tue, 30 Jan 2018 17:21:53 -0500 (EST) |
branch: master
commit cb5cb7b9aa336255aabe48408c240d59ae51515d
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>
Add more contents to the narrative summary page
Set up ErModeLCWithArticle variable to avoid having complex conditionals
and processing in the templates.
---
ledger_pdf_generator_wx.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index cc77bde..2f4c0c3 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -32,6 +32,7 @@
#include "interpolate_string.hpp"
#include "ledger.hpp"
#include "ledger_invariant.hpp"
+#include "miscellany.hpp" // lmi_tolower()
#include "pdf_writer_wx.hpp"
#include "value_cast.hpp"
#include "version.hpp"
@@ -526,6 +527,37 @@ or contact your ${InsCoShortName} representative.
);
}
+ summary_html += add_body_paragraph_html
+ ( interpolate_html("${AvName}")
+ + text::nbsp()
+ + interpolate_html("${MonthlyChargesPaymentFootnote}")
+ );
+
+ std::string premiums;
+ if(!interpolate_html.test_variable("SinglePremium"))
+ {
+ premiums = R"(
+Premiums are assumed to be paid on ${ErModeLCWithArticle}
+basis and received at the beginning of the contract year.
+)";
+ }
+ else
+ {
+ premiums = R"(
+The single premium is assumed to be paid at the beginning
+of the contract year.
+)";
+ }
+
+ premiums += R"(
+${AvName} Values, ${CsvName} Values,
+and death benefits are illustrated as of the end
+of the contract year. The method we use to allocate
+overhead expenses is the fully allocated expense method.
+)";
+
+ summary_html += add_body_paragraph(premiums);
+
writer.output_html
(writer.get_horz_margin()
,writer.get_vert_margin()
@@ -573,6 +605,19 @@ class pdf_illustration_regular : public pdf_illustration
,policy_name == "Group Flexible Premium Adjustable Life Insurance
Policy"
);
+ // Variable representing the premium payment frequency with the
+ // appropriate indefinite article preceding it, e.g. "an annual" or "a
+ // monthly".
+ auto const er_mode = invar.ErMode[0].str();
+ if(!er_mode.empty())
+ {
+ auto const er_mode_first = lmi_tolower(er_mode[0]);
+ add_variable
+ ("ErModeLCWithArticle"
+ ,(strchr("aeiou", er_mode_first) ? "an" : "a") +
er_mode.substr(1)
+ );
+ }
+
// Add all the pages.
add<cover_page>();
add<narrative_summary_page>();
- [lmi-commits] [lmi] master 49cc809 072/156: Remove HTML construction helpers not needed any more, (continued)
- [lmi-commits] [lmi] master 49cc809 072/156: Remove HTML construction helpers not needed any more, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master efc01fa 046/156: Allow disabling separator lines in wx_table_generator, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master e20544f 018/156: Add check for the ledger type, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master a0a167e 144/156: Rename "compliance_tracking_number" template to "imprimatur", Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 982c9f0 149/156: Remove consecutive blank lines from a Mustache template, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master ec73905 058/156: Add extra pair of braces to std::array<> initializer for clang, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 6a5cd32 079/156: Add "Table Rating" to the header if necessary, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master b01d478 029/156: Resurrect ledger XML IO code as new ledger_evaluator, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 89c676d 009/156: Add pdf_writer_wx::get_page_height() helper, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 8e26a76 004/156: Improve encapsulation by returning only wxDC from pdf_writer_wx, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master cb5cb7b 021/156: Add more contents to the narrative summary page,
Greg Chicares <=
- [lmi-commits] [lmi] master 173cc28 022/156: Change interpolated strings syntax to be Mustache-like, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 2e4850c 023/156: Implement the rest of "Narrative Summary" page body text, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master c341dbb 108/156: Factor out compliance_tracking template from the footer one, Greg Chicares, 2018/01/30
- [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