Revision b98b8e3f
Von Sven Schöling vor etwa 10 Jahren hinzugefügt
SL/AR.pm | ||
---|---|---|
480 | 480 |
) AS charts } . |
481 | 481 |
qq|FROM ar a | . |
482 | 482 |
qq|JOIN customer c ON (a.customer_id = c.id) | . |
483 |
qq|LEFT JOIN contacts cp ON (a.cp_id = cp.cp_id) | . |
|
483 | 484 |
qq|LEFT JOIN employee e ON (a.employee_id = e.id) | . |
484 | 485 |
qq|LEFT JOIN employee e2 ON (a.salesman_id = e2.id) | . |
485 | 486 |
qq|LEFT JOIN project pr ON (a.globalproject_id = pr.id)| . |
... | ... | |
505 | 506 |
$where .= " AND c.name ILIKE ?"; |
506 | 507 |
push(@values, $form->like($form->{customer})); |
507 | 508 |
} |
509 |
if ($form->{"cp_name"}) { |
|
510 |
$where .= " AND (cp.cp_name ILIKE ? OR cp.cp_givenname ILIKE ?)"; |
|
511 |
push(@values, ('%' . $form->{"cp_name"} . '%')x2); |
|
512 |
} |
|
508 | 513 |
if ($form->{business_id}) { |
509 | 514 |
my $business_id = $form->{business_id}; |
510 | 515 |
$where .= " AND c.business_id = ?"; |
Auch abrufbar als: Unified diff
Belege: Filtern nach Ansprechpartner