Bug 15752: (QA follow-up) Remove unecessary redirect

If the borrowernumber is defined in query, it starts to get information
about previous borrower and the new one is taken into account fully on
second page reload

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Josef Moravec 2017-12-21 19:17:20 +00:00 committed by Jonathan Druart
parent 3f0652056c
commit 09a72046f4
1 changed files with 2 additions and 1 deletions

View File

@ -85,11 +85,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;
}
}
@ -117,7 +119,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;