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

(-)a/labels/label-create-csv.pl (-3 / +2 lines)
Lines 72-78 else { Link Here
72
72
73
my $csv = Text::CSV_XS->new();
73
my $csv = Text::CSV_XS->new();
74
74
75
CSV_ITEMS:
76
foreach my $item (@$items) {
75
foreach my $item (@$items) {
77
    my $label = C4::Labels::Label->new(
76
    my $label = C4::Labels::Label->new(
78
                                    batch_id            => $batch_id,
77
                                    batch_id            => $batch_id,
Lines 85-95 foreach my $item (@$items) { Link Here
85
    }
84
    }
86
    else {
85
    else {
87
        warn sprintf('Text::CSV_XS->combine() returned the following error: %s', $csv->error_input);
86
        warn sprintf('Text::CSV_XS->combine() returned the following error: %s', $csv->error_input);
88
        next CSV_ITEMS;
89
    }
87
    }
90
}
88
}
91
89
92
exit(1);
90
__END__
93
91
94
=head1 NAME
92
=head1 NAME
95
93
Lines 122-124 Fifth Floor, Boston, MA 02110-1301 USA. Link Here
122
Koha is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
120
Koha is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
123
A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
121
A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
124
122
123
=cut
(-)a/labels/label-create-pdf.pl (-3 / +3 lines)
Lines 58-66 print $cgi->header( -type => 'application/pdf', Link Here
58
                    -attachment => "$pdf_file.pdf",
58
                    -attachment => "$pdf_file.pdf",
59
                  );
59
                  );
60
60
61
my $pdf = C4::Creators::PDF->new(InitVars => 0);
61
our $pdf = C4::Creators::PDF->new(InitVars => 0);
62
my $batch = C4::Labels::Batch->retrieve(batch_id => $batch_id);
62
my $batch = C4::Labels::Batch->retrieve(batch_id => $batch_id);
63
my $template = C4::Labels::Template->retrieve(template_id => $template_id, profile_id => 1);
63
our $template = C4::Labels::Template->retrieve(template_id => $template_id, profile_id => 1);
64
my $layout = C4::Labels::Layout->retrieve(layout_id => $layout_id);
64
my $layout = C4::Labels::Layout->retrieve(layout_id => $layout_id);
65
65
66
sub _calc_next_label_pos {
66
sub _calc_next_label_pos {
Lines 205-211 foreach my $item (@{$items}) { Link Here
205
205
206
$pdf->End();
206
$pdf->End();
207
207
208
exit(1);
208
__END__
209
209
210
=head1 NAME
210
=head1 NAME
211
211
(-)a/labels/label-create-xml.pl (-3 / +2 lines)
Lines 74-80 my $xml_data = {'label' => []}; Link Here
74
74
75
my $item_count = 0;
75
my $item_count = 0;
76
76
77
XML_ITEMS:
78
foreach my $item (@$items) {
77
foreach my $item (@$items) {
79
    push(@{$xml_data->{'label'}}, {'item_number' => $item->{'item_number'}});
78
    push(@{$xml_data->{'label'}}, {'item_number' => $item->{'item_number'}});
80
    my $label = C4::Labels::Label->new(
79
    my $label = C4::Labels::Label->new(
Lines 98-104 my $xml_out = $xml->XMLout($xml_data); Link Here
98
#die "XML OUT:\n" . Dumper($xml_out);
97
#die "XML OUT:\n" . Dumper($xml_out);
99
print $xml_out;
98
print $xml_out;
100
99
101
exit(1);
100
__END__
102
101
103
=head1 NAME
102
=head1 NAME
104
103
Lines 132-134 Fifth Floor, Boston, MA 02110-1301 USA. Link Here
132
Koha is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
131
Koha is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
133
A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
132
A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
134
133
135
- 
134
=cut

Return to bug 8482