262 |
262 |
my $formname = $::form->{print_options}->{formname};
|
263 |
263 |
my $copies = $::form->{print_options}->{copies};
|
264 |
264 |
my $groupitems = $::form->{print_options}->{groupitems};
|
|
265 |
my $printer_id = $::form->{print_options}->{printer_id};
|
265 |
266 |
|
266 |
267 |
# only pdf and opendocument by now
|
267 |
268 |
if (none { $format eq $_ } qw(pdf opendocument opendocument_pdf)) {
|
... | ... | |
286 |
287 |
my @errors = generate_pdf($self->order, \$pdf, { format => $format,
|
287 |
288 |
formname => $formname,
|
288 |
289 |
language => $self->order->language,
|
|
290 |
printer_id => $printer_id,
|
289 |
291 |
groupitems => $groupitems });
|
290 |
292 |
if (scalar @errors) {
|
291 |
293 |
return $self->js->flash('error', t8('Conversion to PDF failed: #1', $errors[0]))->render;
|
... | ... | |
433 |
435 |
format => $::form->{print_options}->{format},
|
434 |
436 |
formname => $::form->{print_options}->{formname},
|
435 |
437 |
language => $self->order->language,
|
|
438 |
printer_id => $::form->{print_options}->{printer_id},
|
436 |
439 |
groupitems => $::form->{print_options}->{groupitems}});
|
437 |
440 |
if (scalar @errors) {
|
438 |
441 |
return $self->js->flash('error', t8('Conversion to PDF failed: #1', $errors[0]))->render($self);
|
... | ... | |
1917 |
1920 |
$print_form->{format} = $params->{format} || 'pdf';
|
1918 |
1921 |
$print_form->{media} = $params->{media} || 'file';
|
1919 |
1922 |
$print_form->{groupitems} = $params->{groupitems};
|
|
1923 |
$print_form->{printer_id} = $params->{printer_id};
|
1920 |
1924 |
$print_form->{media} = 'file' if $print_form->{media} eq 'screen';
|
1921 |
1925 |
|
1922 |
1926 |
$order->language($params->{language});
|
... | ... | |
1935 |
1939 |
extension => $template_ext,
|
1936 |
1940 |
email => $print_form->{media} eq 'email',
|
1937 |
1941 |
language => $params->{language},
|
1938 |
|
printer_id => $print_form->{printer_id}, # todo
|
|
1942 |
printer_id => $print_form->{printer_id},
|
1939 |
1943 |
);
|
1940 |
1944 |
|
1941 |
1945 |
if (!defined $template_file) {
|
Neuer Auftragscontroller: Drucker-ID an Template-Auswahlmechanismus durchreichen
Der Auswahlmechanismus kann bei der Suche nach der zu verwendenden
Vorlage das beim Drucker hinterlegte Vorlagenkürzel
berücksichtigen. Dafür muss er aber auch gesagt bekommen, welcher
Drucker ausgewählt wurde.