|
Lines 26-32
use C4::Circulation;
Link Here
|
| 26 |
use C4::Branch; |
26 |
use C4::Branch; |
| 27 |
use C4::Accounts; |
27 |
use C4::Accounts; |
| 28 |
use C4::Biblio; |
28 |
use C4::Biblio; |
| 29 |
use C4::Reserves qw(AddReserve CancelReserve GetReservesFromBiblionumber GetReservesFromBorrowernumber CanBookBeReserved CanItemBeReserved); |
29 |
use C4::Reserves qw(AddReserve CancelReserve GetReservesFromBiblionumber GetReservesFromBorrowernumber CanBookBeReserved CanItemBeReserved GetReserveNextRank); |
| 30 |
use C4::Context; |
30 |
use C4::Context; |
| 31 |
use C4::AuthoritiesMarc; |
31 |
use C4::AuthoritiesMarc; |
| 32 |
use C4::ILSDI::Utility; |
32 |
use C4::ILSDI::Utility; |
|
Lines 623-631
sub HoldTitle {
Link Here
|
| 623 |
$branch = $$borrower{branchcode}; |
623 |
$branch = $$borrower{branchcode}; |
| 624 |
} |
624 |
} |
| 625 |
|
625 |
|
|
|
626 |
my $rank = GetReserveNextRank($biblionumber); |
| 627 |
|
| 626 |
# Add the reserve |
628 |
# Add the reserve |
| 627 |
# $branch, $borrowernumber, $biblionumber, $constraint, $bibitems, $priority, $notes, $title, $checkitem, $found |
629 |
# $branch, $borrowernumber, $biblionumber, $constraint, $bibitems, $priority, $notes, $title, $checkitem, $found |
| 628 |
AddReserve( $branch, $borrowernumber, $biblionumber, 'a', undef, 0, undef, $title, undef, undef ); |
630 |
AddReserve( $branch, $borrowernumber, $biblionumber, 'a', undef, $rank, undef, $title, undef, undef ); |
| 629 |
|
631 |
|
| 630 |
# Hashref building |
632 |
# Hashref building |
| 631 |
my $out; |
633 |
my $out; |
|
Lines 702-710
sub HoldItem {
Link Here
|
| 702 |
my $found; |
704 |
my $found; |
| 703 |
|
705 |
|
| 704 |
# Get rank and found |
706 |
# Get rank and found |
| 705 |
$rank = '0' unless C4::Context->preference('ReservesNeedReturns'); |
707 |
if (C4::Context->preference('ReservesNeedReturns')) { |
| 706 |
if ( $item->{'holdingbranch'} eq $branch ) { |
708 |
$rank = GetReserveNextRank($biblionumber); |
| 707 |
$found = 'W' unless C4::Context->preference('ReservesNeedReturns'); |
709 |
} else { |
|
|
710 |
$rank = '0'; |
| 711 |
if ($item->{'holdingbranch'} eq $branch) { |
| 712 |
$found = 'W'; |
| 713 |
} |
| 708 |
} |
714 |
} |
| 709 |
|
715 |
|
| 710 |
# Add the reserve |
716 |
# Add the reserve |