Revision a34838e6
Von Bernd Bleßmann vor fast 9 Jahren hinzugefügt
SL/CT.pm | ||
---|---|---|
118 | 118 |
push @values, '%' . $form->{cp_name} . '%'; |
119 | 119 |
} |
120 | 120 |
|
121 |
if ($form->{addr_street}) { |
|
122 |
$where .= qq| AND ((ct.street ILIKE ?) | . |
|
123 |
qq| OR | . |
|
124 |
qq| (ct.id IN ( | . |
|
125 |
qq| SELECT sc.trans_id FROM shipto sc | . |
|
126 |
qq| WHERE (sc.module = 'CT') | . |
|
127 |
qq| AND (sc.shiptostreet ILIKE ?) | . |
|
128 |
qq| ))) |; |
|
129 |
push @values, ('%' . $form->{addr_street} . '%') x 2; |
|
130 |
} |
|
131 |
|
|
132 |
if ($form->{addr_zipcode}) { |
|
133 |
$where .= qq| AND ((ct.zipcode ILIKE ?) | . |
|
134 |
qq| OR | . |
|
135 |
qq| (ct.id IN ( | . |
|
136 |
qq| SELECT sc.trans_id FROM shipto sc | . |
|
137 |
qq| WHERE (sc.module = 'CT') | . |
|
138 |
qq| AND (sc.shiptozipcode ILIKE ?) | . |
|
139 |
qq| ))) |; |
|
140 |
push @values, ('%' . $form->{addr_zipcode} . '%') x 2; |
|
141 |
} |
|
142 |
|
|
121 | 143 |
if ($form->{addr_city}) { |
122 | 144 |
$where .= " AND ((lower(ct.city) LIKE lower(?)) |
123 | 145 |
OR |
... | ... | |
218 | 240 |
push @values, @cvar_values; |
219 | 241 |
} |
220 | 242 |
|
221 |
if ($form->{addr_street}) { |
|
222 |
$where .= qq| AND (ct.street ILIKE ?)|; |
|
223 |
push @values, '%' . $form->{addr_street} . '%'; |
|
224 |
} |
|
225 |
|
|
226 |
if ($form->{addr_zipcode}) { |
|
227 |
$where .= qq| AND (ct.zipcode ILIKE ?)|; |
|
228 |
push @values, $form->{addr_zipcode} . '%'; |
|
229 |
} |
|
230 |
|
|
231 | 243 |
my $pg_select = $form->{l_pricegroup} ? qq|, pg.pricegroup as pricegroup | : ''; |
232 | 244 |
my $pg_join = $form->{l_pricegroup} ? qq|LEFT JOIN pricegroup pg ON (ct.klass = pg.id) | : ''; |
233 | 245 |
my $query = |
Auch abrufbar als: Unified diff
Stammdaten->Berichte->Kunden/Lieferanten: Straße u. PLZ auch in Lieferadressen suchen
So, wie es die Bezeichung auch suggeriert.