From: Sven Schöling Date: Mon, 30 Mar 2009 15:52:54 +0000 (+0000) Subject: Code aufgeräumt. X-Git-Tag: release-2.6.0beta2~124 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4f19857efd5a26253699b24a305176fda21b010a;p=kivitendo-erp.git Code aufgeräumt. --- diff --git a/SL/CT.pm b/SL/CT.pm index b1c21ab22..7e81d66c4 100644 --- a/SL/CT.pm +++ b/SL/CT.pm @@ -761,17 +761,17 @@ if ($sortorder ne 'id') { $where .= qq| AND ($cvar_where)|; push @values, @cvar_values; } - # Um nach Straße in der Berichtsmaske zu suchen ... jb 13.11.2008 - if ($form->{addr_street}) { - $where .= qq| AND (street ILIKE ?)|; - push @values, ('%' . $form->{addr_street} . '%'); - } - - # Um nach PLZ in der Berichtsmaske zu suchen ... jb 13.11.2008 - if ($form->{addr_zipcode}) { - $where .= qq| AND (zipcode ILIKE ?)|; - push @values, ($form->{addr_zipcode} . '%'); - } + + if ($form->{addr_street}) { + $where .= qq| AND (street ILIKE ?)|; + push @values, '%' . $form->{addr_street} . '%'; + } + + if ($form->{addr_zipcode}) { + $where .= qq| AND (zipcode ILIKE ?)|; + push @values, $form->{addr_zipcode} . '%'; + } + my $query = qq|SELECT ct.*, b.description AS business | . qq|FROM $cv ct | .