| 
      
            Lines 72-78
          $frameworks->{''} = {frameworkcode => ''}; # Add the default framework
      
      
        Link Here
      
     | 
  
        
          | 72 | 
           | 
          72 | 
           | 
        
        
          | 73 | 
          for my $fwk (keys %$frameworks){ | 
          73 | 
          for my $fwk (keys %$frameworks){ | 
        
        
          | 74 | 
            my $fwkcode = $frameworks->{$fwk}->{'frameworkcode'}; | 
          74 | 
            my $fwkcode = $frameworks->{$fwk}->{'frameworkcode'}; | 
        
          
            
              | 75 | 
                my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fwkcode, kohafield => 'items.location' }); | 
              75 | 
                my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fwkcode, kohafield => 'items.location', authorised_value => { not => undef } }); | 
            
        
          | 76 | 
            my $authcode = $mss->count ? $mss->next->authorised_value : undef;  | 
          76 | 
            my $authcode = $mss->count ? $mss->next->authorised_value : undef;  | 
        
        
          | 77 | 
              if ($authcode && $authorisedvalue_categories!~/\b$authcode\W/){ | 
          77 | 
              if ($authcode && $authorisedvalue_categories!~/\b$authcode\W/){ | 
        
        
          | 78 | 
                $authorisedvalue_categories.="$authcode ";  | 
          78 | 
                $authorisedvalue_categories.="$authcode ";  | 
        
  
    | 
      
            Lines 88-94
          my $statuses = [];
      
      
        Link Here
      
     | 
  
        
          | 88 | 
          for my $statfield (qw/items.notforloan items.itemlost items.withdrawn items.damaged/){ | 
          88 | 
          for my $statfield (qw/items.notforloan items.itemlost items.withdrawn items.damaged/){ | 
        
        
          | 89 | 
              my $hash = {}; | 
          89 | 
              my $hash = {}; | 
        
        
          | 90 | 
              $hash->{fieldname} = $statfield; | 
          90 | 
              $hash->{fieldname} = $statfield; | 
        
          
            
              | 91 | 
                  my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => '', kohafield => $statfield }); | 
              91 | 
                  my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => '', kohafield => $statfield, authorised_value => { not => undef } }); | 
            
        
          | 92 | 
              $hash->{authcode} = $mss->count ? $mss->next->authorised_value : undef; | 
          92 | 
              $hash->{authcode} = $mss->count ? $mss->next->authorised_value : undef; | 
        
        
          | 93 | 
              if ($hash->{authcode}){ | 
          93 | 
              if ($hash->{authcode}){ | 
        
        
          | 94 | 
                  my $arr = GetAuthorisedValues($hash->{authcode}); | 
          94 | 
                  my $arr = GetAuthorisedValues($hash->{authcode}); | 
        
            
              | 95 | 
              -   | 
               | 
               |