X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIS.pm;h=8ecddffde5082fbea0bfc486668ddc0d3e12f8d3;hb=9198a41442e997dc37eb80d3a30eab7136d58208;hp=2cf1482685572d8d7c23fd2c16ec890f876c89a5;hpb=a5f409be8c9f981038b94d5e1822185c73ad3949;p=kivitendo-erp.git 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