[open-ils-commits] r18220 - trunk/Open-ILS/xul/staff_client/server/circ (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Oct 7 11:14:53 EDT 2010


Author: phasefx
Date: 2010-10-07 11:14:50 -0400 (Thu, 07 Oct 2010)
New Revision: 18220

Modified:
   trunk/Open-ILS/xul/staff_client/server/circ/util.js
Log:
destination_shelf macro for hold and hold/transit slips.  Will contain either HOLD SHELF, PUBLIC HOLD SHELF, or PRIVATE HOLD SHELF (these are localizable).  The latter two depend on the org unit setting 'circ.holds.behind_desk_pickup_supported' being in effect, and also considers a user setting for the holds user at the time of printing.


Modified: trunk/Open-ILS/xul/staff_client/server/circ/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/util.js	2010-10-07 14:56:43 UTC (rev 18219)
+++ trunk/Open-ILS/xul/staff_client/server/circ/util.js	2010-10-07 15:14:50 UTC (rev 18220)
@@ -2418,6 +2418,8 @@
             'route_to' : '',
             'route_to_msg' : '',
             'route_to_org_fullname' : '',
+            'destination_shelf' : '',
+            'destination_shelf_msg' : '',
             'courier_code' : '',
             'street1' : '',
             'street2' : '',
@@ -2525,6 +2527,8 @@
                                     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;
                             msg += '\n';
                         }
@@ -2979,6 +2983,23 @@
                 print_data.request_date_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.request_date', [print_data.request_date]);
                 msg += print_data.request_date_msg;
                 msg += '\n';
+                var destination_shelf = document.getElementById('circStrings').getString('staff.circ.route_to.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;
+                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') {
+                        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;
+                    }
+                }
             }
             var rv = 0;
             var suppress_popups = data.hash.aous['ui.circ.suppress_checkin_popups'];



More information about the open-ils-commits mailing list