From 341dba422ee93fae975504b739eb823dc4263989 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 c183644..bda8732 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2782,6 +2782,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.0.0.rc2