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'
);
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 = '';
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();
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) {