Lines 707-712
sub marc_records_to_documents {
Link Here
|
707 |
$record_document->{'marc_format'} = 'base64ISO2709'; |
707 |
$record_document->{'marc_format'} = 'base64ISO2709'; |
708 |
} |
708 |
} |
709 |
} |
709 |
} |
|
|
710 |
|
711 |
# Check if there is at least one available item |
712 |
if ($self->index eq $BIBLIOS_INDEX) { |
713 |
my $biblio = Koha::Biblios->find($record->field('001')->data); |
714 |
my $items = $biblio->items; |
715 |
my $available = 0; |
716 |
while (my $item = $items->next) { |
717 |
next if $item->onloan; |
718 |
next if $item->notforloan; |
719 |
next if $item->withdrawn; |
720 |
next if $item->itemlost; |
721 |
next if $item->damaged; |
722 |
|
723 |
$available = 1; |
724 |
last; |
725 |
} |
726 |
|
727 |
$record_document->{available} = $available ? \1 : \0; |
728 |
} |
729 |
|
710 |
push @record_documents, $record_document; |
730 |
push @record_documents, $record_document; |
711 |
} |
731 |
} |
712 |
return \@record_documents; |
732 |
return \@record_documents; |