lmi
[Top][All Lists]
Advanced

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

[lmi] Group premium quotes


From: Greg Chicares
Subject: [lmi] Group premium quotes
Date: Wed, 17 Jun 2015 15:24:52 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

Brief summary of off-list discussions: we plan to add a new facility to produce
group premium quotes. Input is an lmi '.cns' file. Output is a PDF file written
to disk wherever configurable_settings::print_directory() specifies; file name
is name of '.cns' file, transformed in some simple way like
  $echo foo.cns | sed -e 's/\(^.*\)\.cns/\1_quote.pdf/'
  foo_quote.pdf
We plan to use wxPdfDoc:
  https://github.com/utelle/wxpdfdoc/
which seems to be stable, suitable for our needs, and convenient to use with wx.

Output shows one person per line, with various premium details. I had initially
hoped to get these details from lmi's "group roster", but that doesn't have
enough detail, so I think I'll need to write separate code for this--with its
own distinct menu item on the "Census" menu, redirecting the "group roster"
toolbar button to this new command instead. Headers and footers will be given
the same way product_data::MarketingNameFootnote (e.g.) is used for XSL-FO
output today, so that they can vary by product; probably some new members will
need to be added.

Right now, the main question from my POV at least is how to pass data from lmi
to the code that write the PDF file.

 - I could pass a struct. Then the code will look like different parts were
   written by different people. That is actually the case: I'll do the premium
   calculations and Vadim has will handle the PDF generation. But ideally code
   shouldn't reflect the structure of the organization that produced it; and
   we don't want one more layer than necessary.

 - The PDF code could call back into lmi for each datum where it's needed.
   That would probably work well for footnotes:
     product_data const& p = [whatever];
     std::string const marketing_name_footnote = 
p.datum("MarketingNameFootnote");
     [then use that string in the PDF code]
   But it might not work so well for premiums. We certainly want to keep the
   premium-calculation details encapsulated, as the PDF code has no need to
   see how those calculations are performed. Maybe we need to create a
   quote_premiums object and pass that to the PDF code.



reply via email to

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