From 276205fe0b26b83fc170e36f6a18ce56af652b70 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Tue, 25 Aug 2015 12:19:19 +0200 Subject: [PATCH] Bug 12670: Show materials label in checkin/checkout messages --- circ/circulation.pl | 7 ++++++- circ/returns.pl | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 8b2d8d8..aa87bb6 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -357,7 +357,12 @@ if ($barcode) { unless($issueconfirmed){ # Get the item title for more information my $getmessageiteminfo = GetBiblioFromItemNumber(undef,$barcode); - $template->{VARS}->{'additional_materials'} = $getmessageiteminfo->{'materials'}; + my $materials = $getmessageiteminfo->{'materials'}; + my $avcode = GetAuthValCode('items.materials'); + if ($avcode) { + $materials = GetKohaAuthorisedValueLib($avcode, $materials); + } + $template->{VARS}->{'additional_materials'} = $materials; $template->param( itemhomebranch => $getmessageiteminfo->{'homebranch'} ); # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed. diff --git a/circ/returns.pl b/circ/returns.pl index 4a13711..6138bf9 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -279,6 +279,12 @@ if ($barcode) { my $hbr = GetBranchItemRule($biblio->{'homebranch'}, $itemtype)->{'returnbranch'} || "homebranch"; my $returnbranch = $biblio->{$hbr} ; + my $materials = $biblio->{'materials'}; + my $avcode = GetAuthValCode('items.materials'); + if ($avcode) { + $materials = GetKohaAuthorisedValueLib($avcode, $materials); + } + $template->param( title => $biblio->{'title'}, homebranch => $biblio->{'homebranch'}, @@ -290,7 +296,7 @@ if ($barcode) { itembiblionumber => $biblio->{'biblionumber'}, biblionumber => $biblio->{'biblionumber'}, borrower => $borrower, - additional_materials => $biblio->{'materials'}, + additional_materials => $materials, ); my %input = ( -- 1.9.1