X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/a6873ed48ebdaee1f5b1df63d431ccc54e829d7d..0631649c2c4115f5820829f866af7e2bc2c6623f:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index e8a3c0eab..229ad2c4d 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -975,9 +975,10 @@ sub send_email { $attachment_name =~ s{\.(.+?)$}{.${ext_for_format}} if ($ext_for_format); if (($self->{attachment_policy} // '') eq 'old_file') { - my ( $attfile ) = SL::File->get_all(object_id => $self->{id}, - object_type => $self->{formname}, - file_type => 'document'); + my ( $attfile ) = SL::File->get_all(object_id => $self->{id}, + object_type => $self->{type}, + file_type => 'document', + print_variant => $self->{formname},); if ($attfile) { $attfile->{override_file_name} = $attachment_name if $attachment_name;