From f93cc0aef2cdc93e222345bea56d2a50b242fb39 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 9 Jul 2013 11:46:30 -0400 Subject: [PATCH] PINES Long-Overdue transit message Before printing any transit slips for long-overdue items, insert the PINES long-overdue transit warning/message. Since transit slips come from stock templates OR the local file system (regardless of local modifications), this is the only method for guaranteeing the message is included in all transit slips. Signed-off-by: Bill Erickson --- Open-ILS/xul/staff_client/server/circ/util.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 36c168ed0f..d687059318 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -3675,6 +3675,29 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che 'data' : print_data, 'context' : data.print_list_templates[ template ].context, }; + + /* PINES-specific long-overdue transit_slip handling. + * This forces the long-overdue message into all + * transit slips for long-overdue items, regardless + * of any local modifications. + * ------------------------------------------------*/ + if (template == 'transit_slip' && + check.payload.transit && + check.payload.transit.copy_status() == 16) { + // 16 == long-overdue + + // remove the trailing
\r\n + parms.header = parms.header.substring( + 0, parms.header.length - 7); + + // add the LO language and recover
, etc. + parms.header += + 'This item is in status Longoverdue, ' + + 'additional staff action may be required.' + + '
\r\n
\r\n'; + } + /* ------------------------------------------------*/ + if ($('printer_prompt')) { if (! $('printer_prompt').checked) { parms.no_prompt = true; } } -- 2.11.0