Lines 2624-2642
sub GetBorrowersToSatisfyHold {
Link Here
|
2624 |
|
2624 |
|
2625 |
if ($library eq 'RequestorLibrary') { |
2625 |
if ($library eq 'RequestorLibrary') { |
2626 |
$query .= " AND borrowers.branchcode = ?"; |
2626 |
$query .= " AND borrowers.branchcode = ?"; |
2627 |
$sth = $dbh->prepare( $query ); |
2627 |
$sth = $dbh->prepare( $query ); |
2628 |
$sth->execute( $hold->id(), $hold->borrower()->branchcode ); |
2628 |
$sth->execute( $hold->id(), $hold->borrower()->branchcode ); |
2629 |
} |
2629 |
} |
2630 |
elsif ($library eq 'ItemHomeLibrary') { |
2630 |
elsif ($library eq 'ItemHomeLibrary') { |
2631 |
$query .= " AND items.homebranch = ?"; |
2631 |
$query .= " AND items.homebranch = ?"; |
2632 |
$sth = $dbh->prepare( $query ); |
2632 |
$sth = $dbh->prepare( $query ); |
2633 |
$sth->execute( $hold->id(), $hold->borrower()->branchcode ); |
2633 |
$sth->execute( $hold->id(), $hold->borrower()->branchcode ); |
2634 |
} |
2634 |
} |
2635 |
else { |
2635 |
else { |
2636 |
$sth = $dbh->prepare( $query ); |
2636 |
$sth = $dbh->prepare( $query ); |
2637 |
$sth->execute( $hold->id() ); |
2637 |
$sth->execute( $hold->id() ); |
2638 |
} |
2638 |
} |
2639 |
|
2639 |
|
2640 |
my @results = (); |
2640 |
my @results = (); |
2641 |
while ( my $data = $sth->fetchrow_hashref ) { |
2641 |
while ( my $data = $sth->fetchrow_hashref ) { |
2642 |
my $borrower = C4::Members::GetMember(borrowernumber => $data->{borrowernumber}); |
2642 |
my $borrower = C4::Members::GetMember(borrowernumber => $data->{borrowernumber}); |
2643 |
- |
|
|