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 <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 620ae78f84)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
Paul Poulain 2011-03-16 12:06:37 +01:00 committed by Chris Nighswonger
parent e77a2d82ae
commit 1a65632c1d
1 changed files with 9 additions and 1 deletions

View File

@ -754,7 +754,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;
@ -2264,6 +2264,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;