X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FLabels%2FLabel.pm;h=0aec0a6d161844cde19516270241710f6fbd3398;hb=36e4f1c2acde7aff0742a5eaab511a9da6c9ecc4;hp=0ea2de93cb05e7fb4a6ffec687b4897026bfaf71;hpb=ce5e2429db712951724156c8c7bc7a417bd4d42d;p=koha_gimpoz diff --git a/C4/Labels/Label.pm b/C4/Labels/Label.pm index 0ea2de93cb..0aec0a6d16 100644 --- a/C4/Labels/Label.pm +++ b/C4/Labels/Label.pm @@ -100,7 +100,9 @@ sub _get_text_fields { my $format_string = shift; my $csv = Text::CSV_XS->new({allow_whitespace => 1}); my $status = $csv->parse($format_string); - my @sorted_fields = map {{ 'code' => $_, desc => $_ }} $csv->fields(); + my @sorted_fields = map {{ 'code' => $_, desc => $_ }} + map { $_ eq 'callnumber' ? 'itemcallnumber' : $_ } # see bug 5653 + $csv->fields(); my $error = $csv->error_input(); warn sprintf('Text field sort failed with this error: %s', $error) if $error; return \@sorted_fields; @@ -271,7 +273,7 @@ sub _BIB { sub _BAR { my $self = shift; - my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'}; # this places the bottom left of the barcode the left text margin distance to right of the the left edge of the label ($llx) + my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'}; # this places the bottom left of the barcode the left text margin distance to right of the left edge of the label ($llx) my $barcode_lly = $self->{'lly'} + $self->{'top_text_margin'}; # this places the bottom left of the barcode the top text margin distance above the bottom of the label ($lly) my $barcode_width = 0.8 * $self->{'width'}; # this scales the barcode width to 80% of the label width my $barcode_y_scale_factor = 0.01 * $self->{'height'}; # this scales the barcode height to 10% of the label height @@ -280,7 +282,7 @@ sub _BAR { sub _BIBBAR { my $self = shift; - my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'}; # this places the bottom left of the barcode the left text margin distance to right of the the left edge of the label ($self->{'llx'}) + my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'}; # this places the bottom left of the barcode the left text margin distance to right of the left edge of the label ($self->{'llx'}) my $barcode_lly = $self->{'lly'} + $self->{'top_text_margin'}; # this places the bottom left of the barcode the top text margin distance above the bottom of the label ($lly) my $barcode_width = 0.8 * $self->{'width'}; # this scales the barcode width to 80% of the label width my $barcode_y_scale_factor = 0.01 * $self->{'height'}; # this scales the barcode height to 10% of the label height @@ -292,7 +294,7 @@ sub _BIBBAR { sub _BARBIB { my $self = shift; - my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'}; # this places the bottom left of the barcode the left text margin distance to right of the the left edge of the label ($self->{'llx'}) + my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'}; # this places the bottom left of the barcode the left text margin distance to right of the left edge of the label ($self->{'llx'}) my $barcode_lly = ($self->{'lly'} + $self->{'height'}) - $self->{'top_text_margin'}; # this places the bottom left of the barcode the top text margin distance below the top of the label ($self->{'lly'}) my $barcode_width = 0.8 * $self->{'width'}; # this scales the barcode width to 80% of the label width my $barcode_y_scale_factor = 0.01 * $self->{'height'}; # this scales the barcode height to 10% of the label height @@ -408,7 +410,7 @@ sub draw_label_text { # Fields which hold call number data FIXME: ( 060? 090? 092? 099? ) my @callnumber_list = qw(itemcallnumber 050a 050b 082a 952o 995k); if ((grep {$field->{'code'} =~ m/$_/} @callnumber_list) and ($self->{'printing_type'} eq 'BIB') and ($self->{'callnum_split'})) { # If the field contains the call number, we do some sp - if ($cn_source eq 'lcc') { + if ($cn_source eq 'lcc' || $cn_source eq 'nlm') { # NLM and LCC should be split the same way @label_lines = _split_lccn($field_data); @label_lines = _split_ccn($field_data) if !@label_lines; # If it was not a true lccn, try it as a custom call number push (@label_lines, $field_data) if !@label_lines; # If it was not that, send it on unsplit