From: Bill Erickson Date: Tue, 9 Jul 2013 15:46:30 +0000 (-0400) Subject: PINES Long-Overdue transit message X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Flong-overdue-gpls-transit;p=evergreen%2Fequinox.git 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 --- 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; } }