some fixes
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Jul 2005 20:36:22 +0000 (20:36 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Jul 2005 20:36:22 +0000 (20:36 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1508 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/staff_client/chrome/content/evergreen/circ/circ_utils.js
Evergreen/staff_client/chrome/content/evergreen/circ/hold_capture.js
Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.js

index ce45d1a..c959444 100644 (file)
@@ -150,7 +150,7 @@ function checkin_by_copy_barcode(barcode, backdate, f) {
                                                                        sPrint(check.text + '<br />\r\n' + 'Barcode: ' + barcode + '  Title: ' + 
                                                                                check.record.title() + '  Author: ' + check.record.author() + 
                                                                                '<br />\r\n' + 'Route To: ' + check.route_to + '  Patron: ' + 
-                                                                               patron.barcode() + ' ' + patron.family_name() + ', ' + 
+                                                                               patron.card().barcode() + ' ' + patron.family_name() + ', ' + 
                                                                                patron.first_given_name() + '<br />\r\n'
                                                                        );
 
index faa0db0..b5eca1e 100755 (executable)
@@ -66,7 +66,7 @@ function hold_capture_hold_capture_items_init(p) {
                                sPrint(check.text + '<br />\r\n' + 'Barcode: ' + barcode + '  Title: ' + check.record.title() + 
                                        '  Author: ' + check.record.author() + '<br />\r\n' +
                                        'Route To: ' + check.route_to + 
-                                       '  Patron: ' + patron.barcode() + ' ' + patron.family_name() + ', ' + patron.first_given_name() + 
+                                       '  Patron: ' + patron.card().barcode() + ' ' + patron.family_name() + ', ' + patron.first_given_name() + 
                                        '<br />\r\n'
                                );
                                tb.value = ''; 
index 1c6e07b..d7b1981 100755 (executable)
@@ -215,14 +215,8 @@ function patron_display_patron_items_init(p) {
                                                        var idx = patron_items[i].getAttribute('record_id'); 
                                                        var copy = p._patron.checkouts()[ idx ].copy;
                                                        var check = checkin_by_copy_barcode( copy.barcode(), null );
-                                                       if (check != null) {
-                                                               if (parseInt(check.route_to)) {
-                                                                       try {
-                                                                               check.route_to = mw.G.org_tree_hash[check.route_to].shortname();
-                                                                       } catch(E) {
-                                                                               sdump('D_ERROR',js2JSON(E) + '\n');
-                                                                       }
-                                                               }
+                                                       if (check != null && check.status == 0) {
+                                                               check.route_to = mw.G.org_tree_hash[check.route_to].shortname();
                                                                alert('Check In: ' + check.text + '  Route To: ' + check.route_to);
                                                        }
                                                        p.refresh();
@@ -415,17 +409,11 @@ function patron_display_patron_checkout_items_init(p) {
                                                        var check = checkin_by_copy_barcode( copy.barcode(), null );
                                                        if (check == null) { // change this to whatever it takes
                                                                keep_these.push( checkouts[ idx ] );    
-                                                       } else {
-                                                               if (parseInt(check.route_to)) {
-                                                                       try {
-                                                                               check.route_to = mw.G.org_tree_hash[check.route_to].shortname();
-                                                                       } catch(E) {
-                                                                               sdump('D_ERROR',js2JSON(E) + '\n');
-                                                                       }
-                                                               }
+                                                       }
+                                                       if (check != null && check.status == 0) {
+                                                               check.route_to = mw.G.org_tree_hash[check.route_to].shortname();
                                                                alert('Check In: ' + check.text + '  Route To: ' + check.route_to);
                                                        }
-
                                                        checkouts = keep_these;
                                                        p.refresh();
                                                } catch(E) {