From c6ab8e78b031201479f3f023157152ee6df9b659 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 1781880..2153f0c 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2783,6 +2783,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