From a828095d6d317bfb0a1924e735941e53df1e7c3f Mon Sep 17 00:00:00 2001 From: Garry Collum Date: Sat, 13 Mar 2010 08:06:50 -0500 Subject: [PATCH] Bug 4316: Fixes leading and trailing spaces in barcode for cki. Copies the regexp from circulation.pl to strip leading and trailing spaces from barcodes to returns.pl. Signed-off-by: Galen Charlton --- circ/returns.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/circ/returns.pl b/circ/returns.pl index a190af7876..0ff2407585 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -105,6 +105,7 @@ foreach ( $query->param ) { $counter++; # decode barcode ## Didn't we already decode them before passing them back last time?? + $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace $barcode = barcodedecode($barcode) if(C4::Context->preference('itemBarcodeInputFilter')); ###################### @@ -184,6 +185,7 @@ if ($dotransfer){ # actually return book and prepare item table..... if ($barcode) { + $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace $barcode = barcodedecode($barcode) if C4::Context->preference('itemBarcodeInputFilter'); $itemnumber = GetItemnumberFromBarcode($barcode); -- 2.39.5