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

(-)a/Koha/SearchEngine/Elasticsearch.pm (-2 / +5 lines)
Lines 30-35 use Koha::SearchMarcMaps; Link Here
30
use Koha::Caches;
30
use Koha::Caches;
31
use C4::Heading;
31
use C4::Heading;
32
use C4::AuthoritiesMarc qw( GuessAuthTypeCode );
32
use C4::AuthoritiesMarc qw( GuessAuthTypeCode );
33
use C4::Biblio;
33
34
34
use Carp qw( carp croak );
35
use Carp qw( carp croak );
35
use Clone qw( clone );
36
use Clone qw( clone );
Lines 773-779 sub marc_records_to_documents { Link Here
773
774
774
        # Check if there is at least one available item
775
        # Check if there is at least one available item
775
        if ($self->index eq $BIBLIOS_INDEX) {
776
        if ($self->index eq $BIBLIOS_INDEX) {
776
            my $biblio = Koha::Biblios->find($record->field('001')->data);
777
            my ($tag, $code) = C4::Biblio::GetMarcFromKohaField('biblio.biblionumber');
778
            my $field = $record->field($tag);
779
            my $biblionumber = $field->is_control_field ? $field->data : $field->subfield($code);
780
            my $biblio = Koha::Biblios->find($biblionumber);
777
            my $items = $biblio->items;
781
            my $items = $biblio->items;
778
            my $available = 0;
782
            my $available = 0;
779
            while (my $item = $items->next) {
783
            while (my $item = $items->next) {
780
- 

Return to bug 25375