Bug 13894: Fix if the search returns only 1 result
In the case where only 1 result is returned by the search, the borrowernumber should be passed correctly. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
0b350faa43
commit
6def929de4
2 changed files with 2 additions and 2 deletions
|
@ -487,7 +487,7 @@ No patron matched <span class="ex">[% message %]</span>
|
|||
[% END %]
|
||||
|
||||
|
||||
[% IF ( selectborrower ) %]
|
||||
[% IF ( borrowers ) %]
|
||||
[% INCLUDE 'patron-toolbar.inc' %]
|
||||
|
||||
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
|
||||
|
|
|
@ -116,7 +116,7 @@ if ($findborrower) {
|
|||
);
|
||||
my $borrowers = $results->{patrons};
|
||||
if ( scalar @$borrowers == 1 ) {
|
||||
$borrowernumber_hold = $borrower->[0]->{borrowernumber};
|
||||
$borrowernumber_hold = $borrowers->[0]->{borrowernumber};
|
||||
} elsif ( @$borrowers ) {
|
||||
$template->param( borrowers => $borrowers );
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue