fix logic error where we were just testing for the presence of a user setting instead...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 8 Oct 2010 17:38:24 +0000 (17:38 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 8 Oct 2010 17:38:24 +0000 (17:38 +0000)
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

index d0d5ad3..2f63c4f 100644 (file)
@@ -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]);