lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Group quotes: footer formatting


From: Greg Chicares
Subject: [lmi] Group quotes: footer formatting
Date: Wed, 30 Sep 2015 16:49:45 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

[Vadim--sorry to send you an extra copy, but the mailing list has been
delivering messages only after a great delay.]

I'm trying to hard-code some html markup in the footer. Here's my initial
code change in 'group_quote_pdf_gen_wx.cpp':

-    footer_           = ledger.MarketingNameFootnote;
+    footer_           =
+                   ledger.GroupQuoteShortProductName
+        + "<br>" + ledger.GroupQuoteIsNotAnOffer
+        + "<br>" + ledger.GroupQuoteRidersAvailable
+        + "<br>" + ledger.GroupQuotePolicyFormId
+        + "<br>" + ledger.GroupQuoteStateVariations
+        + "<br>" + ledger.MarketingNameFootnote
+        // Use boldface for this one only:
+        + "<br><bold>" + ledger.GroupQuoteProspectus + "</bold>"
+        + "<br>" + ledger.GroupQuoteUnderwriter
+        + "<br>" + ledger.GroupQuoteBrokerDealer
+        ;

That won't work for you yet because the 'ledger.GroupQuote*' entities
exist only in my local tree for now, but you can see what I was hoping
to accomplish. What I get is one wrapped line in the PDF output:

Marketed as 'UL Supreme'.<br>UL SUPREME<br>This is not an offer of 
insurance.<br>ADB, WP<br>Policy form UL32768-NY is a flexible premium 
contract.<br>Not available in all states.<br>Marketed as 'UL
Supreme'.<br><bold>Read the prospectus carefully.</bold><br>Securities 
underwritten by Superior Securities.<br>Securities offered through Superior 
Brokerage.

We could do that in group_quote_pdf_generator_wx::output_footer(),
to which we would then need to pass a 'ledger' argument. Or is it
cleaner to replace the patch above as follows?

-    footer_           = ledger.MarketingNameFootnote;
+    footer_           =
+                   escape_for_html_elem(ledger.GroupQuoteShortProductName)
+        + "<br>" + escape_for_html_elem(ledger.GroupQuoteIsNotAnOffer)
+        + "<br>" + escape_for_html_elem(ledger.GroupQuoteRidersAvailable)
+        + "<br>" + escape_for_html_elem(ledger.GroupQuotePolicyFormId)
+        + "<br>" + escape_for_html_elem(ledger.GroupQuoteStateVariations)
+        + "<br>" + escape_for_html_elem(ledger.MarketingNameFootnote)
+        // Use boldface for this one only:
+        + "<br><bold>" + escape_for_html_elem(ledger.GroupQuoteProspectus) + 
"</bold>"
+        + "<br>" + escape_for_html_elem(ledger.GroupQuoteUnderwriter)
+        + "<br>" + escape_for_html_elem(ledger.GroupQuoteBrokerDealer)
+        ;

-    wxString const footer_html = "<p>" + 
escape_for_html_elem(report_data_.footer_) + "</p>";
+    wxString const footer_html = "<p>" + report_data_.footer_ + "</p>";

which has the definite advantage of (almost) doing the right thing?
It prints:

UL SUPREME
This is not an offer of insurance.
Available riders: ADB, WP .
Policy form UL32768-NY is a flexible premium contract.
Not available in all states.
Marketed as 'UL Supreme'.
Read the prospectus carefully.
Securities underwritten by Superior Securities.
Securities offered through Superior Brokerage.

which is almost right. I suppose I should 's/<br>/<br><br>/' in order to get
spaces between lines. The "prospectus" line isn't in boldface; with wxHTML
am I supposed to use <em> instead of <bold>? The first line "UL SUPREME"
doesn't belong here--instead, it's supposed to be used here in place of
"report_data_.company_":
    // FIXME Specification change: use product description here, not company_.
    wxString const image_text
        (report_data_.company_
         + "\nPremium & Benefit Summary"
        );
And the third line "ADB, WP" doesn't belong here--instead, it's supposed to
be used here in place of the character-string constant:
    available_riders_ = "Waiver, ADB, ABR, Spouse or Child"; // FIXME
but I need to go back and modify the product files again, because now I
realize that we need two different "available riders" strings: a short
one for the "Summary" header, and a verbose one for the footer.

How do we work this so that we don't step on each other's proverbial toes?
Do you want me to clean this up myself (with any improvements you might
suggest) and commit it after I've added these extra fields to the product
data files (which I will have done by the end of the week)? I don't feel
right dumping such a rough patch on you and walking away--but if you'd
really rather rewrite it yourself, then of course that's fine with me.



reply via email to

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