Revision bc40bcab
Von Moritz Bunkus vor mehr als 8 Jahren hinzugefügt
SL/Controller/BankTransaction.pm | ||
---|---|---|
23 | 23 |
use SL::DB::Tax; |
24 | 24 |
use SL::DB::Draft; |
25 | 25 |
use SL::DB::BankAccount; |
26 |
use SL::DBUtils qw(like); |
|
26 | 27 |
use SL::Presenter; |
27 | 28 |
use List::Util qw(max); |
28 | 29 |
|
... | ... | |
277 | 278 |
my @where_purchase = (amount => { ne => \'paid' }); |
278 | 279 |
|
279 | 280 |
if ($::form->{invnumber}) { |
280 |
push @where_sale, (invnumber => { ilike => '%' . $::form->{invnumber} . '%'});
|
|
281 |
push @where_purchase, (invnumber => { ilike => '%' . $::form->{invnumber} . '%'});
|
|
281 |
push @where_sale, (invnumber => { ilike => like($::form->{invnumber})});
|
|
282 |
push @where_purchase, (invnumber => { ilike => like($::form->{invnumber})});
|
|
282 | 283 |
} |
283 | 284 |
|
284 | 285 |
if ($::form->{amount}) { |
... | ... | |
287 | 288 |
} |
288 | 289 |
|
289 | 290 |
if ($::form->{vcnumber}) { |
290 |
push @where_sale, ('customer.customernumber' => { ilike => '%' . $::form->{vcnumber} . '%'});
|
|
291 |
push @where_purchase, ('vendor.vendornumber' => { ilike => '%' . $::form->{vcnumber} . '%'});
|
|
291 |
push @where_sale, ('customer.customernumber' => { ilike => like($::form->{vcnumber})});
|
|
292 |
push @where_purchase, ('vendor.vendornumber' => { ilike => like($::form->{vcnumber})});
|
|
292 | 293 |
} |
293 | 294 |
|
294 | 295 |
if ($::form->{vcname}) { |
295 |
push @where_sale, ('customer.name' => { ilike => '%' . $::form->{vcname} . '%'});
|
|
296 |
push @where_purchase, ('vendor.name' => { ilike => '%' . $::form->{vcname} . '%'});
|
|
296 |
push @where_sale, ('customer.name' => { ilike => like($::form->{vcname})});
|
|
297 |
push @where_purchase, ('vendor.name' => { ilike => like($::form->{vcname})});
|
|
297 | 298 |
} |
298 | 299 |
|
299 | 300 |
if ($::form->{transdatefrom}) { |
Auch abrufbar als: Unified diff
(I)LIKE-Argumente immer mit Funktion SL::DBUtils::like erstellen