| Lines 561-569
          RECORD: foreach my $record (@{$marc_records}) {
      
      
        Link Here | 
        
          | 561 |             if ($record_id) { | 561 |             if ($record_id) { | 
        
          | 562 |                 $yamlhash->{$originalid} = $record_id if $yamlfile; | 562 |                 $yamlhash->{$originalid} = $record_id if $yamlfile; | 
        
          | 563 |                 eval { ($itemnumbers_ref, $errors_ref) = AddItemBatchFromMarc($record, $record_id, $biblioitemnumber, $framework); }; | 563 |                 eval { ($itemnumbers_ref, $errors_ref) = AddItemBatchFromMarc($record, $record_id, $biblioitemnumber, $framework); }; | 
            
              |  |  | 564 |                 my $error_adding = $@; | 
        
          | 564 |                 $record_has_added_items = @{$itemnumbers_ref}; | 565 |                 $record_has_added_items = @{$itemnumbers_ref}; | 
        
          | 565 |  | 566 |  | 
            
              | 566 |                 my $error_adding = $@; |  |  | 
        
          | 567 |                 # Work on a clone so that if there are real errors, we can maybe | 567 |                 # Work on a clone so that if there are real errors, we can maybe | 
        
          | 568 |                 # fix them up later. | 568 |                 # fix them up later. | 
        
          | 569 |                 my $clone_record = $record->clone(); | 569 |                 my $clone_record = $record->clone(); | 
  
    | Lines 632-638
          RECORD: foreach my $record (@{$marc_records}) {
      
      
        Link Here | 
        
          | 632 |                 if (@{$errors_ref}) { | 632 |                 if (@{$errors_ref}) { | 
        
          | 633 |                     report_item_errors($record_id, $errors_ref); | 633 |                     report_item_errors($record_id, $errors_ref); | 
        
          | 634 |                 } | 634 |                 } | 
          
            
              | 635 |                 C4::Biblio::_strip_item_fields($record, $framework); | 635 |  | 
        
          | 636 |                 my $biblio = Koha::Biblios->find($record_id); | 636 |                 my $biblio = Koha::Biblios->find($record_id); | 
        
          | 637 |                 $record = $biblio->metadata->record( { embed_items => 1 } ); | 637 |                 $record = $biblio->metadata->record( { embed_items => 1 } ); | 
        
          | 638 |  | 638 |  | 
            
              | 639 | -  |  |  |