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