Lines 372-379
sub draw_label_text {
Link Here
|
372 |
my $font = $self->{'font'}; |
372 |
my $font = $self->{'font'}; |
373 |
my $item = _get_label_item($self->{'item_number'}); |
373 |
my $item = _get_label_item($self->{'item_number'}); |
374 |
my $label_fields = _get_text_fields($self->{'format_string'}); |
374 |
my $label_fields = _get_text_fields($self->{'format_string'}); |
375 |
my $biblio = Koha::Biblios->find($item->{biblionumber}); |
375 |
my $biblio = Koha::Biblios->find($item->{'biblionumber'}); |
376 |
my $record = $biblio->metadata->record; |
376 |
my $record; |
|
|
377 |
if (defined $biblio) { |
378 |
$record = $biblio->metadata->record; |
379 |
} |
377 |
# FIXME - returns all items, so you can't get data from an embedded holdings field. |
380 |
# FIXME - returns all items, so you can't get data from an embedded holdings field. |
378 |
# TODO - add a GetMarcBiblio1item(bibnum,itemnum) or a GetMarcItem(itemnum). |
381 |
# TODO - add a GetMarcBiblio1item(bibnum,itemnum) or a GetMarcItem(itemnum). |
379 |
my $cn_source = ($item->{'cn_source'} ? $item->{'cn_source'} : C4::Context->preference('DefaultClassificationSource')); |
382 |
my $cn_source = ($item->{'cn_source'} ? $item->{'cn_source'} : C4::Context->preference('DefaultClassificationSource')); |
Lines 391-397
sub draw_label_text {
Link Here
|
391 |
$field->{'data'} = C4::Context->preference('item-level_itypes') ? $item->{'itype'} : $item->{'itemtype'}; |
394 |
$field->{'data'} = C4::Context->preference('item-level_itypes') ? $item->{'itype'} : $item->{'itemtype'}; |
392 |
} |
395 |
} |
393 |
else { |
396 |
else { |
394 |
$field->{'data'} = _get_barcode_data($field->{'code'},$item,$record); |
397 |
$field->{'data'} = _get_barcode_data($field->{'code'},$item, $record); |
395 |
} |
398 |
} |
396 |
# Find appropriate font it oblique title selected, except main font is oblique |
399 |
# Find appropriate font it oblique title selected, except main font is oblique |
397 |
if ( ( $field->{'code'} eq 'title' ) and ( $self->{'oblique_title'} == 1 ) ) { |
400 |
if ( ( $field->{'code'} eq 'title' ) and ( $self->{'oblique_title'} == 1 ) ) { |