Browse Source

Bug 29637: AutoSwitchPatron should look for card number in the barcode

Bug 26352 changed the line in circ/circulation.pl that searches for a
patron card number in the barcode field from using the $barcode variable
to the $findborrower variable.  This breaks AutoSwitchPatron.

Test plan:

1. make sure AutoSwitchPatron system preference is on.
2. get two patron card numbers.
3. enter the first card number to check out to the patron.
4. enter the second card number in the item barcode field.
5. observe that the barcode is not found.

6. apply patch

7. enter the second card number in the item barcode field again.
8. observe that the second patron is loaded to check out to.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
master
Michael Hafen 2 months ago
committed by Fridolin Somers
parent
commit
d308a064d7
  1. 2
      circ/circulation.pl

2
circ/circulation.pl

@ -76,7 +76,7 @@ my $autoswitched;
my $borrowernumber = $query->param('borrowernumber');
if (C4::Context->preference("AutoSwitchPatron") && $barcode) {
my $new_barcode = $findborrower;
my $new_barcode = $barcode;
Koha::Plugins->call( 'patron_barcode_transform', \$new_barcode );
if (Koha::Patrons->search( { cardnumber => $new_barcode} )->count() > 0) {
$findborrower = $barcode;

Loading…
Cancel
Save