);
payments_tally_selected();
$('payments_details').disabled = g.payments_list_selection.length == 0;
+ $('print_selected').disabled = g.payments_list_selection.length == 0;
$('copy_details_from_payments').disabled = g.payments_list_selection.length == 0;
},
'retrieve_row' : function(params) {
gen_handle_details('payments'),
false
);
+
+ window.bill_history_event_listeners.add($('print_selected'),
+ 'command',
+ gen_handle_details('payments'),
+ false
+ );
window.bill_history_event_listeners.add($('copy_details'),
'command',
}
}
+function print_bills_from_history()
+{
+ try
+ {
+ var Selected_Line_Item = g.payments_list.dump_selected_with_keys(0);
+
+ var params =
+ {
+ 'list': Selected_Line_Item,
+ 'patron' : patron.util.retrieve_fleshed_au_via_id(ses(),g.patron_id),
+ 'printer_context' : 'receipt',
+ 'template' : 'bill_payment_basic'
+ };
+
+ g.payments_list.print(params);
+ }
+ catch(E)
+ {
+ alert("Caught Exception! Details: " + E.toSource());
+ }
+}
+
function payment_history_init() {
try {
if (payment_history_fetched) { return; } else { payment_history_fetched = true; }
<hbox>
<hbox id="payments_list_actions" />
<spacer flex="1"/>
+ <button id="print_selected" label="&staff.patron.bill_history.print.label;" accesskey="&staff.patron.bill_history.print.accesskey;" hidden="false" oncommand="print_bills_from_history();"/>
<button id="copy_details_from_payments" disabled="true" label="&staff.patron.items_overlay.sel_copy_details.label;" accesskey="&staff.patron.items_overlay.sel_copy_details.accesskey;" />
<button id="payments_details" label="&staff.patron.bill_history.full_details.label;" disabled="true" accesskey="&staff.patron.bill_history.full_details.accesskey;"/>
</hbox>
"inherit": null,\r
"context": "receipt"\r
},\r
+ "bill_payment_basic":\r
+ {\r
+ "type": "payment",\r
+ "header": "Welcome to %LIBRARY%, %PATRON_FIRSTNAME%!<br/>A receipt of your transaction:<hr/> <p><blockquote>",\r
+ "line_item": "Invoice: %mp_id% <br/>Title: %payments_blob_title%<br/>Status: %payments_blob_last_billing_type%<br/>Received: %mp_amount%<br />Payment Type: %mp_payment_type%<br />Timestamp: %mp_payment_ts%<br /><br/>",\r
+ "footer": "</blockquote> </p> <hr />%SHORTNAME% %TODAY_TRIM%<br/> <br/> ",\r
+ "inherit": null,\r
+ "context": "receipt"\r
+ },\r
"bills_historical": {\r
"type": "bills",\r
"header": "Welcome to %LIBRARY%!<br/>You had the following bills:<hr/>\n<script>var rectest = 0</script>\n",\r