Lines 273-279
sub GetReservesFromBiblionumber {
Link Here
|
273 |
expirationdate, |
273 |
expirationdate, |
274 |
lowestPriority, |
274 |
lowestPriority, |
275 |
suspend, |
275 |
suspend, |
276 |
suspend_until |
276 |
suspend_until, |
|
|
277 |
reserve_id |
277 |
FROM reserves |
278 |
FROM reserves |
278 |
WHERE biblionumber = ? "; |
279 |
WHERE biblionumber = ? "; |
279 |
unless ( $all_dates ) { |
280 |
unless ( $all_dates ) { |
Lines 1056-1062
itemnumber and supplying itemnumber.
Link Here
|
1056 |
|
1057 |
|
1057 |
sub ModReserve { |
1058 |
sub ModReserve { |
1058 |
#subroutine to update a reserve |
1059 |
#subroutine to update a reserve |
1059 |
my ( $rank, $biblio, $borrower, $branch , $itemnumber, $suspend_until) = @_; |
1060 |
my ( $rank, $biblio, $borrower, $branch , $itemnumber, $suspend_until, $reserve_id ) = @_; |
1060 |
return if $rank eq "W"; |
1061 |
return if $rank eq "W"; |
1061 |
return if $rank eq "n"; |
1062 |
return if $rank eq "n"; |
1062 |
my $dbh = C4::Context->dbh; |
1063 |
my $dbh = C4::Context->dbh; |
Lines 1089-1094
sub ModReserve {
Link Here
|
1089 |
|
1090 |
|
1090 |
} |
1091 |
} |
1091 |
elsif ($rank =~ /^\d+/ and $rank > 0) { |
1092 |
elsif ($rank =~ /^\d+/ and $rank > 0) { |
|
|
1093 |
my $reserve; |
1094 |
if ( $reserve_id ) { |
1095 |
my $sth = $dbh->prepare("SELECT * FROM reserves WHERE reserve_id = ?"); |
1096 |
$sth->execute( $reserve_id ); |
1097 |
$reserve = $sth->fetchrow_hashref(); |
1098 |
} |
1099 |
|
1092 |
my $query = " |
1100 |
my $query = " |
1093 |
UPDATE reserves SET priority = ? ,branchcode = ?, itemnumber = ?, found = NULL, waitingdate = NULL |
1101 |
UPDATE reserves SET priority = ? ,branchcode = ?, itemnumber = ?, found = NULL, waitingdate = NULL |
1094 |
WHERE biblionumber = ? |
1102 |
WHERE biblionumber = ? |
Lines 1098-1103
sub ModReserve {
Link Here
|
1098 |
$sth->execute( $rank, $branch,$itemnumber, $biblio, $borrower); |
1106 |
$sth->execute( $rank, $branch,$itemnumber, $biblio, $borrower); |
1099 |
$sth->finish; |
1107 |
$sth->finish; |
1100 |
|
1108 |
|
|
|
1109 |
## If we are re-prioritizing a previously 'in transit' hold, we need to remove any item transfer that may have been created for it. |
1110 |
if ( $reserve->{'found'} eq 'T' ) { |
1111 |
$dbh->do("DELETE FROM branchtransfers WHERE itemnumber = ? AND tobranch = ? AND datearrived IS NULL", undef, ( $itemnumber, $reserve->{'branchcode'} ) ); |
1112 |
} |
1113 |
|
1101 |
if ( defined( $suspend_until ) ) { |
1114 |
if ( defined( $suspend_until ) ) { |
1102 |
if ( $suspend_until ) { |
1115 |
if ( $suspend_until ) { |
1103 |
$suspend_until = C4::Dates->new( $suspend_until )->output("iso"); |
1116 |
$suspend_until = C4::Dates->new( $suspend_until )->output("iso"); |