Lines 55-84
if($itemnumber) {
Link Here
|
55 |
$item->{holdingbranchname} = Koha::Libraries->find($item->{holdingbranch})->branchname; |
55 |
$item->{holdingbranchname} = Koha::Libraries->find($item->{holdingbranch})->branchname; |
56 |
} |
56 |
} |
57 |
|
57 |
|
58 |
if(my $code = GetAuthValCode("items.notforloan", $fw)) { |
58 |
my $av; |
59 |
my $av = Koha::AuthorisedValues->search({ category => $code, authorised_values => $item->{notforloan} }); |
59 |
$av = Koha::AuthorisedValues->search_by_koha_field({ frameworkcode => $fw, kohafield => 'items.notforloan', authorised_value => $item->{notforloan} }); |
60 |
$item->{notforloan} = $av->count ? $av->next->lib : ''; |
60 |
$item->{notforloan} = $av->count ? $av->next->lib : ''; |
61 |
} |
|
|
62 |
|
61 |
|
63 |
if(my $code = GetAuthValCode("items.restricted", $fw)) { |
62 |
$av = Koha::AuthorisedValues->search_by_koha_field({ frameworkcode => $fw, kohafield => 'items.restricted', authorised_value => $item->{restricted} }); |
64 |
my $av = Koha::AuthorisedValues->search({ category => $code, authorised_values => $item->{restricted} }); |
63 |
$item->{restricted} = $av->count ? $av->next->lib : ''; |
65 |
$item->{restricted} = $av->count ? $av->next->lib : ''; |
|
|
66 |
} |
67 |
|
64 |
|
68 |
if(my $code = GetAuthValCode("items.location", $fw)) { |
65 |
$av = Koha::AuthorisedValues->search_by_koha_field({ frameworkcode => $fw, kohafield => 'items.location', authorised_value => $item->{location} }); |
69 |
my $av = Koha::AuthorisedValues->search({ category => $code, authorised_values => $item->{location} }); |
66 |
$item->{location} = $av->count ? $av->next->lib : ''; |
70 |
$item->{location} = $av->count ? $av->next->lib : ''; |
|
|
71 |
} |
72 |
|
67 |
|
73 |
if(my $code = GetAuthValCode("items.ccode", $fw)) { |
68 |
$av = Koha::AuthorisedValues->search_by_koha_field({ frameworkcode => $fw, kohafield => 'items.collection', authorised_value => $item->{collection} }); |
74 |
my $av = Koha::AuthorisedValues->search({ category => $code, authorised_values => $item->{collection} }); |
69 |
$item->{collection} = $av->count ? $av->next->lib : ''; |
75 |
$item->{collection} = $av->count ? $av->next->lib : ''; |
|
|
76 |
} |
77 |
|
70 |
|
78 |
if(my $code = GetAuthValCode("items.materials", $fw)) { |
71 |
$av = Koha::AuthorisedValues->search_by_koha_field({ frameworkcode => $fw, kohafield => 'items.materials', authorised_value => $item->{materials} }); |
79 |
my $av = Koha::AuthorisedValues->search({ category => $code, authorised_values => $item->{materials} }); |
72 |
$item->{materials} = $av->count ? $av->next->lib : ''; |
80 |
$item->{materials} = $av->count ? $av->next->lib : ''; |
|
|
81 |
} |
82 |
|
73 |
|
83 |
my $itemtype = getitemtypeinfo($item->{itype}); |
74 |
my $itemtype = getitemtypeinfo($item->{itype}); |
84 |
$item->{itemtype} = $itemtype->{description}; |
75 |
$item->{itemtype} = $itemtype->{description}; |