Lines 55-75
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 |
my $av; |
58 |
my $descriptions; |
59 |
$av = Koha::AuthorisedValues->find_by_koha_field({ frameworkcode => $fw, kohafield => 'items.notforloan', authorised_value => $item->{notforloan} }); |
59 |
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field({ frameworkcode => $fw, kohafield => 'items.notforloan', authorised_value => $item->{notforloan} }); |
60 |
$item->{notforloan} = $av ? $av->lib : ''; |
60 |
$item->{notforloan} = $descriptions->{lib} // ''; |
61 |
|
61 |
|
62 |
$av = Koha::AuthorisedValues->find_by_koha_field({ frameworkcode => $fw, kohafield => 'items.restricted', authorised_value => $item->{restricted} }); |
62 |
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field({ frameworkcode => $fw, kohafield => 'items.restricted', authorised_value => $item->{restricted} }); |
63 |
$item->{restricted} = $av ? $av->lib : ''; |
63 |
$item->{restricted} = $descriptions->{lib} // ''; |
64 |
|
64 |
|
65 |
$av = Koha::AuthorisedValues->find_by_koha_field({ frameworkcode => $fw, kohafield => 'items.location', authorised_value => $item->{location} }); |
65 |
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field({ frameworkcode => $fw, kohafield => 'items.location', authorised_value => $item->{location} }); |
66 |
$item->{location} = $av ? $av->lib : ''; |
66 |
$item->{location} = $descriptions->{lib} // ''; |
67 |
|
67 |
|
68 |
$av = Koha::AuthorisedValues->find_by_koha_field({ frameworkcode => $fw, kohafield => 'items.collection', authorised_value => $item->{collection} }); |
68 |
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field({ frameworkcode => $fw, kohafield => 'items.collection', authorised_value => $item->{collection} }); |
69 |
$item->{collection} = $av ? $av->lib : ''; |
69 |
$item->{collection} = $descriptions->{lib} // ''; |
70 |
|
70 |
|
71 |
$av = Koha::AuthorisedValues->find_by_koha_field({ frameworkcode => $fw, kohafield => 'items.materials', authorised_value => $item->{materials} }); |
71 |
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field({ frameworkcode => $fw, kohafield => 'items.materials', authorised_value => $item->{materials} }); |
72 |
$item->{materials} = $av ? $av->lib : ''; |
72 |
$item->{materials} = $descriptions->{lib} // ''; |
73 |
|
73 |
|
74 |
my $itemtype = getitemtypeinfo($item->{itype}); |
74 |
my $itemtype = getitemtypeinfo($item->{itype}); |
75 |
$item->{itemtype} = $itemtype->{description}; |
75 |
$item->{itemtype} = $itemtype->{description}; |