@@ -, +, @@ --- C4/Labels/Label.pm | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) --- a/C4/Labels/Label.pm +++ a/C4/Labels/Label.pm @@ -94,6 +94,19 @@ sub _get_label_item { my $data1 = $sth1->fetchrow_hashref; $data->{'itemtype'} = $data1->{'description'}; $data->{'itype'} = $data1->{'description'}; + #Replace item's branch codes with branch names + if ($data->{'homebranch'} || $data->{'holdingbranch'}){ + require C4::Branch; + $data->{'homebranch'} = C4::Branch::GetBranchName($data->{'homebranch'}) if $data->{'homebranch'}; + $data->{'holdingbranch'} = C4::Branch::GetBranchName($data->{'holdingbranch'}) if $data->{'holdingbranch'}; + } + #Replace ccode, location, permanent_location with descriptions + my $ccode = C4::Biblio::GetAuthorisedValueDesc('','', $data->{'ccode'} ,'','','CCODE', 1); + $data->{'ccode'} = $ccode if $ccode; + my $location = C4::Biblio::GetAuthorisedValueDesc('','', $data->{'location'} ,'','','LOC', 1); + $data->{'location'} = $location if $location; + my $permanent_location = C4::Biblio::GetAuthorisedValueDesc('','', $data->{'permanent_location'} ,'','','LOC', 1); + $data->{'permanent_location'} = $permanent_location if $permanent_location; $barcode_only ? return $data->{'barcode'} : return $data; } --