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