partial backport of changeset 15315 for %courier_code% transit slip template macro...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 13 Jan 2010 22:16:24 +0000 (22:16 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 13 Jan 2010 22:16:24 +0000 (22:16 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@15317 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/chrome/content/main/constants.js
Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml
Open-ILS/xul/staff_client/server/circ/util.js

index 05bbbac..33f83d3 100644 (file)
 <!ENTITY staff.server.admin.org_settings.ui.circ.show_billing_tab_on_bills.desc "If enabled and a patron has outstanding bills and the alert page is not required, show the billing tab by default, instead of the checkout tab, when a patron is loaded">
 <!ENTITY staff.server.admin.org_settings.ui.circ.patron_display_timeout_interval "GUI: Patron display timeout interval">
 <!ENTITY staff.server.admin.org_settings.ui.circ.patron_display_timeout_interval.desc "Set this if you would like patron displays in the staff client to be closed after a certain interval of inactivity.  Example \'5 minutes\'">
+<!ENTITY staff.server.admin.org_settings.lib.courier_code "Courier Code">
+<!ENTITY staff.server.admin.org_settings.lib.courier_code.desc "Courier Code for the library.  Available in transit slip templates as the &#37;courier_code&#37; macro.">
 
 
 <!ENTITY staff.server.admin.stat_cat.title "Evergreen: Statistical Category Editor">
index aa4f225..e10a3c7 100644 (file)
@@ -122,6 +122,7 @@ const api = {
     'FM_AOU_IDS_RETRIEVE_VIA_RECORD_ID' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.actor.org_unit.retrieve_by_title', 'secure' : false },
     'FM_AOU_IDS_RETRIEVE_VIA_RECORD_ID.authoritative' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.actor.org_unit.retrieve_by_title.authoritative', 'secure' : false },
     'FM_AOUS_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.org_unit_setting.values.ranged.retrieve' },
+    'FM_AOUS_SPECIFIC_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.ou_setting.ancestor_default' },
     'FM_AOUT_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.org_types.retrieve', 'secure' : false },
     'FM_ASC_BATCH_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.stat_cat.asset.retrieve.batch', 'secure' : false },
     'FM_ASC_RETRIEVE_VIA_AOU' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.stat_cat.asset.retrieve.all', 'secure' : false },
index fa528ca..60c6633 100644 (file)
                 'ui.circ.patron_display_timeout_interval' : {
                     label : '&staff.server.admin.org_settings.ui.circ.patron_display_timeout_interval;',
                     desc : '&staff.server.admin.org_settings.ui.circ.patron_display_timeout_interval.desc;',
+                },
+                'lib.courier_code' : {
+                    label : '&staff.server.admin.org_settings.lib.courier_code;',
+                    desc : '&staff.server.admin.org_settings.lib.courier_code.desc;',
                 }
             };
         </script>
index da2c549..dca7717 100644 (file)
@@ -2029,6 +2029,7 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
             'route_to' : '',
             'route_to_msg' : '',
             'route_to_org_fullname' : '',
+            'courier_code' : '',
             'street1' : '',
             'street2' : '',
             'city_state_zip' : '',
@@ -2289,6 +2290,10 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
             print_data.route_to_org = lib;
             print_data.route_to_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.destination', [check.route_to]);
             print_data.route_to_org_fullname = lib.name();
+            var aous_req = network.simple_request('FM_AOUS_SPECIFIC_RETRIEVE',[ lib.id(), 'lib.courier_code', ses() ]);
+            if (aous_req) {
+                print_data.courier_code = aous_req.value || '';
+            }
             msg += print_data.route_to_msg;
             msg += '\n\n';
             msg += lib.name();