From ffb17a2914c43e536155856a86fed374b7f26e9c 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 Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer Signed-off-by: Brendan A Gallagher --- 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 e527b7ecd6..2bda49b16b 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -390,7 +390,12 @@ if (@$barcodes) { my $confirm_required = 0; unless($issueconfirmed){ # Get the item title for more information - $template_params->{additional_materials} = $iteminfo->{'materials'}; + my $materials = $iteminfo->{'materials'}; + my $avcode = GetAuthValCode('items.materials'); + if ($avcode) { + $materials = GetKohaAuthorisedValueLib($avcode, $materials); + } + $template_params->{additional_materials} = $materials; $template_params->{itemhomebranch} = $iteminfo->{'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 9293572afd..2f09b80da4 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -277,6 +277,12 @@ if ($barcode) { my $hbr = GetBranchItemRule($biblio->{'homebranch'}, $itemtype ? $itemtype->itemtype : undef )->{'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'}, @@ -289,7 +295,7 @@ if ($barcode) { itembiblionumber => $biblio->{'biblionumber'}, biblionumber => $biblio->{'biblionumber'}, borrower => $borrower, - additional_materials => $biblio->{'materials'}, + additional_materials => $materials, ); my %input = ( -- 2.39.5