From bf7cd14e663b4ba2656f32e54ae0e80cf04642e6 Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Wed, 9 Aug 2017 14:30:43 -0400 Subject: [PATCH] LP#1708485 - Add courier code variable to transit slips. This code, developed by Bill Erickson, creates a variable/macro for {{dest_courier_code}} for receipt templates in the web client. Signed-off-by: Chris Sharp Signed-off-by: Terran McCanna Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- Open-ILS/web/js/ui/default/staff/circ/services/circ.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js index 64e5c5e48a..7e7333e633 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js @@ -1426,10 +1426,20 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog, ); } + if (!tmpl.match(/hold_shelf/)) { + var courier_deferred = $q.defer(); + promises.push(courier_deferred.promise); promises.push( service.find_copy_transit(evt, params, options) - .then(function(trans) {data.transit = trans}) + .then(function(trans) { + data.transit = trans; + egCore.org.settings('lib.courier_code', trans.dest().id()) + .then(function(s) { + data.dest_courier_code = s['lib.courier_code']; + courier_deferred.resolve(); + }); + }) ); } -- 2.11.0