'line_item' : '<li>%title%<br/>\r\nBarcode: %barcode% Call Number: %call_number%\r\n',
'footer' : '</ol><hr />%PINES_CODE% %TODAY_TRIM%<br/>\r\n<br/>\r\n',
},
- 'bills' : {
+ 'bills_historical' : {
'type' : 'bills',
- 'header' : 'You have or had the following bills:<hr/><ol>',
- 'line_item' : '<li>test\r\n',
+ 'header' : 'Welcome %PATRON_FIRSTNAME%, to %LIBRARY%!<br/>You had the following bills:<hr/><ol>',
+ 'line_item' : '<dt><b>Bill #%id%</b></dt> <dd> <table> <tr valign="top"><td>Date:</td><td>%xact_start%</td></tr> <tr valign="top"><td>Type:</td><td>%xact_type%</td></tr> <tr valign="top"><td>Last Billing:</td><td>%last_billing_type%<br/>%last_billing_note%</td></tr> <tr valign="top"><td>Total Billed:</td><td>$%total_owed%</td></tr> <tr valign="top"><td>Last Payment:</td><td>%last_payment_type%<br/>%last_payment_note%</td></tr> <tr valign="top"><td>Total Paid:</td><td>$%total_paid%</td></tr> <tr valign="top"><td><b>Balance:</b></td><td><b>$%balance_owed%</b></td></tr> </table><br/>',
+ 'footer' : '</ol><hr />%PINES_CODE% %TODAY_TRIM%<br/>\r\n<br/>\r\n',
+ },
+ 'bills_current' : {
+ 'type' : 'bills',
+ 'header' : 'Welcome %PATRON_FIRSTNAME%, to %LIBRARY%!<br/>You have the following bills:<hr/><ol>',
+ 'line_item' : '<dt><b>Bill #%id%</b></dt> <dd> <table> <tr valign="top"><td>Date:</td><td>%xact_start%</td></tr> <tr valign="top"><td>Type:</td><td>%xact_type%</td></tr> <tr valign="top"><td>Last Billing:</td><td>%last_billing_type%<br/>%last_billing_note%</td></tr> <tr valign="top"><td>Total Billed:</td><td>$%total_owed%</td></tr> <tr valign="top"><td>Last Payment:</td><td>%last_payment_type%<br/>%last_payment_note%</td></tr> <tr valign="top"><td>Total Paid:</td><td>$%total_paid%</td></tr> <tr valign="top"><td><b>Balance:</b></td><td><b>$%balance_owed%</b></td></tr> </table><br/>',
'footer' : '</ol><hr />%PINES_CODE% %TODAY_TRIM%<br/>\r\n<br/>\r\n',
},
'offline_checkin' : {
}
function print_bills() {
- dump(js2JSON(g.bill_list.dump()) + '\n');
try {
+ var template = 'bills_historical'; if (g.cgi.param('current')) template = 'bills_current';
JSAN.use('patron.util');
var params = {
'patron' : patron.util.retrieve_au_via_id(ses(),g.patron_id),
'lib' : g.data.hash.aou[ g.data.list.au[0].ws_ou() ],
'staff' : g.data.list.au[0],
- 'header' : g.data.print_list_templates.bills.header,
- 'line_item' : g.data.print_list_templates.bills.line_item,
- 'footer' : g.data.print_list_templates.bills.footer,
- 'type' : g.data.print_list_templates.bills.type,
+ 'header' : g.data.print_list_templates[template].header,
+ 'line_item' : g.data.print_list_templates[template].line_item,
+ 'footer' : g.data.print_list_templates[template].footer,
+ 'type' : g.data.print_list_templates[template].type,
'list' : g.bill_list.dump(),
};
JSAN.use('util.print'); var print = new util.print();