Revision ed14204d
Von Moritz Bunkus vor etwa 12 Jahren hinzugefügt
SL/DO.pm | ||
---|---|---|
66 | 66 |
dord.closed, dord.delivered, dord.shippingpoint, dord.shipvia, |
67 | 67 |
dord.transaction_description, |
68 | 68 |
pr.projectnumber AS globalprojectnumber, |
69 |
dep.description AS department, |
|
69 | 70 |
e.name AS employee, |
70 | 71 |
sm.name AS salesman |
71 | 72 |
FROM delivery_orders dord |
72 | 73 |
LEFT JOIN $vc ct ON (dord.${vc}_id = ct.id) |
73 | 74 |
LEFT JOIN employee e ON (dord.employee_id = e.id) |
74 | 75 |
LEFT JOIN employee sm ON (dord.salesman_id = sm.id) |
75 |
LEFT JOIN project pr ON (dord.globalproject_id = pr.id)|; |
|
76 |
LEFT JOIN project pr ON (dord.globalproject_id = pr.id) |
|
77 |
LEFT JOIN department dep ON (dord.department_id = dep.id) |
|
78 |
|; |
|
76 | 79 |
|
77 | 80 |
push @where, ($form->{type} eq 'sales_delivery_order' ? '' : 'NOT ') . qq|COALESCE(dord.is_sales, FALSE)|; |
78 | 81 |
|
... | ... | |
147 | 150 |
"employee" => "e.name", |
148 | 151 |
"salesman" => "sm.name", |
149 | 152 |
"shipvia" => "dord.shipvia", |
150 |
"transaction_description" => "dord.transaction_description" |
|
153 |
"transaction_description" => "dord.transaction_description", |
|
154 |
"department" => "lower(dep.description)", |
|
151 | 155 |
); |
152 | 156 |
|
153 | 157 |
my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC'; |
bin/mozilla/do.pl | ||
---|---|---|
453 | 453 |
|
454 | 454 |
$form->get_lists("projects" => { "key" => "ALL_PROJECTS", |
455 | 455 |
"all" => 1 }, |
456 |
"departments" => "ALL_DEPARTMENTS", |
|
456 | 457 |
"$form->{vc}s" => "ALL_VC"); |
457 | 458 |
$form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]); |
458 | 459 |
|
... | ... | |
477 | 478 |
my $locale = $main::locale; |
478 | 479 |
my $cgi = $::request->{cgi}; |
479 | 480 |
|
481 |
$form->{department_id} = (split /--/, $form->{department})[-1]; |
|
480 | 482 |
($form->{ $form->{vc} }, $form->{"$form->{vc}_id"}) = split(/--/, $form->{ $form->{vc} }); |
481 | 483 |
|
482 | 484 |
report_generator_set_default_sort('transdate', 1); |
... | ... | |
491 | 493 |
ordnumber customernumber |
492 | 494 |
name employee salesman |
493 | 495 |
shipvia globalprojectnumber |
494 |
transaction_description |
|
496 |
transaction_description department
|
|
495 | 497 |
open delivered |
496 | 498 |
); |
497 | 499 |
|
... | ... | |
525 | 527 |
'transaction_description' => { 'text' => $locale->text('Transaction description'), }, |
526 | 528 |
'open' => { 'text' => $locale->text('Open'), }, |
527 | 529 |
'delivered' => { 'text' => $locale->text('Delivered'), }, |
530 |
'department' => { 'text' => $locale->text('Department'), }, |
|
528 | 531 |
); |
529 | 532 |
|
530 |
foreach my $name (qw(id transdate donumber ordnumber name employee salesman shipvia transaction_description)) { |
|
533 |
foreach my $name (qw(id transdate donumber ordnumber name employee salesman shipvia transaction_description department)) {
|
|
531 | 534 |
my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir}; |
532 | 535 |
$column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir"; |
533 | 536 |
} |
templates/webpages/do/search.html | ||
---|---|---|
62 | 62 |
<select name="department" class="fixed_width"> |
63 | 63 |
<option></option> |
64 | 64 |
[%- FOREACH row = ALL_DEPARTMENTS %] |
65 |
<option[% IF department == row.value %] selected[% END %]>[% HTML.escape(row.description) %]--[% HTML.escape(row.id) %]</option>
|
|
65 |
<option[% IF department == row.id %] selected[% END %]>[% HTML.escape(row.description) %]--[% HTML.escape(row.id) %]</option>
|
|
66 | 66 |
[%- END %] |
67 | 67 |
</select> |
68 | 68 |
</td> |
... | ... | |
182 | 182 |
[% END %] |
183 | 183 |
</tr> |
184 | 184 |
|
185 |
<tr> |
|
186 |
<td> |
|
187 |
<input name="l_department" id="l_department" class="checkbox" type="checkbox" value="Y"> |
|
188 |
<label for="l_department">[% "Department" | $T8 %]</label> |
|
189 |
</td> |
|
190 |
|
|
191 |
<td> |
|
192 |
<input name="l_shipvia" id="l_shipvia" class="checkbox" type="checkbox" value="Y"> |
|
193 |
<label for="l_shipvia">[% 'Ship via' | $T8 %]</label> |
|
194 |
</td> |
|
195 |
</tr> |
|
196 |
|
|
185 | 197 |
<tr> |
186 | 198 |
<td> |
187 | 199 |
<input name="l_employee" id="l_employee" class="checkbox" type="checkbox" value="Y" checked> |
... | ... | |
192 | 204 |
<input name="l_salesman" id="l_salesman" class="checkbox" type="checkbox" value="Y"> |
193 | 205 |
<label for="l_salesman">[% 'Salesman' | $T8 %]</label> |
194 | 206 |
</td> |
195 |
|
|
196 |
<td> |
|
197 |
<input name="l_shipvia" id="l_shipvia" class="checkbox" type="checkbox" value="Y"> |
|
198 |
<label for="l_shipvia">[% 'Ship via' | $T8 %]</label> |
|
199 |
</td> |
|
200 | 207 |
</tr> |
201 | 208 |
|
202 | 209 |
<tr> |
... | ... | |
230 | 237 |
|
231 | 238 |
</body> |
232 | 239 |
</html> |
233 |
|
Auch abrufbar als: Unified diff
Suche nach und Anzeige von Abteilungen bei Lieferscheinsuche
Implementiert #1952.