From 37bca4ca87f4cd9654b63234f559100869c2ab51 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 31 May 2013 09:51:59 -0400 Subject: [PATCH] LP1182519 Per-Hold Behind Desk Hold Receipt Signed-off-by: Bill Erickson --- Open-ILS/xul/staff_client/server/circ/util.js | 32 +++++++++++---------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index b783ea39cb..46e7ab7281 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -3041,26 +3041,20 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che } else { print_data.route_to_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [check.route_to]); print_data.route_to = check.route_to; - var behind_the_desk_support = String( data.hash.aous['circ.holds.behind_desk_pickup_supported'] ) == 'true'; - if (behind_the_desk_support) { - var usr_settings = network.simple_request('FM_AUS_RETRIEVE',[ses(),check.payload.hold.usr()]); - if (typeof usr_settings['circ.holds_behind_desk'] != 'undefined') { - if (usr_settings['circ.holds_behind_desk']) { - print_data.prefer_behind_holds_desk = true; - check.route_to = document.getElementById('circStrings').getString('staff.circ.route_to.private_hold_shelf'); - print_data.route_to_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [check.route_to]); - print_data.route_to = check.route_to; - } else { - check.route_to = document.getElementById('circStrings').getString('staff.circ.route_to.public_hold_shelf'); - print_data.route_to_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [check.route_to]); - print_data.route_to = check.route_to; - } - } else { - check.route_to = document.getElementById('circStrings').getString('staff.circ.route_to.public_hold_shelf'); - print_data.route_to_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [check.route_to]); - print_data.route_to = check.route_to; - } + + // If the hold is marked as behind-shelf, report it as such + // in the receipt, regardless of any org or user settings. + if (isTrue(check.payload.hold.behind_desk())) { + print_data.prefer_behind_holds_desk = true; + check.route_to = document.getElementById('circStrings').getString('staff.circ.route_to.private_hold_shelf'); + print_data.route_to_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [check.route_to]); + print_data.route_to = check.route_to; + } else { + check.route_to = document.getElementById('circStrings').getString('staff.circ.route_to.public_hold_shelf'); + print_data.route_to_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [check.route_to]); + print_data.route_to = check.route_to; } + print_data.destination_shelf_msg = print_data.route_to_msg; print_data.destination_shelf = print_data.route_to; msg += print_data.route_to_msg; -- 2.11.0