Lines 46-52
use Koha::Old::Hold;
Link Here
|
46 |
use Koha::Patrons; |
46 |
use Koha::Patrons; |
47 |
use Koha::Plugins; |
47 |
use Koha::Plugins; |
48 |
|
48 |
|
49 |
use Data::Dumper qw( Dumper ); |
|
|
50 |
use List::MoreUtils qw( any ); |
49 |
use List::MoreUtils qw( any ); |
51 |
|
50 |
|
52 |
=head1 NAME |
51 |
=head1 NAME |
Lines 261-267
sub AddReserve {
Link Here
|
261 |
)->store(); |
260 |
)->store(); |
262 |
$hold->set_waiting() if $found && $found eq 'W'; |
261 |
$hold->set_waiting() if $found && $found eq 'W'; |
263 |
|
262 |
|
264 |
logaction( 'HOLDS', 'CREATE', $hold->id, Dumper($hold->unblessed) ) |
263 |
logaction( 'HOLDS', 'CREATE', $hold->id, $hold ) |
265 |
if C4::Context->preference('HoldsLog'); |
264 |
if C4::Context->preference('HoldsLog'); |
266 |
|
265 |
|
267 |
my $reserve_id = $hold->id(); |
266 |
my $reserve_id = $hold->id(); |
Lines 1053-1066
sub ModReserve {
Link Here
|
1053 |
$hold->cancel({ cancellation_reason => $cancellation_reason }); |
1052 |
$hold->cancel({ cancellation_reason => $cancellation_reason }); |
1054 |
} |
1053 |
} |
1055 |
elsif ($hold->found && $hold->priority eq '0' && $date) { |
1054 |
elsif ($hold->found && $hold->priority eq '0' && $date) { |
1056 |
logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) ) |
1055 |
logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, $hold ) |
1057 |
if C4::Context->preference('HoldsLog'); |
1056 |
if C4::Context->preference('HoldsLog'); |
1058 |
|
1057 |
|
1059 |
# The only column that can be updated for a found hold is the expiration date |
1058 |
# The only column that can be updated for a found hold is the expiration date |
1060 |
$hold->expirationdate(dt_from_string($date))->store(); |
1059 |
$hold->expirationdate(dt_from_string($date))->store(); |
1061 |
} |
1060 |
} |
1062 |
elsif ($rank =~ /^\d+/ and $rank > 0) { |
1061 |
elsif ($rank =~ /^\d+/ and $rank > 0) { |
1063 |
logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) ) |
1062 |
logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, $hold ) |
1064 |
if C4::Context->preference('HoldsLog'); |
1063 |
if C4::Context->preference('HoldsLog'); |
1065 |
|
1064 |
|
1066 |
my $properties = { |
1065 |
my $properties = { |
Lines 1122-1128
sub ModReserveFill {
Link Here
|
1122 |
} |
1121 |
} |
1123 |
); |
1122 |
); |
1124 |
|
1123 |
|
1125 |
logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) ) |
1124 |
logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, $hold ) |
1126 |
if C4::Context->preference('HoldsLog'); |
1125 |
if C4::Context->preference('HoldsLog'); |
1127 |
|
1126 |
|
1128 |
# FIXME Must call Koha::Hold->cancel ? => No, should call ->filled and add the correct log |
1127 |
# FIXME Must call Koha::Hold->cancel ? => No, should call ->filled and add the correct log |
Lines 1250-1256
sub ModReserveAffect {
Link Here
|
1250 |
}); |
1249 |
}); |
1251 |
$std->execute($hold->reserve_id); |
1250 |
$std->execute($hold->reserve_id); |
1252 |
|
1251 |
|
1253 |
logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->get_from_storage->unblessed) ) |
1252 |
logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, $hold ) |
1254 |
if C4::Context->preference('HoldsLog'); |
1253 |
if C4::Context->preference('HoldsLog'); |
1255 |
|
1254 |
|
1256 |
return; |
1255 |
return; |