]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/IS.pm
Merge von 800 aus unstable: Bugfix 245
[kivitendo-erp.git] / SL / IS.pm
index 484dcb9d086cf44664d2b75c27d92d026a589e8d..9c4f50b1ab63437550b4776615fd6c51de9dd104 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -348,8 +348,6 @@ sub customer_details {
     $contact = "and cp.cp_id = $form->{cp_id}";
   }
 
-  $taxincluded = $form->{taxincluded};
-
   # get rest for the customer
   my $query = qq|SELECT ct.*, cp.*, ct.notes as customernotes
                  FROM customer ct
@@ -359,9 +357,10 @@ sub customer_details {
   $sth->execute || $form->dberror($query);
 
   $ref = $sth->fetchrow_hashref(NAME_lc);
-  map { $form->{$_} = $ref->{$_} } keys %$ref;
 
-  $form->{taxincluded} = $taxincluded;
+  # remove id and taxincluded before copy back
+  delete @$ref{qw(id taxincluded)};
+  map { $form->{$_} = $ref->{$_} } keys %$ref;
 
   $sth->finish;
   $dbh->disconnect;