Lines 29-34
use Koha::SearchMarcMaps;
Link Here
|
29 |
use Koha::Caches; |
29 |
use Koha::Caches; |
30 |
use C4::Heading; |
30 |
use C4::Heading; |
31 |
use C4::AuthoritiesMarc; |
31 |
use C4::AuthoritiesMarc; |
|
|
32 |
use C4::Biblio; |
32 |
|
33 |
|
33 |
use Carp; |
34 |
use Carp; |
34 |
use Clone qw(clone); |
35 |
use Clone qw(clone); |
Lines 706-712
sub marc_records_to_documents {
Link Here
|
706 |
|
707 |
|
707 |
# Check if there is at least one available item |
708 |
# Check if there is at least one available item |
708 |
if ($self->index eq $BIBLIOS_INDEX) { |
709 |
if ($self->index eq $BIBLIOS_INDEX) { |
709 |
my $biblio = Koha::Biblios->find($record->field('001')->data); |
710 |
my ($tag, $code) = GetMarcFromKohaField('biblio.biblionumber'); |
|
|
711 |
my $field = $record->field($tag); |
712 |
my $biblionumber = $field->is_control_field ? $field->data : $field->subfield($code); |
713 |
my $biblio = Koha::Biblios->find($biblionumber); |
710 |
my $items = $biblio->items; |
714 |
my $items = $biblio->items; |
711 |
my $available = 0; |
715 |
my $available = 0; |
712 |
while (my $item = $items->next) { |
716 |
while (my $item = $items->next) { |
713 |
- |
|
|