some status checking
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 19 Jul 2005 19:02:52 +0000 (19:02 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 19 Jul 2005 19:02:52 +0000 (19:02 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1286 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/staff_client/chrome/content/evergreen/circ/checkin.js

index ad14beb..8f22d70 100755 (executable)
@@ -54,8 +54,16 @@ function checkin_checkin_items_init(p) {
                        var check = checkin_by_copy_barcode( barcode );
                        if (check) {
                                sdump('D_CHECKIN','check = ' + check + '\n' + pretty_print( js2JSON( check ) ) + '\n');
-                               checkins.push( check );
-                               p.checkin_items.add_checkin_items( [ checkins.length - 1 ] );
+
+                               if (check.status == 0) {
+                                       checkins.push( check );
+                                       p.checkin_items.add_checkin_items( [ checkins.length - 1 ] );
+                               } else if (check.status < 0) {
+                                       s_alert( check.text );
+                               } else if (check.status > 0) {
+                                       s_alert( check.text );
+                               }
+
                                tb.value = ''; tb.focus();
                        }
                } catch(E) {