Revision 612e3ebe
Von Moritz Bunkus vor mehr als 8 Jahren hinzugefügt
SL/AP.pm | ||
---|---|---|
507 | 507 |
} |
508 | 508 |
} |
509 | 509 |
|
510 |
if ($form->{parts_partnumber}) { |
|
511 |
$where .= <<SQL; |
|
512 |
AND EXISTS ( |
|
513 |
SELECT invoice.trans_id |
|
514 |
FROM invoice |
|
515 |
LEFT JOIN parts ON (invoice.parts_id = parts.id) |
|
516 |
WHERE (invoice.trans_id = a.id) |
|
517 |
AND (parts.partnumber ILIKE ?) |
|
518 |
LIMIT 1 |
|
519 |
) |
|
520 |
SQL |
|
521 |
push @values, like($form->{parts_partnumber}); |
|
522 |
} |
|
523 |
|
|
524 |
if ($form->{parts_description}) { |
|
525 |
$where .= <<SQL; |
|
526 |
AND EXISTS ( |
|
527 |
SELECT invoice.trans_id |
|
528 |
FROM invoice |
|
529 |
WHERE (invoice.trans_id = a.id) |
|
530 |
AND (invoice.description ILIKE ?) |
|
531 |
LIMIT 1 |
|
532 |
) |
|
533 |
SQL |
|
534 |
push @values, like($form->{parts_description}); |
|
535 |
} |
|
536 |
|
|
510 | 537 |
if ($where) { |
511 | 538 |
substr($where, 0, 4, " WHERE "); |
512 | 539 |
$query .= $where; |
Auch abrufbar als: Unified diff
Einkaufsrechnungen: Suche nach Artikelnummer/-beschreibung in Positionen