|
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 1111-1116
sub ModReserveFill {
Link Here
|
| 1111 |
logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) ) |
1113 |
logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) ) |
| 1112 |
if C4::Context->preference('HoldsLog'); |
1114 |
if C4::Context->preference('HoldsLog'); |
| 1113 |
|
1115 |
|
|
|
1116 |
# if this hold was part of a group, cancel other holds in the group |
| 1117 |
my @holds = Koha::Holds->search({ hold_group_id => $hold->hold_group_id }); |
| 1118 |
foreach my $h ( @holds ) { |
| 1119 |
$h->cancel unless $h->reserve_id == $hold->reserve_id; |
| 1120 |
} |
| 1121 |
|
| 1114 |
# FIXME Must call Koha::Hold->cancel ? => No, should call ->filled and add the correct log |
1122 |
# FIXME Must call Koha::Hold->cancel ? => No, should call ->filled and add the correct log |
| 1115 |
Koha::Old::Hold->new( $hold->unblessed() )->store(); |
1123 |
Koha::Old::Hold->new( $hold->unblessed() )->store(); |
| 1116 |
|
1124 |
|
|
Lines 1214-1219
sub ModReserveAffect {
Link Here
|
| 1214 |
# Complete transfer if one exists |
1222 |
# Complete transfer if one exists |
| 1215 |
my $transfer = $hold->item->get_transfer; |
1223 |
my $transfer = $hold->item->get_transfer; |
| 1216 |
$transfer->receive if $transfer; |
1224 |
$transfer->receive if $transfer; |
|
|
1225 |
|
| 1226 |
# if this hold was part of a group, cancel other holds in the group |
| 1227 |
my @holds = Koha::Holds->search({ hold_group_id => $hold->hold_group_id }); |
| 1228 |
foreach my $h ( @holds ) { |
| 1229 |
$h->cancel unless $h->reserve_id == $hold->reserve_id; |
| 1230 |
} |
| 1217 |
} |
1231 |
} |
| 1218 |
|
1232 |
|
| 1219 |
_FixPriority( { biblionumber => $biblionumber } ); |
1233 |
_FixPriority( { biblionumber => $biblionumber } ); |