better event handling
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 1 Aug 2006 04:24:14 +0000 (04:24 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 1 Aug 2006 04:24:14 +0000 (04:24 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5213 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/checkin.js

index 45b93b9..31ff056 100644 (file)
@@ -239,14 +239,15 @@ circ.checkin.prototype = {
                        var checkin = circ.util.checkin_via_barcode(
                                ses(), barcode, backdate, auto_print
                        );
-                       if (!checkin) return; /* circ.util.checkin handles errors and returns null currently */
+                       if (!checkin) return obj.on_failure(); /* circ.util.checkin handles errors and returns null currently */
                        if (checkin.ilsevent == 7010 /* COPY_ALERT_MESSAGE */
                                || checkin.ilsevent == 1203 /* COPY_BAD_STATUS */
                                || checkin.ilsevent == -1 /* offline */
                                || checkin.ilsevent == 1502 /* ASSET_COPY_NOT_FOUND */
                                || checkin.ilsevent == 1203 /* COPY_BAD_STATUS */
+                               || checkin.ilsevent == 7009 /* CIRC_CLAIMS_RETURNED */ 
                                || checkin.ilsevent == 7011 /* COPY_STATUS_LOST */ 
-                               || checkin.ilsevent == 7012 /* COPY_STATUS_MISSING */) return;
+                               || checkin.ilsevent == 7012 /* COPY_STATUS_MISSING */) return obj.on_failure();
                        var retrieve_id = js2JSON( { 'copy_id' : checkin.copy.id(), 'barcode' : checkin.copy.barcode(), 'doc_id' : (typeof checkin.record != 'undefined' ? ( typeof checkin.record.ilsevent == 'undefined' ? checkin.record.doc_id() : null ) : null ) } );
                        obj.list.append(
                                {