Lines 192-197
sub AddReserve {
Link Here
|
192 |
my $found = $params->{found}; |
192 |
my $found = $params->{found}; |
193 |
my $itemtype = $params->{itemtype}; |
193 |
my $itemtype = $params->{itemtype}; |
194 |
my $non_priority = $params->{non_priority}; |
194 |
my $non_priority = $params->{non_priority}; |
|
|
195 |
my $hold_group_id = $params->{hold_group_id}; |
195 |
|
196 |
|
196 |
$resdate = output_pref( { str => dt_from_string( $resdate ), dateonly => 1, dateformat => 'iso' }) |
197 |
$resdate = output_pref( { str => dt_from_string( $resdate ), dateonly => 1, dateformat => 'iso' }) |
197 |
or output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); |
198 |
or output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); |
Lines 256-261
sub AddReserve {
Link Here
|
256 |
itemtype => $itemtype, |
257 |
itemtype => $itemtype, |
257 |
item_level_hold => $checkitem ? 1 : 0, |
258 |
item_level_hold => $checkitem ? 1 : 0, |
258 |
non_priority => $non_priority ? 1 : 0, |
259 |
non_priority => $non_priority ? 1 : 0, |
|
|
260 |
hold_group_id => $hold_group_id, |
259 |
} |
261 |
} |
260 |
)->store(); |
262 |
)->store(); |
261 |
$hold->set_waiting() if $found && $found eq 'W'; |
263 |
$hold->set_waiting() if $found && $found eq 'W'; |
Lines 1124-1129
sub ModReserveFill {
Link Here
|
1124 |
logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, $hold ) |
1126 |
logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, $hold ) |
1125 |
if C4::Context->preference('HoldsLog'); |
1127 |
if C4::Context->preference('HoldsLog'); |
1126 |
|
1128 |
|
|
|
1129 |
# if this hold was part of a group, cancel other holds in the group |
1130 |
my @holds = Koha::Holds->search({ hold_group_id => $hold->hold_group_id }); |
1131 |
foreach my $h ( @holds ) { |
1132 |
$h->cancel unless $h->reserve_id == $hold->reserve_id; |
1133 |
} |
1134 |
|
1127 |
# FIXME Must call Koha::Hold->cancel ? => No, should call ->filled and add the correct log |
1135 |
# FIXME Must call Koha::Hold->cancel ? => No, should call ->filled and add the correct log |
1128 |
Koha::Old::Hold->new( $hold->unblessed() )->store(); |
1136 |
Koha::Old::Hold->new( $hold->unblessed() )->store(); |
1129 |
|
1137 |
|
Lines 1227-1232
sub ModReserveAffect {
Link Here
|
1227 |
# Complete transfer if one exists |
1235 |
# Complete transfer if one exists |
1228 |
my $transfer = $hold->item->get_transfer; |
1236 |
my $transfer = $hold->item->get_transfer; |
1229 |
$transfer->receive if $transfer; |
1237 |
$transfer->receive if $transfer; |
|
|
1238 |
|
1239 |
# if this hold was part of a group, cancel other holds in the group |
1240 |
my @holds = Koha::Holds->search({ hold_group_id => $hold->hold_group_id }); |
1241 |
foreach my $h ( @holds ) { |
1242 |
$h->cancel unless $h->reserve_id == $hold->reserve_id; |
1243 |
} |
1230 |
} |
1244 |
} |
1231 |
|
1245 |
|
1232 |
_FixPriority( { biblionumber => $biblionumber } ); |
1246 |
_FixPriority( { biblionumber => $biblionumber } ); |