Lines 71-77
unshift @$frameworks, { frameworkcode => '' };
Link Here
|
71 |
|
71 |
|
72 |
for my $fwk ( @$frameworks ){ |
72 |
for my $fwk ( @$frameworks ){ |
73 |
my $fwkcode = $fwk->{frameworkcode}; |
73 |
my $fwkcode = $fwk->{frameworkcode}; |
74 |
my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fwkcode, kohafield => 'items.location', authorised_value => { not => undef } }); |
74 |
my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fwkcode, kohafield => 'items.location', authorised_value => [ -and => {'!=' => undef }, {'!=' => ''}] }); |
75 |
my $authcode = $mss->count ? $mss->next->authorised_value : undef; |
75 |
my $authcode = $mss->count ? $mss->next->authorised_value : undef; |
76 |
if ($authcode && $authorisedvalue_categories!~/\b$authcode\W/){ |
76 |
if ($authcode && $authorisedvalue_categories!~/\b$authcode\W/){ |
77 |
$authorisedvalue_categories.="$authcode "; |
77 |
$authorisedvalue_categories.="$authcode "; |
Lines 88-94
my @notforloans;
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, authorised_value => { not => undef } }); |
91 |
my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => '', kohafield => $statfield, authorised_value => [ -and => {'!=' => 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 |
- |
|
|