Lines 189-194
sub AddReserve {
Link Here
|
189 |
my $found = $params->{found}; |
189 |
my $found = $params->{found}; |
190 |
my $itemtype = $params->{itemtype}; |
190 |
my $itemtype = $params->{itemtype}; |
191 |
my $non_priority = $params->{non_priority}; |
191 |
my $non_priority = $params->{non_priority}; |
|
|
192 |
my $hold_group_id = $params->{hold_group_id}; |
192 |
|
193 |
|
193 |
$resdate = output_pref( { str => dt_from_string( $resdate ), dateonly => 1, dateformat => 'iso' }) |
194 |
$resdate = output_pref( { str => dt_from_string( $resdate ), dateonly => 1, dateformat => 'iso' }) |
194 |
or output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); |
195 |
or output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); |
Lines 253-258
sub AddReserve {
Link Here
|
253 |
itemtype => $itemtype, |
254 |
itemtype => $itemtype, |
254 |
item_level_hold => $checkitem ? 1 : 0, |
255 |
item_level_hold => $checkitem ? 1 : 0, |
255 |
non_priority => $non_priority ? 1 : 0, |
256 |
non_priority => $non_priority ? 1 : 0, |
|
|
257 |
hold_group_id => $hold_group_id, |
256 |
} |
258 |
} |
257 |
)->store(); |
259 |
)->store(); |
258 |
$hold->set_waiting() if $found && $found eq 'W'; |
260 |
$hold->set_waiting() if $found && $found eq 'W'; |
Lines 1102-1107
sub ModReserveFill {
Link Here
|
1102 |
logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) ) |
1104 |
logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) ) |
1103 |
if C4::Context->preference('HoldsLog'); |
1105 |
if C4::Context->preference('HoldsLog'); |
1104 |
|
1106 |
|
|
|
1107 |
# if this hold was part of a group, cancel other holds in the group |
1108 |
my @holds = Koha::Holds->search({ hold_group_id => $hold->hold_group_id }); |
1109 |
foreach my $h ( @holds ) { |
1110 |
$h->cancel unless $h->reserve_id == $hold->reserve_id; |
1111 |
} |
1112 |
|
1105 |
# FIXME Must call Koha::Hold->cancel ? => No, should call ->filled and add the correct log |
1113 |
# FIXME Must call Koha::Hold->cancel ? => No, should call ->filled and add the correct log |
1106 |
Koha::Old::Hold->new( $hold->unblessed() )->store(); |
1114 |
Koha::Old::Hold->new( $hold->unblessed() )->store(); |
1107 |
|
1115 |
|
Lines 1207-1212
sub ModReserveAffect {
Link Here
|
1207 |
while( my $transfer = $transfers->next ){ |
1215 |
while( my $transfer = $transfers->next ){ |
1208 |
$transfer->datearrived( dt_from_string() )->store; |
1216 |
$transfer->datearrived( dt_from_string() )->store; |
1209 |
}; |
1217 |
}; |
|
|
1218 |
|
1219 |
# if this hold was part of a group, cancel other holds in the group |
1220 |
my @holds = Koha::Holds->search({ hold_group_id => $hold->hold_group_id }); |
1221 |
foreach my $h ( @holds ) { |
1222 |
$h->cancel unless $h->reserve_id == $hold->reserve_id; |
1223 |
} |
1210 |
} |
1224 |
} |
1211 |
|
1225 |
|
1212 |
|
1226 |
|