Revision b98b8e3f
Von Sven Schöling vor etwa 10 Jahren hinzugefügt
SL/AP.pm | ||
---|---|---|
433 | 433 |
) AS charts } . |
434 | 434 |
qq|FROM ap a | . |
435 | 435 |
qq|JOIN vendor v ON (a.vendor_id = v.id) | . |
436 |
qq|LEFT JOIN contacts cp ON (a.cp_id = cp.cp_id) | . |
|
436 | 437 |
qq|LEFT JOIN employee e ON (a.employee_id = e.id) | . |
437 | 438 |
qq|LEFT JOIN project pr ON (a.globalproject_id = pr.id) | . |
438 | 439 |
qq|LEFT JOIN tax_zones tz ON (tz.id = v.taxzone_id)| . |
... | ... | |
453 | 454 |
$where .= " AND v.name ILIKE ?"; |
454 | 455 |
push(@values, $form->like($form->{vendor})); |
455 | 456 |
} |
457 |
if ($form->{"cp_name"}) { |
|
458 |
$where .= " AND (cp.cp_name ILIKE ? OR cp.cp_givenname ILIKE ?)"; |
|
459 |
push(@values, ('%' . $form->{"cp_name"} . '%')x2); |
|
460 |
} |
|
456 | 461 |
if ($form->{department}) { |
457 | 462 |
# ähnlich wie commit 0bbfb33b6aa8e38bb6c81d1684ab7d08e5b5c5af abteilung |
458 | 463 |
# wird so nicht mehr als zeichenkette zusammengebaut |
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 = ?"; |
SL/DO.pm | ||
---|---|---|
76 | 76 |
sm.name AS salesman |
77 | 77 |
FROM delivery_orders dord |
78 | 78 |
LEFT JOIN $vc ct ON (dord.${vc}_id = ct.id) |
79 |
LEFT JOIN contacts cp ON (dord.cp_id = cp.cp_id) |
|
79 | 80 |
LEFT JOIN employee e ON (dord.employee_id = e.id) |
80 | 81 |
LEFT JOIN employee sm ON (dord.salesman_id = sm.id) |
81 | 82 |
LEFT JOIN project pr ON (dord.globalproject_id = pr.id) |
... | ... | |
106 | 107 |
push @values, '%' . $form->{$vc} . '%'; |
107 | 108 |
} |
108 | 109 |
|
110 |
if ($form->{"cp_name"}) { |
|
111 |
push @where, "(cp.cp_name ILIKE ? OR cp.cp_givenname ILIKE ?)"; |
|
112 |
push @values, ('%' . $form->{"cp_name"} . '%')x2; |
|
113 |
} |
|
114 |
|
|
109 | 115 |
foreach my $item (qw(employee_id salesman_id)) { |
110 | 116 |
next unless ($form->{$item}); |
111 | 117 |
push @where, "dord.$item = ?"; |
SL/OE.pm | ||
---|---|---|
118 | 118 |
qq| , o.order_probability, o.expected_billing_date, (o.netamount * o.order_probability / 100) AS expected_netamount | . |
119 | 119 |
qq|FROM oe o | . |
120 | 120 |
qq|JOIN $vc ct ON (o.${vc}_id = ct.id) | . |
121 |
qq|LEFT JOIN contacts cp ON (o.cp_id = cp.cp_id) | . |
|
121 | 122 |
qq|LEFT JOIN employee e ON (o.employee_id = e.id) | . |
122 | 123 |
qq|LEFT JOIN employee s ON (o.salesman_id = s.id) | . |
123 | 124 |
qq|LEFT JOIN exchangerate ex ON (ex.currency_id = o.currency_id | . |
... | ... | |
168 | 169 |
push(@values, '%' . $form->{$vc} . '%'); |
169 | 170 |
} |
170 | 171 |
|
172 |
if ($form->{"cp_name"}) { |
|
173 |
$query .= " AND (cp.cp_name ILIKE ? OR cp.cp_givenname ILIKE ?)"; |
|
174 |
push(@values, ('%' . $form->{"cp_name"} . '%')x2); |
|
175 |
} |
|
176 |
|
|
171 | 177 |
if (!$main::auth->assert('sales_all_edit', 1)) { |
172 | 178 |
$query .= " AND o.employee_id = (select id from employee where login= ?)"; |
173 | 179 |
push @values, $form->{login}; |
bin/mozilla/ap.pl | ||
---|---|---|
911 | 911 |
|
912 | 912 |
my @options; |
913 | 913 |
push @options, $locale->text('Vendor') . " : $form->{vendor}" if ($form->{vendor}); |
914 |
push @options, $locale->text('Contact Person') . " : $form->{cp_name}" if ($form->{cp_name}); |
|
914 | 915 |
push @options, $locale->text('Department') . " : " . (split /--/, $form->{department})[0] if ($form->{department}); |
915 | 916 |
push @options, $locale->text('Invoice Number') . " : $form->{invnumber}" if ($form->{invnumber}); |
916 | 917 |
push @options, $locale->text('Order Number') . " : $form->{ordnumber}" if ($form->{ordnumber}); |
bin/mozilla/ar.pl | ||
---|---|---|
957 | 957 |
if ($form->{customer}) { |
958 | 958 |
push @options, $locale->text('Customer') . " : $form->{customer}"; |
959 | 959 |
} |
960 |
if ($form->{cp_name}) { |
|
961 |
push @options, $locale->text('Contact Person') . " : $form->{cp_name}"; |
|
962 |
} |
|
960 | 963 |
if ($form->{department}) { |
961 | 964 |
my ($department) = split /--/, $form->{department}; |
962 | 965 |
push @options, $locale->text('Department') . " : $department"; |
bin/mozilla/do.pl | ||
---|---|---|
580 | 580 |
if ($form->{vendor}) { |
581 | 581 |
push @options, $locale->text('Vendor') . " : $form->{vendor}"; |
582 | 582 |
} |
583 |
if ($form->{cp_name}) { |
|
584 |
push @options, $locale->text('Contact Person') . " : $form->{cp_name}"; |
|
585 |
} |
|
583 | 586 |
if ($form->{department}) { |
584 | 587 |
my ($department) = split /--/, $form->{department}; |
585 | 588 |
push @options, $locale->text('Department') . " : $department"; |
bin/mozilla/oe.pl | ||
---|---|---|
949 | 949 |
|
950 | 950 |
push @options, $locale->text('Customer') . " : $form->{customer}" if $form->{customer}; |
951 | 951 |
push @options, $locale->text('Vendor') . " : $form->{vendor}" if $form->{vendor}; |
952 |
push @options, $locale->text('Contact Person') . " : $form->{cp_name}" if $form->{cp_name}; |
|
952 | 953 |
push @options, $locale->text('Department') . " : $department" if $form->{department}; |
953 | 954 |
push @options, $locale->text('Order Number') . " : $form->{ordnumber}" if $form->{ordnumber}; |
954 | 955 |
push @options, $locale->text('Customer Order Number') . " : $form->{cusordnumber}" if $form->{cusordnumber}; |
templates/webpages/ap/search.html | ||
---|---|---|
28 | 28 |
-%] |
29 | 29 |
</td> |
30 | 30 |
</tr> |
31 |
<tr> |
|
32 |
<th align="right" nowrap>[% 'Contact Person' | $T8 %]</th> |
|
33 |
<td colspan="3">[% L.input_tag("cp_name", '', size=20) %]</td> |
|
34 |
</tr> |
|
31 | 35 |
<tr> |
32 | 36 |
<th align=right nowrap>[% 'Department' | $T8 %]</th> |
33 | 37 |
<td> |
templates/webpages/ar/search.html | ||
---|---|---|
27 | 27 |
-%] |
28 | 28 |
</td> |
29 | 29 |
</tr> |
30 |
<tr> |
|
31 |
<th align="right" nowrap>[% 'Contact Person' | $T8 %]</th> |
|
32 |
<td colspan="3">[% L.input_tag("cp_name", '', size=20) %]</td> |
|
33 |
</tr> |
|
30 | 34 |
<tr> |
31 | 35 |
<th align=right nowrap>[% 'Department' | $T8 %]</th> |
32 | 36 |
<td> |
templates/webpages/do/search.html | ||
---|---|---|
40 | 40 |
</td> |
41 | 41 |
</tr> |
42 | 42 |
|
43 |
<tr> |
|
44 |
<th align="right" nowrap>[% 'Contact Person' | $T8 %]</th> |
|
45 |
<td colspan="3">[% L.input_tag("cp_name", '', class="fixed_width") %]</td> |
|
46 |
</tr> |
|
47 |
|
|
43 | 48 |
<tr> |
44 | 49 |
<th align="right">[% 'Delivery Order Number' | $T8 %]</th> |
45 | 50 |
<td colspan="3"><input name="donumber" class="fixed_width"></td> |
templates/webpages/oe/search.html | ||
---|---|---|
32 | 32 |
-%] |
33 | 33 |
</td> |
34 | 34 |
</tr> |
35 |
<tr> |
|
36 |
<th align="right" nowrap>[% 'Contact Person' | $T8 %]</th> |
|
37 |
<td colspan="3">[% L.input_tag("cp_name", '', style="width: 250px") %]</td> |
|
38 |
</tr> |
|
35 | 39 |
[%- IF ALL_DEPARTMENTS.size %] |
36 | 40 |
<tr> |
37 | 41 |
<th align="right" nowrap>[% 'Department' | $T8 %]</th> |
Auch abrufbar als: Unified diff
Belege: Filtern nach Ansprechpartner