[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 1272ce2 127/156: Don't include "Assumptions"
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 1272ce2 127/156: Don't include "Assumptions" page in composite NASD illustrations |
Date: |
Tue, 30 Jan 2018 17:22:30 -0500 (EST) |
branch: master
commit 1272ce2e4a0232d8c7e36ccf277025d05269be20
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>
Don't include "Assumptions" page in composite NASD illustrations
This page isn't useful for composites, so don't show it at all.
This allows to simplify nasd_assumption_detail class implementation and
remove the columns which were only shown for composite ledgers, as they
wouldn't be ever shown at all anyhow now.
---
ledger_pdf_generator_wx.cpp | 41 +++++++----------------------------------
1 file changed, 7 insertions(+), 34 deletions(-)
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index 0d172cf..6c9e460 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -2279,8 +2279,6 @@ class nasd_assumption_detail : public
page_with_tabular_report
private:
enum
{column_policy_year
- ,column_withdrawal
- ,column_loan
,column_end_of_year_age
,column_sep_acct_crediting_rate
,column_gen_acct_crediting_rate
@@ -2300,8 +2298,6 @@ class nasd_assumption_detail : public
page_with_tabular_report
{
static illustration_table_columns const columns =
{{ "PolicyYear" , "Policy\nYear" ,
"999" }
- ,{ "NetWD" , "Withdrawal" ,
"999,999" }
- ,{ "NewCashLoan" , "Loan" ,
"999,999" }
,{ "AttainedAge" , "End of\nYear Age" ,
"999" }
,{ "AnnSAIntRate_Current", "Sep Acct Net\nInv Rate" ,
"99.99%" }
,{ "AnnGAIntRate_Current", "Gen Acct\nCurrent Rate" ,
"99.99%" }
@@ -2314,35 +2310,9 @@ class nasd_assumption_detail : public
page_with_tabular_report
return columns;
}
- bool should_show_column(Ledger const& ledger, int column) const override
- {
- // This table looks very differently for individual and composite
- // illustrations.
- switch(column)
- {
- case column_withdrawal:
- case column_loan:
- // Shown only for composite illustrations.
- return ledger.is_composite();
-
- case column_end_of_year_age:
- case column_sep_acct_crediting_rate:
- case column_gen_acct_crediting_rate:
- case column_m_and_e:
- case column_ee_payment_mode:
- case column_er_payment_mode:
- case column_assumed_loan_interest:
- // Shown only for individual ones.
- return !ledger.is_composite();
-
- case column_policy_year:
- case column_max:
- // Always shown.
- break;
- }
-
- return true;
- }
+ // Notice that there is no need to override should_show_column() in this
+ // class as this page is not included in composite illustrations and hence
+ // all of its columns, including the "AttainedAge" one, are always shown.
};
// NASD illustration.
@@ -2393,7 +2363,10 @@ class pdf_illustration_nasd : public pdf_illustration
add<standard_page>("nasd_column_headings");
add<standard_page>("nasd_notes1");
add<standard_page>("nasd_notes2");
- add<nasd_assumption_detail>();
+ if(!ledger.is_composite())
+ {
+ add<nasd_assumption_detail>();
+ }
}
std::string get_upper_footer_template_name() const override
- [lmi-commits] [lmi] master 38cab5e 096/156: Make footer template depend on illustration kind, (continued)
- [lmi-commits] [lmi] master 38cab5e 096/156: Make footer template depend on illustration kind, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master d1204c2 111/156: Factor out common parts of render_or_measure_fixed_page_part(), Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master e388f6e 037/156: Add beginning of numeric summary page using an external template, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 531699b 115/156: Factor out common page_with_basic_tabular_report class, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master a85943b 124/156: Add the rest of individual private placement illustration pages, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master f0b9cea 113/156: Add "Assumption Detail" page to NASD illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 031070b 132/156: Implement supplemental report page for the regular illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 9fe1d07 125/156: Implement page-specific footer for "Tabular Details" pages, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 4f3a02e 078/156: Add company logo to the cover page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 2d93248 118/156: Add the rest of group private placement illustration pages, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 1272ce2 127/156: Don't include "Assumptions" page in composite NASD illustrations,
Greg Chicares <=
- [lmi-commits] [lmi] master e00ab7d 080/156: Hide "attained age" column for composite illustrations, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 29e63d6 117/156: Add basic illustration page of group placement illustration, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 1a9bfb3 137/156: Factor out standard_supplemental_report class, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 7c0ff88 145/156: Add copyright notices to all .mst template files, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 2fd6a11 147/156: Use shorter and more consistent names for external templates, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master b09a25f 026/156: Implement numbering pages in the PDF output, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master bb75971 033/156: Implement the second part of the narrative summary page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 964db82 067/156: Rename columns_headings_page to column_headings_page, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 2a94469 074/156: Use Mustache template files from the data directory, Greg Chicares, 2018/01/30
- [lmi-commits] [lmi] master 01be23a 103/156: Automatically squeeze table columns to make them fit if necessary, Greg Chicares, 2018/01/30