Lines 3808-3819
sub TransferSlip {
Link Here
|
3808 |
sub CheckIfIssuedToPatron { |
3808 |
sub CheckIfIssuedToPatron { |
3809 |
my ($borrowernumber, $biblionumber) = @_; |
3809 |
my ($borrowernumber, $biblionumber) = @_; |
3810 |
|
3810 |
|
3811 |
my $items = GetItemsByBiblioitemnumber($biblionumber); |
3811 |
my $dbh = C4::Context->dbh; |
3812 |
|
3812 |
my $query = q| |
3813 |
foreach my $item (@{$items}) { |
3813 |
SELECT COUNT(*) FROM issues |
3814 |
return 1 if ($item->{borrowernumber} && $item->{borrowernumber} eq $borrowernumber); |
3814 |
LEFT JOIN items ON items.itemnumber = issues.itemnumber |
3815 |
} |
3815 |
WHERE items.biblionumber = ? |
3816 |
|
3816 |
AND issues.borrowernumber = ? |
|
|
3817 |
|; |
3818 |
my $is_issued = $dbh->selectrow_array($query, {}, $biblionumber, $borrowernumber ); |
3819 |
return 1 if $is_issued; |
3817 |
return; |
3820 |
return; |
3818 |
} |
3821 |
} |
3819 |
|
3822 |
|
3820 |
- |
|
|