From e5bee8debdba0ee60c65d2d82e4089a4cf306bd8 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Tue, 29 Apr 2014 15:17:21 +0200 Subject: [PATCH] BZ7677 [Follow-up]: New areas in subscriptions and new functions when receiving. - Make the newly received serial gets its default itemtype from the subscription. --- C4/Items.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/Items.pm b/C4/Items.pm index e63ef1b..2dcae50 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2969,6 +2969,9 @@ sub PrepareItemrecordDisplay { while ( my ( $itemtype, $description ) = $sth->fetchrow_array ) { push @authorised_values, $itemtype; $authorised_lib{$itemtype} = $description; + # If we have default value named itemtype or itemtypes, we use it + $defaultvalue = $itemtype if ($defaultvalues and ($defaultvalues->{'itemtypes'} eq $itemtype or $defaultvalues->{'itemtype'} eq $itemtype)); + } #---- class_sources } elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "cn_source" ) { -- 2.1.0