View | Details | Raw Unified | Return to bug 8676
Collapse All | Expand All

(-)a/C4/Biblio.pm (+5 lines)
Lines 98-103 use C4::Debug; Link Here
98
98
99
use Koha::Caches;
99
use Koha::Caches;
100
use Koha::Authority::Types;
100
use Koha::Authority::Types;
101
use Koha::Acquisition::Booksellers;
101
use Koha::Acquisition::Currencies;
102
use Koha::Acquisition::Currencies;
102
use Koha::Biblio::Metadatas;
103
use Koha::Biblio::Metadatas;
103
use Koha::Holds;
104
use Koha::Holds;
Lines 1363-1368 descriptions rather than normal ones when they exist. Link Here
1363
sub GetAuthorisedValueDesc {
1364
sub GetAuthorisedValueDesc {
1364
    my ( $tag, $subfield, $value, $framework, $tagslib, $category, $opac ) = @_;
1365
    my ( $tag, $subfield, $value, $framework, $tagslib, $category, $opac ) = @_;
1365
1366
1367
    if ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.booksellerid' ) {
1368
        my $vendor = Koha::Acquisition::Booksellers->find($value);
1369
        return $vendor ? $vendor->name : $value;
1370
    }
1366
    if ( !$category ) {
1371
    if ( !$category ) {
1367
1372
1368
        return $value unless defined $tagslib->{$tag}->{$subfield}->{'authorised_value'};
1373
        return $value unless defined $tagslib->{$tag}->{$subfield}->{'authorised_value'};
(-)a/cataloguing/additem.pl (-2 / +19 lines)
Lines 333-339 sub generate_subfield_form { Link Here
333
                id          => $subfield_data{id},
333
                id          => $subfield_data{id},
334
                value       => $value,
334
                value       => $value,
335
            };
335
            };
336
        } else {
336
        }
337
        elsif ($value && $subfieldlib->{kohafield} eq 'items.booksellerid' ) {
338
            # It's linked with items.booksellerid (expected for "Source of acquisition")
339
            my $vendors = Koha::Acquisition::Booksellers->search;
340
            my @authorised_values;
341
            my %authorised_lib;
342
            while ( my $vendor = $vendors->next ) {
343
                push @authorised_values, $vendor->id;
344
                $authorised_lib{$vendor->id} = $vendor->name;
345
            }
346
            $subfield_data{marc_value} = {
347
                type     => 'select',
348
                id       => "tag_".$tag."_subfield_".$subfieldtag."_".$index_subfield,
349
                values   => \@authorised_values,
350
                labels   => \%authorised_lib,
351
                default  => $value,
352
            };
353
        }
354
        else {
337
            # it's a standard field
355
            # it's a standard field
338
            $subfield_data{marc_value} = {
356
            $subfield_data{marc_value} = {
339
                type        => 'text',
357
                type        => 'text',
340
- 

Return to bug 8676