| 
      
            Lines 423-428
          my $prefillitem = C4::Context->preference('PrefillItem');
      
      
        Link Here
      
     | 
  
        
          | 423 | 
          if ($op eq "additem") { | 
          423 | 
          if ($op eq "additem") { | 
        
        
          | 424 | 
           | 
          424 | 
           | 
        
        
          | 425 | 
              my $add_submit                 = $input->param('add_submit'); | 
          425 | 
              my $add_submit                 = $input->param('add_submit'); | 
        
            
               | 
               | 
              426 | 
                  my $add_duplicate_submit       = $input->param('add_duplicate_submit'); | 
            
        
          | 426 | 
              my $add_multiple_copies_submit = $input->param('add_multiple_copies_submit'); | 
          427 | 
              my $add_multiple_copies_submit = $input->param('add_multiple_copies_submit'); | 
        
        
          | 427 | 
              my $number_of_copies           = $input->param('number_of_copies'); | 
          428 | 
              my $number_of_copies           = $input->param('number_of_copies'); | 
        
        
          | 428 | 
           | 
          429 | 
           | 
        
  
    | 
      
            Lines 498-504
          if ($op eq "additem") {
      
      
        Link Here
      
     | 
  
        
          | 498 | 
              }  | 
          499 | 
              }  | 
        
        
          | 499 | 
           | 
          500 | 
           | 
        
        
          | 500 | 
              # If we have to add & duplicate  | 
          501 | 
              # If we have to add & duplicate  | 
        
          
            
              | 501 | 
                  if ($prefillitem) { | 
              502 | 
                  if ($prefillitem || $add_duplicate_submit) { | 
            
        
          | 502 | 
           | 
          503 | 
           | 
        
        
          | 503 | 
                  $current_item = $item->unblessed;  | 
          504 | 
                  $current_item = $item->unblessed;  | 
        
        
          | 504 | 
           | 
          505 | 
           | 
        
  
    | 
      
            Lines 510-515
          if ($op eq "additem") {
      
      
        Link Here
      
     | 
  
        
          | 510 | 
                      # we have to clear the barcode field in the duplicate item record to make way for the new one generated by the javascript plugin  | 
          511 | 
                      # we have to clear the barcode field in the duplicate item record to make way for the new one generated by the javascript plugin  | 
        
        
          | 511 | 
                      $current_item->{barcode} = undef; # FIXME or delete? | 
          512 | 
                      $current_item->{barcode} = undef; # FIXME or delete? | 
        
        
          | 512 | 
                  }  | 
          513 | 
                  }  | 
        
            
               | 
               | 
              514 | 
               | 
            
            
              | 515 | 
                      # Don't use the "prefill" feature if we want to generate the form with all the info from this item  | 
            
            
              | 516 | 
                      # It will remove subfields that are not in SubfieldsToUseWhenPrefill.  | 
            
            
              | 517 | 
                      $prefillitem = 0 if $add_duplicate_submit;  | 
            
        
          | 513 | 
              }  | 
          518 | 
              }  | 
        
        
          | 514 | 
           | 
          519 | 
           | 
        
        
          | 515 | 
              # If we have to add multiple copies  | 
          520 | 
              # If we have to add multiple copies  | 
        
            
              | 516 | 
              -   | 
               | 
               |