Lines 175-182
sub AddReserve {
Link Here
|
175 |
$title, $checkitem, $found, $itemtype |
175 |
$title, $checkitem, $found, $itemtype |
176 |
) = @_; |
176 |
) = @_; |
177 |
|
177 |
|
178 |
my $dbh = C4::Context->dbh; |
|
|
179 |
|
180 |
$resdate = output_pref( { str => dt_from_string( $resdate ), dateonly => 1, dateformat => 'iso' }) |
178 |
$resdate = output_pref( { str => dt_from_string( $resdate ), dateonly => 1, dateformat => 'iso' }) |
181 |
or output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); |
179 |
or output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); |
182 |
|
180 |
|
Lines 1182-1188
sub ModReserve {
Link Here
|
1182 |
return unless ( $reserve_id || ( $borrowernumber && ( $biblionumber || $itemnumber ) ) ); |
1180 |
return unless ( $reserve_id || ( $borrowernumber && ( $biblionumber || $itemnumber ) ) ); |
1183 |
$reserve_id = GetReserveId({ biblionumber => $biblionumber, borrowernumber => $borrowernumber, itemnumber => $itemnumber }) unless ( $reserve_id ); |
1181 |
$reserve_id = GetReserveId({ biblionumber => $biblionumber, borrowernumber => $borrowernumber, itemnumber => $itemnumber }) unless ( $reserve_id ); |
1184 |
|
1182 |
|
1185 |
my $dbh = C4::Context->dbh; |
|
|
1186 |
if ( $rank eq "del" ) { |
1183 |
if ( $rank eq "del" ) { |
1187 |
CancelReserve({ reserve_id => $reserve_id }); |
1184 |
CancelReserve({ reserve_id => $reserve_id }); |
1188 |
} |
1185 |
} |
Lines 1232-1239
sub ModReserveFill {
Link Here
|
1232 |
my ($res) = @_; |
1229 |
my ($res) = @_; |
1233 |
my $reserve_id = $res->{'reserve_id'}; |
1230 |
my $reserve_id = $res->{'reserve_id'}; |
1234 |
|
1231 |
|
1235 |
my $dbh = C4::Context->dbh; |
|
|
1236 |
|
1237 |
my $hold = Koha::Holds->find($reserve_id); |
1232 |
my $hold = Koha::Holds->find($reserve_id); |
1238 |
|
1233 |
|
1239 |
# get the priority on this record.... |
1234 |
# get the priority on this record.... |
Lines 1247-1253
sub ModReserveFill {
Link Here
|
1247 |
} |
1242 |
} |
1248 |
); |
1243 |
); |
1249 |
|
1244 |
|
1250 |
my $old_hold = Koha::Old::Hold->new( $hold->unblessed() )->store(); |
1245 |
Koha::Old::Hold->new( $hold->unblessed() )->store(); |
1251 |
|
1246 |
|
1252 |
$hold->delete(); |
1247 |
$hold->delete(); |
1253 |
|
1248 |
|
Lines 1596-1603
Input: $where is 'up', 'down', 'top' or 'bottom'. Biblionumber, Date reserve was
Link Here
|
1596 |
sub AlterPriority { |
1591 |
sub AlterPriority { |
1597 |
my ( $where, $reserve_id ) = @_; |
1592 |
my ( $where, $reserve_id ) = @_; |
1598 |
|
1593 |
|
1599 |
my $dbh = C4::Context->dbh; |
|
|
1600 |
|
1601 |
my $reserve = GetReserve( $reserve_id ); |
1594 |
my $reserve = GetReserve( $reserve_id ); |
1602 |
|
1595 |
|
1603 |
if ( $reserve->{cancellationdate} ) { |
1596 |
if ( $reserve->{cancellationdate} ) { |
Lines 2176-2182
sub MoveReserve {
Link Here
|
2176 |
return unless $res; |
2169 |
return unless $res; |
2177 |
|
2170 |
|
2178 |
my $biblionumber = $res->{biblionumber}; |
2171 |
my $biblionumber = $res->{biblionumber}; |
2179 |
my $biblioitemnumber = $res->{biblioitemnumber}; |
|
|
2180 |
|
2172 |
|
2181 |
if ($res->{borrowernumber} == $borrowernumber) { |
2173 |
if ($res->{borrowernumber} == $borrowernumber) { |
2182 |
ModReserveFill($res); |
2174 |
ModReserveFill($res); |
2183 |
- |
|
|