From 4572e08f74cecff45fb475f0240c0db1e46ececb Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 15 Feb 2006 23:04:11 +0000 Subject: [PATCH] checkin logic git-svn-id: svn://svn.open-ils.org/ILS/trunk@3079 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/circ/util.js | 71 +++++++------------ 1 file changed, 27 insertions(+), 44 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 9fe3b889b2..2f1926cd42 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -277,9 +277,32 @@ circ.util.checkin_via_barcode = function(session,barcode,backdate) { if (!check.route_to) check.route_to = '???'; - /* SUCCESS */ - if (check.ilsevent == 0) { + /* SUCCESS / NO_CHANGE */ + if (check.ilsevent == 0 || check.ilsevent == 3) { check.route_to = data.hash.acpl[ check.copy.location() ].name(); + switch(check.copy.status()) { + case 0: /* AVAILABLE */ + case 7: /* RESHELVING */ + break; + case 8: /* ON HOLDS SHELF */ + check.route_to = 'HOLDS SHELF'; + var rv = error.yns_alert( + 'This item needs to be routed to ' + check.route_to + '.', + 'Alert', + "Print Hold Slip", + "Don't Print", + null, + "Check here to confirm this message" + ); + break; + case 6: /* IN TRANSIT */ + check.route_to = 'TRANSIT SHELF'; + alert("FIXME -- I didn't think we could get here"); + break; + default: + alert("FIXME -- whaaa??"); + break; + } } /* ROUTE_ITEM */ @@ -288,53 +311,13 @@ circ.util.checkin_via_barcode = function(session,barcode,backdate) { var rv = error.yns_alert( 'This item is in transit to ' + check.route_to + '.', 'Alert', - null, - "OK", + "Print Transit Slip", + "Don't Print", null, "Check here to confirm this message" ); } - /* CIRCULATION_NOT_FOUND */ - if (check.ilsevent == 1500) { - if ( check.copy.circ_lib() == data.list.au[0].home_ou() ) { - if ( check.copy.dummy_title() ) { - 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" - ); - } else { - check.route_to = data.hash.acpl[ check.copy.location() ].name(); - /* FIXME -- Do we want a dialog for this case? */ - } - } else { - check.route_to = data.hash.aou[ check.copy.circ_lib() ].shortname(); - var rv = error.yns_alert( - 'There is no circulation for this item, however, its circulating library is ' + check.route_to - + '.\nTransit this item?', - 'Alert', - "Transit", - "Don't Transit", - null, - "Check here to confirm this message" - ); - switch(rv) { - case 0: /* transit */ - alert('FIXME -- make transit call here'); - break; - case 1: /* don't transit */ - check.route_to += ' ?'; - break; - } - } - } - /* ITEM_NOT_CATALOGED */ if (check.ilsevent == 1202) { check.route_to = 'CATALOGING'; -- 2.43.2