]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/IS.pm
Benutzerkonfiguration um Einstellungen zur Aufgabenliste erweitert.
[kivitendo-erp.git] / SL / IS.pm
index 2cf1482685572d8d7c23fd2c16ec890f876c89a5..367c8615fa4cfa67ae261986956341d4e697591c 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -37,6 +37,7 @@ package IS;
 use List::Util qw(max);
 
 use SL::AM;
+use SL::CVar;
 use SL::Common;
 use SL::DBUtils;
 use SL::MoreCommon;
@@ -463,6 +464,12 @@ sub customer_details {
 
     map { $form->{"dv_$_"} = $ref->{$_} } keys %$ref;
   }
+
+  my $custom_variables = CVar->get_custom_variables('dbh'      => $dbh,
+                                                    'module'   => 'CT',
+                                                    'trans_id' => $form->{customer_id});
+  map { $form->{"vc_cvar_$_->{name}"} = $_->{value} } @{ $custom_variables };
+
   $dbh->disconnect;
 
   $main::lxdebug->leave_sub();
@@ -1513,7 +1520,13 @@ sub get_customer {
   }
 
   my $cid = conv_i($form->{customer_id});
-  my $payment_id = ($form->{payment_id}) ? "($form->{payment_id} = pt.id) OR" : "";
+  my $payment_id;
+
+  if ($form->{payment_id}) {
+    $payment_id = "(pt.id = ?) OR";
+    push @values, conv_i($form->{payment_id});
+  }
+
   # get customer
   $query =
     qq|SELECT