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

(-)a/C4/Labels/Label.pm (-3 / +6 lines)
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 ) ) {
(-)a/labels/label-create-pdf.pl (-1 / +1 lines)
Lines 156-161 foreach my $item (@{$items}) { Link Here
156
            ),
156
            ),
157
        );
157
        );
158
        $pdf->Add($label_a->draw_guide_box) if $layout->get_attr('guidebox');
158
        $pdf->Add($label_a->draw_guide_box) if $layout->get_attr('guidebox');
159
        print STDERR "label_a: iffffffff";
159
        my $label_a_text = $label_a->create_label();
160
        my $label_a_text = $label_a->create_label();
160
        _print_text($label_a_text);
161
        _print_text($label_a_text);
161
        ($row_count, $col_count, $llx, $lly) = _calc_next_label_pos($row_count, $col_count, $llx, $lly);
162
        ($row_count, $col_count, $llx, $lly) = _calc_next_label_pos($row_count, $col_count, $llx, $lly);
162
- 

Return to bug 34157