|
Lines 4-9
package C4::Reserves;
Link Here
|
| 4 |
# 2006 SAN Ouest Provence |
4 |
# 2006 SAN Ouest Provence |
| 5 |
# 2007-2010 BibLibre Paul POULAIN |
5 |
# 2007-2010 BibLibre Paul POULAIN |
| 6 |
# 2011 Catalyst IT |
6 |
# 2011 Catalyst IT |
|
|
7 |
# Copyright 2012 software.coop and MJ Ray |
| 7 |
# |
8 |
# |
| 8 |
# This file is part of Koha. |
9 |
# This file is part of Koha. |
| 9 |
# |
10 |
# |
|
Lines 29-34
use C4::Members;
Link Here
|
| 29 |
use C4::Items; |
30 |
use C4::Items; |
| 30 |
use C4::Circulation; |
31 |
use C4::Circulation; |
| 31 |
use C4::Accounts; |
32 |
use C4::Accounts; |
|
|
33 |
use C4::Log; |
| 32 |
|
34 |
|
| 33 |
# for _koha_notify_reserve |
35 |
# for _koha_notify_reserve |
| 34 |
use C4::Members::Messaging; |
36 |
use C4::Members::Messaging; |
|
Lines 203-208
sub AddReserve {
Link Here
|
| 203 |
$found, $waitingdate, $expdate |
205 |
$found, $waitingdate, $expdate |
| 204 |
); |
206 |
); |
| 205 |
|
207 |
|
|
|
208 |
# Record the fact that this book was reserved. |
| 209 |
logaction( 'CIRCULATION', 'HOLD', $biblionumber, $borrowernumber ); |
| 210 |
|
| 206 |
# Send e-mail to librarian if syspref is active |
211 |
# Send e-mail to librarian if syspref is active |
| 207 |
if(C4::Context->preference("emailLibrarianWhenHoldIsPlaced")){ |
212 |
if(C4::Context->preference("emailLibrarianWhenHoldIsPlaced")){ |
| 208 |
my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber); |
213 |
my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber); |
|
Lines 1001-1007
sub CancelReserve {
Link Here
|
| 1001 |
return unless ( $reserve_id ); |
1006 |
return unless ( $reserve_id ); |
| 1002 |
|
1007 |
|
| 1003 |
my $dbh = C4::Context->dbh; |
1008 |
my $dbh = C4::Context->dbh; |
| 1004 |
|
|
|
| 1005 |
my $query = " |
1009 |
my $query = " |
| 1006 |
UPDATE reserves |
1010 |
UPDATE reserves |
| 1007 |
SET cancellationdate = now(), |
1011 |
SET cancellationdate = now(), |
|
Lines 1030-1035
sub CancelReserve {
Link Here
|
| 1030 |
|
1034 |
|
| 1031 |
# now fix the priority on the others.... |
1035 |
# now fix the priority on the others.... |
| 1032 |
_FixPriority( $reserve_id ); |
1036 |
_FixPriority( $reserve_id ); |
|
|
1037 |
|
| 1038 |
# Record the fact that this book was unreserved. |
| 1039 |
logaction( 'CIRCULATION', 'UNHOLD', $reserve_id ); |
| 1033 |
} |
1040 |
} |
| 1034 |
|
1041 |
|
| 1035 |
=head2 ModReserve |
1042 |
=head2 ModReserve |
|
Lines 1110-1115
sub ModReserve {
Link Here
|
| 1110 |
$sth = $dbh->prepare($query); |
1117 |
$sth = $dbh->prepare($query); |
| 1111 |
$sth->execute( $reserve_id ); |
1118 |
$sth->execute( $reserve_id ); |
| 1112 |
|
1119 |
|
|
|
1120 |
# Record the fact that this book was unreserved. |
| 1121 |
logaction( 'CIRCULATION', 'UNHOLD', $biblio, $borrower ); |
| 1122 |
|
| 1113 |
} |
1123 |
} |
| 1114 |
elsif ($rank =~ /^\d+/ and $rank > 0) { |
1124 |
elsif ($rank =~ /^\d+/ and $rank > 0) { |
| 1115 |
my $query = " |
1125 |
my $query = " |
|
Lines 1130-1135
sub ModReserve {
Link Here
|
| 1130 |
} |
1140 |
} |
| 1131 |
|
1141 |
|
| 1132 |
_FixPriority( $reserve_id, $rank ); |
1142 |
_FixPriority( $reserve_id, $rank ); |
|
|
1143 |
# Record the fact that this book was unreserved. |
| 1144 |
logaction( 'CIRCULATION', 'HOLD', $biblio, 'Modify hold for borrower '.$borrower ); |
| 1145 |
|
| 1133 |
} |
1146 |
} |
| 1134 |
} |
1147 |
} |
| 1135 |
|
1148 |
|
|
Lines 1195-1200
sub ModReserveFill {
Link Here
|
| 1195 |
$sth = $dbh->prepare($query); |
1208 |
$sth = $dbh->prepare($query); |
| 1196 |
$sth->execute( $biblionumber, $resdate, $borrowernumber ); |
1209 |
$sth->execute( $biblionumber, $resdate, $borrowernumber ); |
| 1197 |
|
1210 |
|
|
|
1211 |
# Record the fact that this book was unreserved. |
| 1212 |
logaction( 'CIRCULATION', 'UNHOLD', $biblionumber, $borrowernumber ); |
| 1213 |
|
| 1198 |
# now fix the priority on the others (if the priority wasn't |
1214 |
# now fix the priority on the others (if the priority wasn't |
| 1199 |
# already sorted!).... |
1215 |
# already sorted!).... |
| 1200 |
unless ( $priority == 0 ) { |
1216 |
unless ( $priority == 0 ) { |