Bug 13763: (follow-up) Strip leading whitespace characters from input barcode

this makes the work with barcodes from input consistant on checking out,
     checking in and renewing

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 28ff4f6393)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Josef Moravec 2019-03-20 15:52:07 +00:00 committed by Martin Renvoize
parent 4505ad4dc5
commit 2712e1ee55
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 0 deletions

View File

@ -44,6 +44,7 @@ my ( $template, $librarian, $cookie, $flags ) = get_template_and_user(
my $schema = Koha::Database->new()->schema();
my $barcode = $cgi->param('barcode');
$barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespae
$barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
my $override_limit = $cgi->param('override_limit');
my $override_holds = $cgi->param('override_holds');