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 626-634
sub HoldTitle {
Link Here
|
626 |
$branch = $$borrower{branchcode}; |
626 |
$branch = $$borrower{branchcode}; |
627 |
} |
627 |
} |
628 |
|
628 |
|
|
|
629 |
my $rank = GetReserveNextRank($biblionumber); |
630 |
|
629 |
# Add the reserve |
631 |
# Add the reserve |
630 |
# $branch, $borrowernumber, $biblionumber, $constraint, $bibitems, $priority, $notes, $title, $checkitem, $found |
632 |
# $branch, $borrowernumber, $biblionumber, $constraint, $bibitems, $priority, $notes, $title, $checkitem, $found |
631 |
AddReserve( $branch, $borrowernumber, $biblionumber, 'a', undef, 0, undef, $title, undef, undef ); |
633 |
AddReserve( $branch, $borrowernumber, $biblionumber, 'a', undef, $rank, undef, $title, undef, undef ); |
632 |
|
634 |
|
633 |
# Hashref building |
635 |
# Hashref building |
634 |
my $out; |
636 |
my $out; |
Lines 705-713
sub HoldItem {
Link Here
|
705 |
my $found; |
707 |
my $found; |
706 |
|
708 |
|
707 |
# Get rank and found |
709 |
# Get rank and found |
708 |
$rank = '0' unless C4::Context->preference('ReservesNeedReturns'); |
710 |
if (C4::Context->preference('ReservesNeedReturns')) { |
709 |
if ( $item->{'holdingbranch'} eq $branch ) { |
711 |
$rank = GetReserveNextRank($biblionumber); |
710 |
$found = 'W' unless C4::Context->preference('ReservesNeedReturns'); |
712 |
} else { |
|
|
713 |
$rank = '0'; |
714 |
if ($item->{'holdingbranch'} eq $branch) { |
715 |
$found = 'W'; |
716 |
} |
711 |
} |
717 |
} |
712 |
|
718 |
|
713 |
# Add the reserve |
719 |
# Add the reserve |