vergessener Presenter::EmailJournal
[kivitendo-erp.git] / SL / IS.pm
index e1eb443..21bf15f 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -2158,7 +2158,7 @@ sub get_customer {
   $ref = selectfirst_hashref_query($form, $dbh, $query, @values);
 
   delete $ref->{salesman_id} if !$ref->{salesman_id};
-  delete $ref->{payment_id}  if $form->{payment_id};
+  delete $ref->{payment_id}  if !$ref->{payment_id};
 
   map { $form->{$_} = $ref->{$_} } keys %$ref;
 
@@ -2435,16 +2435,6 @@ sub retrieve_item {
         last;
       }
     }
-    ## customer_id ggf beim ersten mal noch nicht gesetzt nur customer <name>--<id>
-    ($form->{customer}, $form->{customer_id}) = split(/--/, $form->{customer}) if  ! $form->{customer_id};
-    if ( $form->{customer_id} ) {
-        my $cprice = SL::DB::Manager::PartCustomerPrice->get_first(
-            query => [ parts_id => $ref->{id} , customer_id => $form->{customer_id} ] );
-        if ( $cprice ) {
-            $::lxdebug->message(LXDebug->DEBUG2(), "cprice id=".$cprice->{id}." price=".$cprice->{price});
-            $ref->{sellprice} = $cprice->{price};
-        }
-    }
 
     $ref->{onhand} *= 1;
     push @{ $form->{item_list} }, $ref;