Lines 1193-1199
sub orders {
Link Here
|
1193 |
|
1193 |
|
1194 |
$item->move_to_biblio($to_biblio[, $params]); |
1194 |
$item->move_to_biblio($to_biblio[, $params]); |
1195 |
|
1195 |
|
1196 |
Move the item to another biblio and update any references also in other tables. |
1196 |
Move the item to another biblio and update any references in other tables. |
1197 |
|
1197 |
|
1198 |
The final optional parameter, C<$params>, is expected to contain the |
1198 |
The final optional parameter, C<$params>, is expected to contain the |
1199 |
'skip_record_index' key, which is relayed down to Koha::Item->store. |
1199 |
'skip_record_index' key, which is relayed down to Koha::Item->store. |
Lines 1238-1244
sub move_to_biblio {
Link Here
|
1238 |
# Holds |
1238 |
# Holds |
1239 |
$self->holds->update({ biblionumber => $to_biblionumber }); |
1239 |
$self->holds->update({ biblionumber => $to_biblionumber }); |
1240 |
|
1240 |
|
1241 |
# hold_fill_target (there's no Koha object available) |
1241 |
# hold_fill_target (there's no Koha object available yet) |
1242 |
my $hold_fill_target = $self->_result->hold_fill_target; |
1242 |
my $hold_fill_target = $self->_result->hold_fill_target; |
1243 |
if ($hold_fill_target) { |
1243 |
if ($hold_fill_target) { |
1244 |
$hold_fill_target->update({ biblionumber => $to_biblionumber }); |
1244 |
$hold_fill_target->update({ biblionumber => $to_biblionumber }); |
Lines 1255-1261
sub move_to_biblio {
Link Here
|
1255 |
} |
1255 |
} |
1256 |
); |
1256 |
); |
1257 |
|
1257 |
|
1258 |
# linktrackers |
1258 |
# linktrackers (there's no Koha object set available yet) |
|
|
1259 |
# direct lookup as there's no foreign key relationship yet |
1259 |
my $schema = Koha::Database->new()->schema(); |
1260 |
my $schema = Koha::Database->new()->schema(); |
1260 |
my $linktrackers = $schema->resultset('Linktracker')->search({ itemnumber => $self->itemnumber }); |
1261 |
my $linktrackers = $schema->resultset('Linktracker')->search({ itemnumber => $self->itemnumber }); |
1261 |
$linktrackers->update_all({ biblionumber => $to_biblionumber }); |
1262 |
$linktrackers->update_all({ biblionumber => $to_biblionumber }); |
1262 |
- |
|
|