From 620ae78f847ba3c42bcbfd0e0f9a530daa79e65b Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Wed, 16 Mar 2011 12:06:37 +0100 Subject: [PATCH] Bug 5879 : Biblio.pm : fix isbd syspref and default location - the systempreference is isbd, not ISBD - when preparing the ItemRecord (for acq or serials recieving), there was no default value calculated for location. Fixing that Signed-off-by: Julian Maurice Signed-off-by: Chris Cormack --- C4/Biblio.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 9cd3d055de..0905b8f452 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -755,7 +755,7 @@ sub GetISBDView { my ( $holdingbrtagf, $holdingbrtagsubf ) = &GetMarcFromKohaField( "items.holdingbranch", $itemtype ); my $tagslib = &GetMarcStructure( 1, $itemtype ); - my $ISBD = C4::Context->preference('ISBD'); + my $ISBD = C4::Context->preference('isbd'); my $bloc = $ISBD; my $res; my $blocres; @@ -2289,6 +2289,14 @@ sub PrepareItemrecordDisplay { $defaultvalue = $defaultvalues->{branchcode} if $defaultvalues; } } + if ( ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.location' ) + && $defaultvalues + && $defaultvalues->{'location'} ) { + my $temp = $itemrecord->field($subfield) if ($itemrecord); + unless ($temp) { + $defaultvalue = $defaultvalues->{location} if $defaultvalues; + } + } if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) { my @authorised_values; my %authorised_lib; -- 2.39.5