]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Form.pm
Files: Druckvariante beim Drucken speichern und bei E-Mail darauf prüfen, …
[mfinanz.git] / SL / Form.pm
index e8a3c0eab6638dd1341c23df7802aa60fc60aba0..229ad2c4de561c3519cdf73151ca8a646b1d33ad 100644 (file)
@@ -975,9 +975,10 @@ sub send_email {
     $attachment_name     =~ s{\.(.+?)$}{.${ext_for_format}} if ($ext_for_format);
 
     if (($self->{attachment_policy} // '') eq 'old_file') {
     $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;
 
       if ($attfile) {
         $attfile->{override_file_name} = $attachment_name if $attachment_name;