# Add new 852 fields
add_bib_holdings($bib, $r);
# Check that at least one 852 was added
- @marc852 = $r->field('852');
- @marc856 = $r->field('856');
+ my @marc852 = $r->field('852');
+ my @marc856 = $r->field('856');
# If not, we should NOT add this item to the export
# ... but we may still want the record if it has an 856
return unless ( @marc852 || ($with_ebooks && @marc856) );
} else {
- add_bib_holdings($bib, $r);
+ add_bib_holdings($bib, $r) if ($holdings);
}
}