Lines 23-28
use warnings;
Link Here
|
23 |
use CGI qw ( -utf8 ); |
23 |
use CGI qw ( -utf8 ); |
24 |
use Data::Dumper; |
24 |
use Data::Dumper; |
25 |
|
25 |
|
|
|
26 |
use C4::Context; |
26 |
use C4::Auth qw(get_template_and_user); |
27 |
use C4::Auth qw(get_template_and_user); |
27 |
use C4::Output qw(output_html_with_http_headers); |
28 |
use C4::Output qw(output_html_with_http_headers); |
28 |
use C4::Creators::Lib qw(get_all_templates get_all_layouts get_output_formats); |
29 |
use C4::Creators::Lib qw(get_all_templates get_all_layouts get_output_formats); |
Lines 111-116
if ($op eq 'export') {
Link Here
|
111 |
); |
112 |
); |
112 |
} |
113 |
} |
113 |
elsif ($from and $to) { |
114 |
elsif ($from and $to) { |
|
|
115 |
my $dbh = C4::Context->dbh; |
116 |
|
117 |
my $sth = $dbh->prepare('SELECT COUNT(*) AS has_barcode FROM creator_layouts WHERE printing_type LIKE("%BAR%") AND layout_id = ?;'); |
118 |
$sth->execute($layout_id); |
119 |
if ($sth->fetchrow_hashref->{'has_barcode'} == 0) { |
120 |
$sth = $dbh->prepare('SELECT COUNT(*) AS existing_count FROM items WHERE CAST(barcode AS unsigned) BETWEEN ? AND ?;'); |
121 |
$sth->execute($from, $to); |
122 |
if ($sth->fetchrow_hashref->{'existing_count'} < ($to - $from + 1)) { |
123 |
$template->param( warn_empty_range => 1 ) |
124 |
} |
125 |
} |
126 |
|
114 |
push (@batches, {create_script => 'label-create-pdf.pl', |
127 |
push (@batches, {create_script => 'label-create-pdf.pl', |
115 |
from => $from, |
128 |
from => $from, |
116 |
to => $to, |
129 |
to => $to, |
117 |
- |
|
|