|
Lines 623-630
sub HoldTitle {
Link Here
|
| 623 |
} |
623 |
} |
| 624 |
|
624 |
|
| 625 |
# Add the reserve |
625 |
# Add the reserve |
| 626 |
# $branch, $borrowernumber, $biblionumber, $constraint, $bibitems, $priority, $notes, $title, $checkitem, $found |
626 |
# $branch, $borrowernumber, $biblionumber, |
| 627 |
AddReserve( $branch, $borrowernumber, $biblionumber, 'a', undef, 0, undef, $title, undef, undef ); |
627 |
# $constraint, $bibitems, $priority, $resdate, $expdate, $notes, |
|
|
628 |
# $title, $checkitem, $found |
| 629 |
my $priority= C4::Reserves::CalculatePriority( $biblionumber ); |
| 630 |
AddReserve( $branch, $borrowernumber, $biblionumber, 'a', undef, $priority, undef, undef, undef, $title, undef, undef ); |
| 628 |
|
631 |
|
| 629 |
# Hashref building |
632 |
# Hashref building |
| 630 |
my $out; |
633 |
my $out; |
|
Lines 686-694
sub HoldItem {
Link Here
|
| 686 |
my $canbookbereserved = C4::Reserves::CanBookBeReserved( $borrowernumber, $biblionumber ); |
689 |
my $canbookbereserved = C4::Reserves::CanBookBeReserved( $borrowernumber, $biblionumber ); |
| 687 |
return { code => 'NotHoldable' } unless $canbookbereserved and $canitembereserved; |
690 |
return { code => 'NotHoldable' } unless $canbookbereserved and $canitembereserved; |
| 688 |
|
691 |
|
| 689 |
my $branch; |
|
|
| 690 |
|
| 691 |
# Pickup branch management |
692 |
# Pickup branch management |
|
|
693 |
my $branch; |
| 692 |
if ( $cgi->param('pickup_location') ) { |
694 |
if ( $cgi->param('pickup_location') ) { |
| 693 |
$branch = $cgi->param('pickup_location'); |
695 |
$branch = $cgi->param('pickup_location'); |
| 694 |
my $branches = GetBranches(); |
696 |
my $branches = GetBranches(); |
|
Lines 697-714
sub HoldItem {
Link Here
|
| 697 |
$branch = $$borrower{branchcode}; |
699 |
$branch = $$borrower{branchcode}; |
| 698 |
} |
700 |
} |
| 699 |
|
701 |
|
| 700 |
my $rank; |
|
|
| 701 |
my $found; |
| 702 |
|
| 703 |
# Get rank and found |
| 704 |
$rank = '0' unless C4::Context->preference('ReservesNeedReturns'); |
| 705 |
if ( $item->{'holdingbranch'} eq $branch ) { |
| 706 |
$found = 'W' unless C4::Context->preference('ReservesNeedReturns'); |
| 707 |
} |
| 708 |
|
| 709 |
# Add the reserve |
702 |
# Add the reserve |
| 710 |
# $branch,$borrowernumber,$biblionumber,$constraint,$bibitems,$priority,$resdate,$expdate,$notes,$title,$checkitem,$found |
703 |
# $branch, $borrowernumber, $biblionumber, |
| 711 |
AddReserve( $branch, $borrowernumber, $biblionumber, 'a', undef, $rank, '', '', '', $title, $itemnumber, $found ); |
704 |
# $constraint, $bibitems, $priority, $resdate, $expdate, $notes, |
|
|
705 |
# $title, $checkitem, $found |
| 706 |
my $priority= C4::Reserves::CalculatePriority( $biblionumber ); |
| 707 |
AddReserve( $branch, $borrowernumber, $biblionumber, 'a', undef, $priority, undef, undef, undef, $title, $itemnumber, undef ); |
| 712 |
|
708 |
|
| 713 |
# Hashref building |
709 |
# Hashref building |
| 714 |
my $out; |
710 |
my $out; |