]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/io.pl
Dateimanagement: Stammdaten: DOM-Elemente bei multiples Tab-Aufrufen nicht dupliziere...
[mfinanz.git] / bin / mozilla / io.pl
index d6c09ce1e56e656be3dde1cd30c9a0fb20852da4..778c718f4ddd207e32c13e54f30ae1100b1b5a3f 100644 (file)
@@ -1670,6 +1670,7 @@ sub _update_part_information {
 }
 
 sub _update_ship {
 }
 
 sub _update_ship {
+  return unless $::form->{id};
   my $helper = SL::Helper::ShippedQty->new->calculate($::form->{id});
 
   for my $i (1..$::form->{rowcount}) {
   my $helper = SL::Helper::ShippedQty->new->calculate($::form->{id});
 
   for my $i (1..$::form->{rowcount}) {
@@ -1968,11 +1969,15 @@ sub show_sales_purchase_email_dialog {
   my $email = '';
   if ($::form->{cp_id}) {
     $email = SL::DB::Contact->load_cached($::form->{cp_id})->cp_email;
   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};
   }
 
     $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};
   }
 
+  $email = '' if $::form->{type} eq 'purchase_delivery_order';
+
   my $email_form = {
     to                  => $email,
     subject             => $::form->generate_email_subject,
   my $email_form = {
     to                  => $email,
     subject             => $::form->generate_email_subject,