From 3c43516c55b2a7b358c24e4392c7a8386a5acecd Mon Sep 17 00:00:00 2001 From: phasefx Date: Fri, 8 Oct 2010 17:38:24 +0000 Subject: [PATCH] fix logic error where we were just testing for the presence of a user setting instead of its value git-svn-id: svn://svn.open-ils.org/ILS/trunk@18247 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/circ/util.js | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index d0d5ad3d12..2f63c4fc43 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -2517,10 +2517,16 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che 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') { - 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; + if (user_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]); @@ -2990,10 +2996,16 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che 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') { - print_data.prefer_behind_holds_desk = true; - destination_shelf = document.getElementById('circStrings').getString('staff.circ.route_to.private_hold_shelf'); - print_data.destination_shelf_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [destination_shelf]); - print_data.destination_shelf = destination_shelf; + if (usr_settings['circ.holds_behind_desk']) { + print_data.prefer_behind_holds_desk = true; + destination_shelf = document.getElementById('circStrings').getString('staff.circ.route_to.private_hold_shelf'); + print_data.destination_shelf_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [destination_shelf]); + print_data.destination_shelf = destination_shelf; + } else { + destination_shelf = document.getElementById('circStrings').getString('staff.circ.route_to.public_hold_shelf'); + print_data.destination_shelf_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [destination_shelf]); + print_data.destination_shelf = destination_shelf; + } } else { destination_shelf = document.getElementById('circStrings').getString('staff.circ.route_to.public_hold_shelf'); print_data.destination_shelf_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [destination_shelf]); -- 2.43.2