Lines 409-415
if ( $op eq "cud-additem" ) {
Link Here
|
409 |
my $testbarcode; |
409 |
my $testbarcode; |
410 |
my $barcodeobj = C4::Barcodes->new; |
410 |
my $barcodeobj = C4::Barcodes->new; |
411 |
$testbarcode = $barcodeobj->next_value($oldbarcode) if $barcodeobj; |
411 |
$testbarcode = $barcodeobj->next_value($oldbarcode) if $barcodeobj; |
412 |
Koha::BackgroundJob->before_batch_action_hooks(); |
412 |
Koha::BackgroundJob->before_batch_action_hooks({ action => 'add_item' }); |
413 |
if ( $oldbarcode && !$testbarcode ) { |
413 |
if ( $oldbarcode && !$testbarcode ) { |
414 |
|
414 |
|
415 |
push @errors, "no_next_barcode"; |
415 |
push @errors, "no_next_barcode"; |
Lines 487-493
if ( $op eq "cud-additem" ) {
Link Here
|
487 |
|
487 |
|
488 |
undef($current_item); |
488 |
undef($current_item); |
489 |
} |
489 |
} |
490 |
Koha::BackgroundJob->after_batch_action_hooks(); |
490 |
Koha::BackgroundJob->after_batch_action_hooks({ action => 'add_item' }); |
491 |
} |
491 |
} |
492 |
if ( $frameworkcode eq 'FA' && $fa_circborrowernumber ) { |
492 |
if ( $frameworkcode eq 'FA' && $fa_circborrowernumber ) { |
493 |
print $input->redirect( '/cgi-bin/koha/circ/circulation.pl?' |
493 |
print $input->redirect( '/cgi-bin/koha/circ/circulation.pl?' |
Lines 551-562
if ( $op eq "cud-additem" ) {
Link Here
|
551 |
|
551 |
|
552 |
#------------------------------------------------------------------------------- |
552 |
#------------------------------------------------------------------------------- |
553 |
my $items = Koha::Items->search( { biblionumber => $biblionumber } ); |
553 |
my $items = Koha::Items->search( { biblionumber => $biblionumber } ); |
554 |
Koha::BackgroundJob->before_batch_action_hooks(); |
554 |
Koha::BackgroundJob->before_batch_action_hooks({ action => 'del_all_item' }); |
555 |
while ( my $item = $items->next ) { |
555 |
while ( my $item = $items->next ) { |
556 |
my $deleted = $item->safe_delete( { skip_record_index => 1 } ); |
556 |
my $deleted = $item->safe_delete( { skip_record_index => 1 } ); |
557 |
push @errors, @{ $deleted->messages }[0]->message unless $deleted; |
557 |
push @errors, @{ $deleted->messages }[0]->message unless $deleted; |
558 |
} |
558 |
} |
559 |
Koha::BackgroundJob->after_batch_action_hooks(); |
559 |
Koha::BackgroundJob->after_batch_action_hooks({ action => 'del_all_item' }); |
560 |
my $indexer = Koha::SearchEngine::Indexer->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
560 |
my $indexer = Koha::SearchEngine::Indexer->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
561 |
$indexer->index_records( $biblionumber, "specialUpdate", "biblioserver" ); |
561 |
$indexer->index_records( $biblionumber, "specialUpdate", "biblioserver" ); |
562 |
if (@errors) { |
562 |
if (@errors) { |