|
Lines 26-31
use Modern::Perl;
Link Here
|
| 26 |
|
26 |
|
| 27 |
use C4::Context; |
27 |
use C4::Context; |
| 28 |
use C4::Circulation; |
28 |
use C4::Circulation; |
|
|
29 |
use C4::Reserves qw(GetReserveStatus); |
| 29 |
|
30 |
|
| 30 |
use DBI; |
31 |
use DBI; |
| 31 |
|
32 |
|
|
Lines 424-440
sub TransferCollection {
Link Here
|
| 424 |
); |
425 |
); |
| 425 |
$sth->execute( $colBranchcode, $colId ) or return ( 0, 4, $sth->errstr() ); |
426 |
$sth->execute( $colBranchcode, $colId ) or return ( 0, 4, $sth->errstr() ); |
| 426 |
|
427 |
|
| 427 |
$sth = $dbh->prepare( |
428 |
$sth = $dbh->prepare(q{ |
| 428 |
"SELECT barcode FROM items, collections_tracking |
429 |
SELECT items.itemnumber, items.barcode FROM collections_tracking |
| 429 |
WHERE items.itemnumber = collections_tracking.itemnumber |
430 |
LEFT JOIN items ON collections_tracking.itemnumber = items.itemnumber |
| 430 |
AND collections_tracking.colId = ?" |
431 |
LEFT JOIN issues ON items.itemnumber = issues.itemnumber |
| 431 |
); |
432 |
WHERE issues.borrowernumber IS NULL |
|
|
433 |
AND collections_tracking.colId = ? |
| 434 |
}); |
| 432 |
$sth->execute($colId) or return ( 0, 4, $sth->errstr ); |
435 |
$sth->execute($colId) or return ( 0, 4, $sth->errstr ); |
| 433 |
my @results; |
436 |
my @results; |
| 434 |
while ( my $item = $sth->fetchrow_hashref ) { |
437 |
while ( my $item = $sth->fetchrow_hashref ) { |
| 435 |
my ( $dotransfer, $messages, $iteminformation ) = |
438 |
transferbook( $colBranchcode, $item->{barcode}, |
| 436 |
transferbook( $colBranchcode, $item->{'barcode'}, |
439 |
my $ignore_reserves = 1 ) |
| 437 |
my $ignore_reserves = 1 ); |
440 |
unless ( GetReserveStatus( $item->{itemnumber} ) eq "Waiting" ); |
| 438 |
} |
441 |
} |
| 439 |
|
442 |
|
| 440 |
return 1; |
443 |
return 1; |
| 441 |
- |
|
|