SL::DB::Order: bei Wandlung in Lieferschein delivered auf 1 setzen
[kivitendo-erp.git] / SL / Form.pm
index 730d079..2181724 100644 (file)
@@ -1080,8 +1080,9 @@ sub parse_template {
   }
 
   close OUT if $self->{OUT};
-
-  my $copy_to_webdav = $::instance_conf->get_webdav && $::instance_conf->get_webdav_documents && !$self->{preview} && $self->{tmpdir} && $self->{tmpfile} && $self->{type};
+  # check only one flag (webdav_documents)
+  # therefore copy to webdav, even if we do not have the webdav feature enabled (just archive)
+  my $copy_to_webdav =  $::instance_conf->get_webdav_documents && !$self->{preview} && $self->{tmpdir} && $self->{tmpfile} && $self->{type};
 
   if ($self->{media} eq 'file') {
     copy(join('/', $self->{cwd}, $userspath, $self->{tmpfile}), $out =~ m|^/| ? $out : join('/', $self->{cwd}, $out)) if $template->uses_temp_file;