@@ -, +, @@ --- circ/circulation.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -86,11 +86,13 @@ my $barcodes = []; my $barcode = $query->param('barcode'); my $findborrower; my $autoswitched; +my $borrowernumber = $query->param('borrowernumber'); if (C4::Context->preference("AutoSwitchPatron") && $barcode) { if (Koha::Patrons->search( { cardnumber => $barcode} )->count() > 0) { $findborrower = $barcode; undef $barcode; + undef $borrowernumber; $autoswitched = 1; } } @@ -118,7 +120,6 @@ if ( $barcode || ( defined($barcode) && $barcode eq '0' ) ) { $barcodes = [ uniq @$barcodes ]; my $template_name = q|circ/circulation.tt|; -my $borrowernumber = $query->param('borrowernumber'); my $patron = $borrowernumber ? Koha::Patrons->find( $borrowernumber ) : undef; my $batch = $query->param('batch'); my $batch_allowed = 0; --