From 4e67940f68b4545e679550bfdc0b20064646fc34 Mon Sep 17 00:00:00 2001 From: phasefx Date: Fri, 17 Feb 2006 21:57:43 +0000 Subject: [PATCH] some of the last minutes changes before the last circ meeting git-svn-id: svn://svn.open-ils.org/ILS/trunk@3107 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../xul/staff_client/server/circ/checkout.js | 19 +++++++++++++++++++ Open-ILS/xul/staff_client/server/circ/util.js | 12 ++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/circ/checkout.js b/Open-ILS/xul/staff_client/server/circ/checkout.js index 9c45c2dbc8..bf054857c0 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkout.js +++ b/Open-ILS/xul/staff_client/server/circ/checkout.js @@ -16,6 +16,7 @@ circ.checkout.prototype = { obj.session = params['session']; obj.patron_id = params['patron_id']; + obj.patron = obj.network.simple_request('FM_AU_RETRIEVE_VIA_ID',[obj.session,obj.patron_id]); JSAN.use('circ.util'); var columns = circ.util.columns( @@ -106,6 +107,24 @@ circ.checkout.prototype = { 'cmd_checkout_print' : [ ['command'], function() { + try { + var params = { + 'patron' : obj.patron, + 'lib' : obj.data.hash.aou[ this.data.list.au[0].home_ou() ], + 'staff' : obj.data.list.au[0], + 'header' : obj.data.print_list_templates.checkout.header, + 'line_item' : obj.data.print_list_templates.checkout.line_item, + 'footer' : obj.data.print_list_templates.checkout.footer, + 'type' : 'items', + 'list' : obj.list.dump(), + }; + JSAN.use('util.print'); var print = new util.print(); + print.tree_list( params ); + } catch(E) { + this.error.sdump('D_ERROR','preview: ' + E); + alert('preview: ' + E); + } + } ], 'cmd_checkout_reprint' : [ diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index eb51ae2749..890f4f3cd0 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -291,10 +291,14 @@ circ.util.checkin_via_barcode = function(session,barcode,backdate) { break; case 8: /* ON HOLDS SHELF */ check.route_to = 'HOLDS SHELF'; - if (check.payload.hold.pickup_lib() != data.list.au[0].home_ou()) { - msg += 'FIXME: We should have received a ROUTE_ITEM\n'; - } else { - msg += 'This item needs to be routed to ' + check.route_to + '.\n'; + if (check.payload.hold) { + if (check.payload.hold.pickup_lib() != data.list.au[0].home_ou()) { + msg += 'FIXME: We should have received a ROUTE_ITEM\n'; + } else { + msg += 'This item needs to be routed to ' + check.route_to + '.\n'; + } + } else { + msg += 'FIXME: status of Holds Shelf, but no hold in payload'; } if (check.payload.hold) { JSAN.use('patron.util'); -- 2.43.2