}
}
if ($self->order->ordnumber && $::instance_conf->get_doc_storage) {
- SL::File->store( object_id => $self->order->id,
+ SL::File->save( object_id => $self->order->id,
object_type => $self->type,
mime_type => 'application/pdf',
source => 'created',
type => $self->type,
number => $self->order->ordnumber,
);
- my $webdav_path = $webdav->webdav_path;
my @all_objects = $webdav->get_all_objects;
@{ $self->{template_args}->{WEBDAV} } = map { { name => $_->filename,
type => t8('File'),
t8('E-mail'),
call => [ 'kivi.Order.email' ],
],
+ action => [
+ t8('Download attachments of all parts'),
+ call => [ 'kivi.File.downloadOrderitemsFiles', $::form->{type}, $::form->{id} ],
+ disabled => !$self->order->id ? t8('This object has not been saved yet.') : undef,
+ only_if => $::instance_conf->get_doc_storage,
+ ],
], # end of combobox "Export"
action => [