Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ed14204d

Von Moritz Bunkus vor mehr als 12 Jahren hinzugefügt

  • ID ed14204df3eb35e33247c5f5b0fec0298a141ef2
  • Vorgänger fa7b6442
  • Nachfolger 55036afc

Suche nach und Anzeige von Abteilungen bei Lieferscheinsuche

Implementiert #1952.

Unterschiede anzeigen:

SL/DO.pm
dord.closed, dord.delivered, dord.shippingpoint, dord.shipvia,
dord.transaction_description,
pr.projectnumber AS globalprojectnumber,
dep.description AS department,
e.name AS employee,
sm.name AS salesman
FROM delivery_orders dord
LEFT JOIN $vc ct ON (dord.${vc}_id = ct.id)
LEFT JOIN employee e ON (dord.employee_id = e.id)
LEFT JOIN employee sm ON (dord.salesman_id = sm.id)
LEFT JOIN project pr ON (dord.globalproject_id = pr.id)|;
LEFT JOIN project pr ON (dord.globalproject_id = pr.id)
LEFT JOIN department dep ON (dord.department_id = dep.id)
|;
push @where, ($form->{type} eq 'sales_delivery_order' ? '' : 'NOT ') . qq|COALESCE(dord.is_sales, FALSE)|;
......
"employee" => "e.name",
"salesman" => "sm.name",
"shipvia" => "dord.shipvia",
"transaction_description" => "dord.transaction_description"
"transaction_description" => "dord.transaction_description",
"department" => "lower(dep.description)",
);
my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC';
bin/mozilla/do.pl
$form->get_lists("projects" => { "key" => "ALL_PROJECTS",
"all" => 1 },
"departments" => "ALL_DEPARTMENTS",
"$form->{vc}s" => "ALL_VC");
$form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
......
my $locale = $main::locale;
my $cgi = $::request->{cgi};
$form->{department_id} = (split /--/, $form->{department})[-1];
($form->{ $form->{vc} }, $form->{"$form->{vc}_id"}) = split(/--/, $form->{ $form->{vc} });
report_generator_set_default_sort('transdate', 1);
......
ordnumber customernumber
name employee salesman
shipvia globalprojectnumber
transaction_description
transaction_description department
open delivered
);
......
'transaction_description' => { 'text' => $locale->text('Transaction description'), },
'open' => { 'text' => $locale->text('Open'), },
'delivered' => { 'text' => $locale->text('Delivered'), },
'department' => { 'text' => $locale->text('Department'), },
);
foreach my $name (qw(id transdate donumber ordnumber name employee salesman shipvia transaction_description)) {
foreach my $name (qw(id transdate donumber ordnumber name employee salesman shipvia transaction_description department)) {
my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir};
$column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir";
}
templates/webpages/do/search.html
<select name="department" class="fixed_width">
<option></option>
[%- FOREACH row = ALL_DEPARTMENTS %]
<option[% IF department == row.value %] selected[% END %]>[% HTML.escape(row.description) %]--[% HTML.escape(row.id) %]</option>
<option[% IF department == row.id %] selected[% END %]>[% HTML.escape(row.description) %]--[% HTML.escape(row.id) %]</option>
[%- END %]
</select>
</td>
......
[% END %]
</tr>
<tr>
<td>
<input name="l_department" id="l_department" class="checkbox" type="checkbox" value="Y">
<label for="l_department">[% "Department" | $T8 %]</label>
</td>
<td>
<input name="l_shipvia" id="l_shipvia" class="checkbox" type="checkbox" value="Y">
<label for="l_shipvia">[% 'Ship via' | $T8 %]</label>
</td>
</tr>
<tr>
<td>
<input name="l_employee" id="l_employee" class="checkbox" type="checkbox" value="Y" checked>
......
<input name="l_salesman" id="l_salesman" class="checkbox" type="checkbox" value="Y">
<label for="l_salesman">[% 'Salesman' | $T8 %]</label>
</td>
<td>
<input name="l_shipvia" id="l_shipvia" class="checkbox" type="checkbox" value="Y">
<label for="l_shipvia">[% 'Ship via' | $T8 %]</label>
</td>
</tr>
<tr>
......
</body>
</html>

Auch abrufbar als: Unified diff