Programmierrichtlinien etwas aktualisiert.
[kivitendo-erp.git] / SL / IS.pm
index 2443d85..f1cddcd 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -63,6 +63,7 @@ sub invoice_details {
   ($form->{terms}) = selectrow_query($form, $dbh, $query);
 
   my (@project_ids, %projectnumbers);
+  $form->{TEMPLATE_ARRAYS} = {};
 
   push(@project_ids, $form->{"globalproject_id"}) if ($form->{"globalproject_id"});
 
@@ -1587,6 +1588,9 @@ sub get_customer {
        WHERE c.id = ?|;
   push @values, $cid;
   $ref = selectfirst_hashref_query($form, $dbh, $query, @values);
+
+  delete $ref->{salesman_id} if !$ref->{salesman_id};
+
   map { $form->{$_} = $ref->{$_} } keys %$ref;
 
   $query =