if ($patron_id =~ /^[A-Z].*/i) {
syslog("LOG_WARNING", "Trying lowercased/transformed value for barcode: $patron_id");
my $bc = lc($patron_id);
- if (length($bc) == 25) {
+ my $bclen = length($bc);
+ if ($bclen == 25 || $bclen == 27) {
$bc = substr($bc, 0, 13);
- } elsif (length($bc) == 23) {
+ } elsif ($bclen == 23) {
$bc = substr($bc, 0, 12);
}
$card = $e->search_actor_card([{barcode => $bc, active => 't'}, $usr_flesh])->[0];
barcode = String( barcode ).replace( /\s+/g, '' );
if (!barcode) { sound.bad(); add_msg($("patronStrings").getString('staff.patron.barcode_entry.no_barcode')); tb.select(); tb.focus(); return; }
- // MIEG: Michigan ID voodo
- if (barcode.length == 25) { var bcode = barcode.substring(0,13); barcode = bcode.toLowerCase(); }
+
+ if (barcode.length == 27 || barcode.length == 25) {
+ var bcode = barcode.substring(0,13); barcode = bcode.toLowerCase();
+ }
if (barcode.length == 23) { var bcode = barcode.substring(0,11); barcode = bcode.toLowerCase(); }
JSAN.use('util.network'); var net = new util.network();