Lines 107-113
BEGIN {
Link Here
|
107 |
ChargeReserveFee |
107 |
ChargeReserveFee |
108 |
GetReserveFee |
108 |
GetReserveFee |
109 |
|
109 |
|
110 |
ModReserveFill |
|
|
111 |
ModReserveAffect |
110 |
ModReserveAffect |
112 |
ModReserve |
111 |
ModReserve |
113 |
ModReserveStatus |
112 |
ModReserveStatus |
Lines 1093-1118
sub ModReserve {
Link Here
|
1093 |
} |
1092 |
} |
1094 |
} |
1093 |
} |
1095 |
|
1094 |
|
1096 |
=head2 ModReserveFill |
|
|
1097 |
|
1098 |
&ModReserveFill($reserve); |
1099 |
|
1100 |
Fill a reserve. If I understand this correctly, this means that the |
1101 |
reserved book has been found and given to the patron who reserved it. |
1102 |
|
1103 |
C<$reserve> specifies the reserve to fill. It is a reference-to-hash |
1104 |
whose keys are fields from the reserves table in the Koha database. |
1105 |
|
1106 |
=cut |
1107 |
|
1108 |
sub ModReserveFill { |
1109 |
my ($res) = @_; |
1110 |
my $reserve_id = $res->{'reserve_id'}; |
1111 |
|
1112 |
my $hold = Koha::Holds->find($reserve_id); |
1113 |
$hold->fill; |
1114 |
} |
1115 |
|
1116 |
=head2 ModReserveStatus |
1095 |
=head2 ModReserveStatus |
1117 |
|
1096 |
|
1118 |
&ModReserveStatus($itemnumber, $newstatus); |
1097 |
&ModReserveStatus($itemnumber, $newstatus); |
Lines 1795-1801
sub _Findgroupreserve {
Link Here
|
1795 |
_koha_notify_reserve( $hold->reserve_id ); |
1774 |
_koha_notify_reserve( $hold->reserve_id ); |
1796 |
|
1775 |
|
1797 |
Sends a notification to the patron that their hold has been filled (through |
1776 |
Sends a notification to the patron that their hold has been filled (through |
1798 |
ModReserveAffect, _not_ ModReserveFill) |
1777 |
ModReserveAffect) |
1799 |
|
1778 |
|
1800 |
The letter code for this notice may be found using the following query: |
1779 |
The letter code for this notice may be found using the following query: |
1801 |
|
1780 |
|
Lines 1956-1965
sub MoveReserve {
Link Here
|
1956 |
my ( $restype, $res, undef ) = CheckReserves( $itemnumber, undef, $lookahead ); |
1935 |
my ( $restype, $res, undef ) = CheckReserves( $itemnumber, undef, $lookahead ); |
1957 |
return unless $res; |
1936 |
return unless $res; |
1958 |
|
1937 |
|
1959 |
my $biblionumber = $res->{biblionumber}; |
1938 |
my $biblionumber = $res->{biblionumber}; |
1960 |
|
1939 |
|
1961 |
if ($res->{borrowernumber} == $borrowernumber) { |
1940 |
if ($res->{borrowernumber} == $borrowernumber) { |
1962 |
ModReserveFill($res); |
1941 |
my $hold = Koha::Holds->find( $res->{reserve_id} ); |
|
|
1942 |
$hold->fill; |
1963 |
} |
1943 |
} |
1964 |
else { |
1944 |
else { |
1965 |
# warn "Reserved"; |
1945 |
# warn "Reserved"; |
Lines 1975-1981
sub MoveReserve {
Link Here
|
1975 |
|
1955 |
|
1976 |
if ( $borr_res ) { |
1956 |
if ( $borr_res ) { |
1977 |
# The item is reserved by the current patron |
1957 |
# The item is reserved by the current patron |
1978 |
ModReserveFill($borr_res->unblessed); |
1958 |
$borr_res->fill; |
1979 |
} |
1959 |
} |
1980 |
|
1960 |
|
1981 |
if ( $cancelreserve eq 'revert' ) { ## Revert waiting reserve to priority 1 |
1961 |
if ( $cancelreserve eq 'revert' ) { ## Revert waiting reserve to priority 1 |