| 
      
            Lines 16-21
          package Koha::UI::Form::Builder::Item;
      
      
        Link Here
      
     | 
  
        
          | 16 | 
          # along with Koha; if not, see <http://www.gnu.org/licenses>.  | 
          16 | 
          # along with Koha; if not, see <http://www.gnu.org/licenses>.  | 
        
        
          | 17 | 
           | 
          17 | 
           | 
        
        
          | 18 | 
          use Modern::Perl;  | 
          18 | 
          use Modern::Perl;  | 
        
            
               | 
               | 
              19 | 
              use List::Util qw( any );  | 
            
        
          | 19 | 
          use MARC::Record;  | 
          20 | 
          use MARC::Record;  | 
        
        
          | 20 | 
          use C4::Context;  | 
          21 | 
          use C4::Context;  | 
        
        
          | 21 | 
          use C4::Biblio qw( GetFrameworkCode GetMarcStructure IsMarcStructureInternal );  | 
          22 | 
          use C4::Biblio qw( GetFrameworkCode GetMarcStructure IsMarcStructureInternal );  | 
        
  
    | 
      
            Lines 224-230
          sub generate_subfield_form {
      
      
        Link Here
      
     | 
  
        
          | 224 | 
                          my $itype_sth = $dbh->prepare(  | 
          225 | 
                          my $itype_sth = $dbh->prepare(  | 
        
        
          | 225 | 
                              "SELECT itemtype FROM biblioitems WHERE biblionumber = ?");  | 
          226 | 
                              "SELECT itemtype FROM biblioitems WHERE biblionumber = ?");  | 
        
        
          | 226 | 
                          $itype_sth->execute($biblionumber);  | 
          227 | 
                          $itype_sth->execute($biblionumber);  | 
        
          
            
              | 227 | 
                              ($value) = $itype_sth->fetchrow_array;  | 
              228 | 
                              my ($biblio_itemtype) = $itype_sth->fetchrow_array;  | 
            
            
               | 
               | 
              229 | 
               | 
            
            
              | 230 | 
                              # Use biblioitems.itemtype as a default value only if it's a valid itemtype  | 
            
            
              | 231 | 
                              if ( any { $_ eq $biblio_itemtype } @authorised_values ) { | 
            
            
              | 232 | 
                                  $value = $biblio_itemtype;  | 
            
            
              | 233 | 
                              }  | 
            
        
          | 228 | 
                      }  | 
          234 | 
                      }  | 
        
        
          | 229 | 
           | 
          235 | 
           | 
        
        
          | 230 | 
                      #---- class_sources  | 
          236 | 
                      #---- class_sources  | 
        
            
              | 231 | 
              -   | 
               | 
               |