From 1b79308f39458952c90a5e72aa71280c068edfcf Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 15 Feb 2006 23:56:14 +0000 Subject: [PATCH] changes to checkin logic git-svn-id: svn://svn.open-ils.org/ILS/trunk@3080 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/circ/util.js | 40 +++++++++---------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 2f1926cd42..6663152a44 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -277,32 +277,45 @@ circ.util.checkin_via_barcode = function(session,barcode,backdate) { if (!check.route_to) check.route_to = '???'; - /* SUCCESS / NO_CHANGE */ - if (check.ilsevent == 0 || check.ilsevent == 3) { + /* SUCCESS / NO_CHANGE / ITEM_NOT_CATALOGED */ + if (check.ilsevent == 0 || check.ilsevent == 3 || check.ilsevent == 1202) { check.route_to = data.hash.acpl[ check.copy.location() ].name(); + var msg = ''; + if (check.ilsevent == 3) msg = 'This item is already checked in.\n'; + if (check.ilsevent == 1202 && check.copy.status() != 11) { + msg = 'FIXME -- ITEM_NOT_CATALOGED event but copy status is ' + + data.hash.ccs[ check.copy.status() ].name() + '\n'; + } switch(check.copy.status()) { case 0: /* AVAILABLE */ case 7: /* RESHELVING */ break; case 8: /* ON HOLDS SHELF */ check.route_to = 'HOLDS SHELF'; + msg += 'This item needs to be routed to ' + check.route_to + '.\n'; var rv = error.yns_alert( - 'This item needs to be routed to ' + check.route_to + '.', + msg, 'Alert', "Print Hold Slip", "Don't Print", null, "Check here to confirm this message" ); + msg = ''; break; case 6: /* IN TRANSIT */ - check.route_to = 'TRANSIT SHELF'; - alert("FIXME -- I didn't think we could get here"); + check.route_to = 'TRANSIT SHELF??'; + msg += ("FIXME -- I didn't think we could get here.\n"); + break; + case 11: /* CATALOGING */ + check.route_to = 'CATALOGING'; break; default: - alert("FIXME -- whaaa??"); + msg += ("FIXME -- this case is unhandled\n"); break; } + msg += 'This item needs to be routed to ' + check.route_to + '.'; + if (msg) error.yns_alert(msg,'Alert',null,'OK',null,"Check here to confirm this message"); } /* ROUTE_ITEM */ @@ -318,21 +331,6 @@ circ.util.checkin_via_barcode = function(session,barcode,backdate) { ); } - /* ITEM_NOT_CATALOGED */ - if (check.ilsevent == 1202) { - check.route_to = 'CATALOGING'; - check.copy.status( 11 ); - error.yns_alert( - 'This item needs to be routed to CATALOGING.', - 'Alert', - null, - 'OK', - null, - "Check here to confirm this message" - ); - - } - /* COPY_NOT_FOUND */ if (check.ilsevent == 1502) { check.copy = new acp(); -- 2.43.2