|
Lines 673-681
Parameters:
Link Here
|
| 673 |
IP address where the end user request is being placed |
673 |
IP address where the end user request is being placed |
| 674 |
- pickup_location (Optional) |
674 |
- pickup_location (Optional) |
| 675 |
a branch code indicating the location to which to deliver the item for pickup |
675 |
a branch code indicating the location to which to deliver the item for pickup |
| 676 |
- needed_before_date (Optional) |
676 |
- start_date (Optional) |
| 677 |
date after which hold request is no longer needed |
677 |
date after which hold request is no longer needed if the document has not been made available |
| 678 |
- pickup_expiry_date (Optional) |
678 |
- expiry_date (Optional) |
| 679 |
date after which item returned to shelf if item is not picked up |
679 |
date after which item returned to shelf if item is not picked up |
| 680 |
|
680 |
|
| 681 |
=cut |
681 |
=cut |
|
Lines 728-739
sub HoldTitle {
Link Here
|
| 728 |
return { code => 'libraryNotPickupLocation' } unless $destination->pickup_location; |
728 |
return { code => 'libraryNotPickupLocation' } unless $destination->pickup_location; |
| 729 |
return { code => 'cannotBeTransferred' } unless $biblio->can_be_transferred({ to => $destination }); |
729 |
return { code => 'cannotBeTransferred' } unless $biblio->can_be_transferred({ to => $destination }); |
| 730 |
|
730 |
|
|
|
731 |
my $resdate; |
| 732 |
if ( $cgi->param('start_date') ) { |
| 733 |
$resdate = $cgi->param('start_date'); |
| 734 |
} |
| 735 |
|
| 736 |
my $expdate; |
| 737 |
if ( $cgi->param('expiry_date') ) { |
| 738 |
$expdate = $cgi->param('expiry_date'); |
| 739 |
} |
| 740 |
|
| 731 |
# Add the reserve |
741 |
# Add the reserve |
| 732 |
# $branch, $borrowernumber, $biblionumber, |
742 |
# $branch, $borrowernumber, $biblionumber, |
| 733 |
# $constraint, $bibitems, $priority, $resdate, $expdate, $notes, |
743 |
# $constraint, $bibitems, $priority, $resdate, $expdate, $notes, |
| 734 |
# $title, $checkitem, $found |
744 |
# $title, $checkitem, $found |
| 735 |
my $priority= C4::Reserves::CalculatePriority( $biblionumber ); |
745 |
my $priority= C4::Reserves::CalculatePriority( $biblionumber ); |
| 736 |
AddReserve( $branch, $borrowernumber, $biblionumber, undef, $priority, undef, undef, undef, $title, undef, undef ); |
746 |
AddReserve( $branch, $borrowernumber, $biblionumber, undef, $priority, $resdate, $expdate, undef, $title, undef, undef ); |
| 737 |
|
747 |
|
| 738 |
# Hashref building |
748 |
# Hashref building |
| 739 |
my $out; |
749 |
my $out; |
|
Lines 761-769
Parameters:
Link Here
|
| 761 |
an itemnumber |
771 |
an itemnumber |
| 762 |
- pickup_location (Optional) |
772 |
- pickup_location (Optional) |
| 763 |
a branch code indicating the location to which to deliver the item for pickup |
773 |
a branch code indicating the location to which to deliver the item for pickup |
| 764 |
- needed_before_date (Optional) |
774 |
- start_date (Optional) |
| 765 |
date after which hold request is no longer needed |
775 |
date after which hold request is no longer needed if the item has not been made available |
| 766 |
- pickup_expiry_date (Optional) |
776 |
- expiry_date (Optional) |
| 767 |
date after which item returned to shelf if item is not picked up |
777 |
date after which item returned to shelf if item is not picked up |
| 768 |
|
778 |
|
| 769 |
=cut |
779 |
=cut |
|
Lines 807-818
sub HoldItem {
Link Here
|
| 807 |
my $canitembereserved = C4::Reserves::CanItemBeReserved( $borrowernumber, $itemnumber, $branch )->{status}; |
817 |
my $canitembereserved = C4::Reserves::CanItemBeReserved( $borrowernumber, $itemnumber, $branch )->{status}; |
| 808 |
return { code => $canitembereserved } unless $canitembereserved eq 'OK'; |
818 |
return { code => $canitembereserved } unless $canitembereserved eq 'OK'; |
| 809 |
|
819 |
|
|
|
820 |
my $resdate; |
| 821 |
if ( $cgi->param('start_date') ) { |
| 822 |
$resdate = $cgi->param('start_date'); |
| 823 |
} |
| 824 |
|
| 825 |
my $expdate; |
| 826 |
if ( $cgi->param('expiry_date') ) { |
| 827 |
$expdate = $cgi->param('expiry_date'); |
| 828 |
} |
| 829 |
|
| 810 |
# Add the reserve |
830 |
# Add the reserve |
| 811 |
# $branch, $borrowernumber, $biblionumber, |
831 |
# $branch, $borrowernumber, $biblionumber, |
| 812 |
# $constraint, $bibitems, $priority, $resdate, $expdate, $notes, |
832 |
# $constraint, $bibitems, $priority, $resdate, $expdate, $notes, |
| 813 |
# $title, $checkitem, $found |
833 |
# $title, $checkitem, $found |
| 814 |
my $priority= C4::Reserves::CalculatePriority( $biblionumber ); |
834 |
my $priority= C4::Reserves::CalculatePriority( $biblionumber ); |
| 815 |
AddReserve( $branch, $borrowernumber, $biblionumber, undef, $priority, undef, undef, undef, $title, $itemnumber, undef ); |
835 |
AddReserve( $branch, $borrowernumber, $biblionumber, undef, $priority, $resdate, $expdate, undef, $title, $itemnumber, undef ); |
| 816 |
|
836 |
|
| 817 |
# Hashref building |
837 |
# Hashref building |
| 818 |
my $out; |
838 |
my $out; |
| 819 |
- |
|
|