Lines 1363-1372
descriptions rather than normal ones when they exist.
Link Here
|
1363 |
sub GetAuthorisedValueDesc { |
1363 |
sub GetAuthorisedValueDesc { |
1364 |
my ( $tag, $subfield, $value, $framework, $tagslib, $category, $opac ) = @_; |
1364 |
my ( $tag, $subfield, $value, $framework, $tagslib, $category, $opac ) = @_; |
1365 |
|
1365 |
|
1366 |
if ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.booksellerid' ) { |
|
|
1367 |
my $vendor = Koha::Acquisition::Booksellers->find($value); |
1368 |
return $vendor ? $vendor->name : $value; |
1369 |
} |
1370 |
if ( !$category ) { |
1366 |
if ( !$category ) { |
1371 |
|
1367 |
|
1372 |
return $value unless defined $tagslib->{$tag}->{$subfield}->{'authorised_value'}; |
1368 |
return $value unless defined $tagslib->{$tag}->{$subfield}->{'authorised_value'}; |
Lines 1387-1392
sub GetAuthorisedValueDesc {
Link Here
|
1387 |
$category = $tagslib->{$tag}->{$subfield}->{'authorised_value'}; |
1383 |
$category = $tagslib->{$tag}->{$subfield}->{'authorised_value'}; |
1388 |
} |
1384 |
} |
1389 |
|
1385 |
|
|
|
1386 |
if ( $tagslib && $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.booksellerid' ) { |
1387 |
my $vendor = Koha::Acquisition::Booksellers->find($value); |
1388 |
return $vendor ? $vendor->name : $value; |
1389 |
} |
1390 |
|
1390 |
my $dbh = C4::Context->dbh; |
1391 |
my $dbh = C4::Context->dbh; |
1391 |
if ( $category ne "" ) { |
1392 |
if ( $category ne "" ) { |
1392 |
my $sth = $dbh->prepare( "SELECT lib, lib_opac FROM authorised_values WHERE category = ? AND authorised_value = ?" ); |
1393 |
my $sth = $dbh->prepare( "SELECT lib, lib_opac FROM authorised_values WHERE category = ? AND authorised_value = ?" ); |
1393 |
- |
|
|