if an inactive card was used to retrieve the patron via the "F1" interface.
This is the stock behavior outside of this branch, but was obscurred due to
https://bugs.launchpad.net/evergreen/+bug/
1154235
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
}
switch(main_interface) {
case 'checkout':
- cw.xulG.check_stop_checkouts = function() { return false; };
+ cw.xulG.check_stop_checkouts = function() {
+ try {
+ var p_obj = patron.util.retrieve_fleshed_au_via_id(
+ ses(),
+ patron_id,
+ ["cards"]
+ );
+ var cards = p_obj.cards();
+ var barcodes = util.functional.map_list(
+ p_obj.cards(),
+ function (c) {
+ return c.barcode();
+ }
+ );
+ var idx = barcodes.indexOf( barcode_for_some_interfaces );
+ if (idx == -1) {
+ return false;
+ } else {
+ return ! get_bool( cards[idx].active() );
+ }
+ } catch(E) {
+ alert(E);
+ return false;
+ }
+ };
break;
case 'items_out':
break;