Revision 67a645ce
Von Bernd Bleßmann vor fast 3 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
474 | 474 |
$::form->{$_} = $::form->{print_options}->{$_} for keys %{ $::form->{print_options} }; |
475 | 475 |
$::form->{media} = 'email'; |
476 | 476 |
|
477 |
if (($::form->{attachment_policy} // '') !~ m{^(?:old_file|no_file)$}) { |
|
477 |
$::form->{attachment_policy} //= ''; |
|
478 |
|
|
479 |
# Is an old file version available? |
|
480 |
my $attfile; |
|
481 |
if ($::form->{attachment_policy} eq 'old_file') { |
|
482 |
$attfile = SL::File->get_all(object_id => $self->order->id, |
|
483 |
object_type => $::form->{formname}, |
|
484 |
file_type => 'document'); |
|
485 |
} |
|
486 |
|
|
487 |
if ($::form->{attachment_policy} ne 'no_file' && !($::form->{attachment_policy} eq 'old_file' && $attfile)) { |
|
478 | 488 |
my $doc; |
479 |
my @errors = $self->generate_doc(\$doc, {media => $::form->{media},
|
|
489 |
my @errors = $self->generate_pdf(\$doc, {media => $::form->{media},
|
|
480 | 490 |
format => $::form->{print_options}->{format}, |
481 | 491 |
formname => $::form->{print_options}->{formname}, |
482 | 492 |
language => $self->order->language, |
Auch abrufbar als: Unified diff
Auftrags-Controller: Email/DMS falls kein Dokument vorhanden, eines erstellen, …
… wenn die Policy sagt, dass der letzte Ausdruck mitgeschickt werden soll