X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/2e7ea276960b1643001276199f6ce48cd6a5aca7..cdfebb5085afaf1fe0f0278ca6172d5fe009bd9c:/SL/IS.pm diff --git a/SL/IS.pm b/SL/IS.pm index 2cf148268..8ecddffde 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -1513,7 +1513,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