From: Doug Kyle Date: Fri, 14 Oct 2011 20:57:32 +0000 (-0400) Subject: Branchify Doug Kyle's patch to Launchpad bug 874603. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fcollab%2Fdyrcona%2Flp874603_2_1;p=working%2FEvergreen.git Branchify Doug Kyle's patch to Launchpad bug 874603. --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm index 1cb3dce467..d3cb16e93c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm @@ -671,7 +671,11 @@ sub patron_search { my $card = ''; if ($cv) { - $card = 'JOIN (SELECT DISTINCT usr FROM actor.card WHERE evergreen.lowercase(barcode) LIKE ?||\'%\') AS card ON (card.usr = users.id)'; + if ( $cv =~ /[A-Za-z]/) { + $card = 'JOIN (SELECT DISTINCT usr FROM actor.card WHERE evergreen.lowercase(barcode) LIKE ?||\'%\') AS card ON (card.usr = users.id)'; + } else { + $card = 'JOIN (SELECT DISTINCT usr FROM actor.card WHERE barcode LIKE ?||\'%\') AS card ON (card.usr = users.id)'; + } unshift(@usrv, $cv); }