]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/io.pl
E-Mail-Dialog: Vorbelegung vom Kunden/Lieferanten, wenn Ansprechperson keine E-Mail hat
[mfinanz.git] / bin / mozilla / io.pl
index eab83985728488c21ab4bd8b99570c56cc3e5449..1fd47c8775f28f508707a6da6eec9539adecf221 100644 (file)
@@ -1969,7 +1969,9 @@ sub show_sales_purchase_email_dialog {
   my $email = '';
   if ($::form->{cp_id}) {
     $email = SL::DB::Contact->load_cached($::form->{cp_id})->cp_email;
-  } elsif ($::form->{vc} && $::form->{vc_id}) {
+  }
+
+  if (!$email && $::form->{vc} && $::form->{vc_id}) {
     $email = SL::DB::Customer->load_cached($::form->{vc_id})->email if 'customer' eq $::form->{vc};
     $email = SL::DB::Vendor  ->load_cached($::form->{vc_id})->email if 'vendor'   eq $::form->{vc};
   }