|
Lines 660-668
Parameters:
Link Here
|
| 660 |
IP address where the end user request is being placed |
660 |
IP address where the end user request is being placed |
| 661 |
- pickup_location (Optional) |
661 |
- pickup_location (Optional) |
| 662 |
a branch code indicating the location to which to deliver the item for pickup |
662 |
a branch code indicating the location to which to deliver the item for pickup |
| 663 |
- needed_before_date (Optional) |
663 |
- start_date (Optional) |
| 664 |
date after which hold request is no longer needed |
664 |
date after which hold request is no longer needed if the document has not been made available |
| 665 |
- pickup_expiry_date (Optional) |
665 |
- expiry_date (Optional) |
| 666 |
date after which item returned to shelf if item is not picked up |
666 |
date after which item returned to shelf if item is not picked up |
| 667 |
|
667 |
|
| 668 |
=cut |
668 |
=cut |
|
Lines 712-723
sub HoldTitle {
Link Here
|
| 712 |
return { code => 'libraryNotPickupLocation' } unless $destination->pickup_location; |
712 |
return { code => 'libraryNotPickupLocation' } unless $destination->pickup_location; |
| 713 |
return { code => 'cannotBeTransferred' } unless $biblio->can_be_transferred({ to => $destination }); |
713 |
return { code => 'cannotBeTransferred' } unless $biblio->can_be_transferred({ to => $destination }); |
| 714 |
|
714 |
|
|
|
715 |
my $resdate; |
| 716 |
if ( $cgi->param('start_date') ) { |
| 717 |
$resdate = $cgi->param('start_date'); |
| 718 |
} |
| 719 |
|
| 720 |
my $expdate; |
| 721 |
if ( $cgi->param('expiry_date') ) { |
| 722 |
$expdate = $cgi->param('expiry_date'); |
| 723 |
} |
| 724 |
|
| 715 |
# Add the reserve |
725 |
# Add the reserve |
| 716 |
# $branch, $borrowernumber, $biblionumber, |
726 |
# $branch, $borrowernumber, $biblionumber, |
| 717 |
# $constraint, $bibitems, $priority, $resdate, $expdate, $notes, |
727 |
# $constraint, $bibitems, $priority, $resdate, $expdate, $notes, |
| 718 |
# $title, $checkitem, $found |
728 |
# $title, $checkitem, $found |
| 719 |
my $priority= C4::Reserves::CalculatePriority( $biblionumber ); |
729 |
my $priority= C4::Reserves::CalculatePriority( $biblionumber ); |
| 720 |
AddReserve( $branch, $borrowernumber, $biblionumber, undef, $priority, undef, undef, undef, $title, undef, undef ); |
730 |
AddReserve( $branch, $borrowernumber, $biblionumber, undef, $priority, $resdate, $expdate, undef, $title, undef, undef ); |
| 721 |
|
731 |
|
| 722 |
# Hashref building |
732 |
# Hashref building |
| 723 |
my $out; |
733 |
my $out; |
|
Lines 745-753
Parameters:
Link Here
|
| 745 |
an itemnumber |
755 |
an itemnumber |
| 746 |
- pickup_location (Optional) |
756 |
- pickup_location (Optional) |
| 747 |
a branch code indicating the location to which to deliver the item for pickup |
757 |
a branch code indicating the location to which to deliver the item for pickup |
| 748 |
- needed_before_date (Optional) |
758 |
- start_date (Optional) |
| 749 |
date after which hold request is no longer needed |
759 |
date after which hold request is no longer needed if the item has not been made available |
| 750 |
- pickup_expiry_date (Optional) |
760 |
- expiry_date (Optional) |
| 751 |
date after which item returned to shelf if item is not picked up |
761 |
date after which item returned to shelf if item is not picked up |
| 752 |
|
762 |
|
| 753 |
=cut |
763 |
=cut |
|
Lines 788-799
sub HoldItem {
Link Here
|
| 788 |
my $canitembereserved = C4::Reserves::CanItemBeReserved( $borrowernumber, $itemnumber, $branch )->{status}; |
798 |
my $canitembereserved = C4::Reserves::CanItemBeReserved( $borrowernumber, $itemnumber, $branch )->{status}; |
| 789 |
return { code => $canitembereserved } unless $canitembereserved eq 'OK'; |
799 |
return { code => $canitembereserved } unless $canitembereserved eq 'OK'; |
| 790 |
|
800 |
|
|
|
801 |
my $resdate; |
| 802 |
if ( $cgi->param('start_date') ) { |
| 803 |
$resdate = $cgi->param('start_date'); |
| 804 |
} |
| 805 |
|
| 806 |
my $expdate; |
| 807 |
if ( $cgi->param('expiry_date') ) { |
| 808 |
$expdate = $cgi->param('expiry_date'); |
| 809 |
} |
| 810 |
|
| 791 |
# Add the reserve |
811 |
# Add the reserve |
| 792 |
# $branch, $borrowernumber, $biblionumber, |
812 |
# $branch, $borrowernumber, $biblionumber, |
| 793 |
# $constraint, $bibitems, $priority, $resdate, $expdate, $notes, |
813 |
# $constraint, $bibitems, $priority, $resdate, $expdate, $notes, |
| 794 |
# $title, $checkitem, $found |
814 |
# $title, $checkitem, $found |
| 795 |
my $priority= C4::Reserves::CalculatePriority( $biblionumber ); |
815 |
my $priority= C4::Reserves::CalculatePriority( $biblionumber ); |
| 796 |
AddReserve( $branch, $borrowernumber, $biblionumber, undef, $priority, undef, undef, undef, $title, $itemnumber, undef ); |
816 |
AddReserve( $branch, $borrowernumber, $biblionumber, undef, $priority, $resdate, $expdate, undef, $title, $itemnumber, undef ); |
| 797 |
|
817 |
|
| 798 |
# Hashref building |
818 |
# Hashref building |
| 799 |
my $out; |
819 |
my $out; |