[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 4250de9 104/156: Add first variant of NASD su
|
From: |
Greg Chicares |
|
Subject: |
[lmi-commits] [lmi] master 4250de9 104/156: Add first variant of NASD supplemental page |
|
Date: |
Tue, 30 Jan 2018 17:22:22 -0500 (EST) |
branch: master
commit 4250de9102e51c6e11fd2428c83738acfbfe011f
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>
Add first variant of NASD supplemental page
Still missing the "split premiums" variant implementation.
---
ledger_pdf_generator_wx.cpp | 70 +++++++++++++++++++++++++++++++++++++++++++++
nasd_supplemental.mustache | 8 ++++++
2 files changed, 78 insertions(+)
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index e7f1ab3..5a5a6d6 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -2111,6 +2111,75 @@ class nasd_basic : public page_with_tabular_report
}
};
+class nasd_supplemental : public page_with_tabular_report
+{
+ private:
+ enum
+ {column_policy_year
+ ,column_end_of_year_age
+ ,column_premium_outlay
+ ,column_admin_charge
+ ,column_premium_tax_load
+ ,column_dac_tax_load
+ ,column_net_premium
+ ,column_cost_of_insurance_charges
+ ,column_cur_account_value
+ ,column_cur_cash_surr_value
+ ,column_cur_death_benefit
+ ,column_max
+ };
+
+ illustration_table_columns const& get_table_columns() const override
+ {
+ static illustration_table_columns const columns =
+ {{ "PolicyYear" , "Policy\nYear" ,
"999" }
+ ,{ "AttainedAge" , "End of\nYear Age" ,
"999" }
+ ,{ "GrossPmt" , "Premium\nOutlay" ,
"999,999" }
+ ,{ "PolicyFee_Current" , "Admin\nCharge" ,
"999,999" }
+ ,{ "PremTaxLoad_Current" , "Premium\nTax Load" ,
"999,999" }
+ ,{ "DacTaxLoad_Current" , "DAC\nTax Load" ,
"999,999" }
+ ,{ "NetPmt_Current" , "Net\nPremium" ,
"999,999" }
+ ,{ "COICharge_Current" , "Cost of\nInsurance\nCharges" ,
"999,999" }
+ ,{ "AcctVal_Current" , "Current\nAccount\nValue" ,
"999,999" }
+ ,{ "CSVNet_Current" , "Current\nCash Surr\nValue" ,
"999,999" }
+ ,{ "EOYDeathBft_Current" , "Current\nDeath\nBenefit" ,
"9,999,999" }
+ };
+
+ return columns;
+ }
+
+ bool should_show_column(Ledger const& ledger, int column) const override
+ {
+ // One column should be hidden for composite ledgers.
+ return column != column_end_of_year_age || !ledger.is_composite();
+ }
+
+ int render_or_measure_fixed_page_part
+ (illustration_table_generator& table
+ ,pdf_writer_wx& writer
+ ,html_interpolator const& interpolate_html
+ ,enum_output_mode output_mode
+ ) const override
+ {
+ int pos_y = writer.get_vert_margin();
+
+ pos_y += writer.output_html
+ (writer.get_horz_margin()
+ ,pos_y
+ ,writer.get_page_width()
+ ,interpolate_html("{{>nasd_supplemental}}")
+ ,output_mode
+ );
+
+ table.output_header(&pos_y, output_mode);
+
+ pos_y += table.get_separator_line_height();
+ table.output_horz_separator(0, column_max, pos_y, output_mode);
+
+ return pos_y;
+ }
+};
+
// NASD illustration.
class pdf_illustration_nasd : public pdf_illustration
{
@@ -2152,6 +2221,7 @@ class pdf_illustration_nasd : public pdf_illustration
// Add all the pages.
add<cover_page>();
add<nasd_basic>();
+ add<nasd_supplemental>();
add<standard_page>("nasd_column_headings");
}
diff --git a/nasd_supplemental.mustache b/nasd_supplemental.mustache
new file mode 100644
index 0000000..8661f10
--- /dev/null
+++ b/nasd_supplemental.mustache
@@ -0,0 +1,8 @@
+{{>nasd_header}}
+
+{{>dollar_units}}
+
+<br></br>
+<br></br>
+
+{{! Supplemental illustration table is created from C++ code }}
- [lmi-commits] [lmi] master d99576a 069/156: Change cover page to use an external template, (continued)
- [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
- [lmi-commits] [lmi] master 7ccd207 087/156: Rename "footer_contents" to more precise "page_number", Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 3a64b87 094/156: Correct misleading comment for page class dtor, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 4e76bba 098/156: Add support for comments to the string interpolation function, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master b5fe850 102/156: Add NASD basic illustration page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 4250de9 104/156: Add first variant of NASD supplemental page,
Greg Chicares <=
- [lmi-commits] [lmi] master 7a1e1e8 025/156: Include the missing <cstring> header, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 8bfb896 109/156: Add NASD illustration first explanatory notes page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master ea20a31 095/156: Make pdf_illustration dtor virtual, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 61fae89 091/156: Reimplement the contract numbers fragment as an external template, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 0c55621 085/156: Replace trivial PDF page classes with single standard_page one, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master ea2564b 099/156: Split the NASD header template in the upper and lower parts, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master c1bf4a8 032/156: Adjust position of the right hand side of the header manually, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 89b4674 120/156: Add automatic support for multiline super-headers, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 0f885a2 116/156: Define CorpNameAbbrev60 and Insured1Abbrev30 in common code, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 08559c3 121/156: Factor out base_suffix() and ir_suffix() functions, Greg Chicares, 2018/01/30