Revision c69c1871
Von G. Richardson vor etwa 14 Jahren hinzugefügt
SL/AR.pm | ||
---|---|---|
490 | 490 |
} |
491 | 491 |
} |
492 | 492 |
|
493 |
if (!$main::auth->assert('sales_all_edit', 1)) { |
|
493 |
if (!$main::auth->assert('sales_all_edit', 1)) { |
|
494 |
# only show own invoices |
|
494 | 495 |
$where .= " AND a.employee_id = (select id from employee where login= ?)"; |
495 | 496 |
push (@values, $form->{login}); |
496 |
} |
|
497 |
} else { |
|
498 |
if ($form->{employee_id}) { |
|
499 |
$where .= " AND a.employee_id = ?"; |
|
500 |
push @values, conv_i($form->{employee_id}); |
|
501 |
} |
|
502 |
if ($form->{salesman_id}) { |
|
503 |
$where .= " AND a.salesman_id = ?"; |
|
504 |
push @values, conv_i($form->{salesman_id}); |
|
505 |
} |
|
506 |
}; |
|
507 |
|
|
497 | 508 |
my @a = qw(transdate invnumber name); |
498 | 509 |
push @a, "employee" if $form->{l_employee}; |
499 | 510 |
my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC'; |
bin/mozilla/ar.pl | ||
---|---|---|
1279 | 1279 |
$form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 }, |
1280 | 1280 |
"departments" => "ALL_DEPARTMENTS", |
1281 | 1281 |
"customers" => "ALL_VC", |
1282 |
"employees" => "ALL_EMPLOYEES", |
|
1283 |
"salesmen" => "ALL_SALESMEN", |
|
1282 | 1284 |
"business_types" => "ALL_BUSINESS_TYPES"); |
1283 | 1285 |
$form->{SHOW_BUSINESS_TYPES} = scalar @{ $form->{ALL_BUSINESS_TYPES} } > 0; |
1284 | 1286 |
|
1285 | 1287 |
# constants and subs for template |
1286 | 1288 |
$form->{jsscript} = 1; |
1287 | 1289 |
$form->{vc_keys} = sub { "$_[0]->{name}--$_[0]->{id}" }; |
1290 |
$form->{employee_labels} = sub { $_[0]->{"name"} || $_[0]->{"login"} }; |
|
1291 |
$form->{salesman_labels} = $form->{employee_labels}; |
|
1288 | 1292 |
|
1289 | 1293 |
$form->header; |
1290 | 1294 |
print $form->parse_html_template('ar/search', { %myconfig }); |
templates/webpages/ar/search.html | ||
---|---|---|
49 | 49 |
<th align=right nowrap>[% 'Order Number' | $T8 %]</th> |
50 | 50 |
<td colspan=3><input name=ordnumber size=20></td> |
51 | 51 |
</tr> |
52 |
<tr> |
|
53 |
<th align="right">[% 'Employee' | $T8 %]</th> |
|
54 |
<td> |
|
55 |
[%- INCLUDE 'generic/multibox.html' |
|
56 |
name = 'employee_id', |
|
57 |
style = 'width: 250px', |
|
58 |
DATA = ALL_EMPLOYEES, |
|
59 |
id_key = 'id', |
|
60 |
label_sub = 'employee_labels', |
|
61 |
limit = vclimit, |
|
62 |
show_empty = 1, |
|
63 |
allow_textbox = 0, |
|
64 |
default = ' ', |
|
65 |
-%] |
|
66 |
</td> |
|
67 |
</tr> |
|
68 |
<tr> |
|
69 |
<th align="right">[% 'Salesman' | $T8 %]</th> |
|
70 |
<td> |
|
71 |
[%- INCLUDE 'generic/multibox.html' |
|
72 |
name = 'salesman_id', |
|
73 |
style = 'width: 250px', |
|
74 |
DATA = ALL_SALESMEN, |
|
75 |
id_key = 'id', |
|
76 |
label_sub = 'salesman_labels', |
|
77 |
limit = vclimit, |
|
78 |
show_empty = 1, |
|
79 |
allow_textbox = 0, |
|
80 |
-%] |
|
81 |
</td> |
|
82 |
</tr> |
|
52 | 83 |
<tr> |
53 | 84 |
<th align=right nowrap>[% 'Transaction description' | $T8 %]</th> |
54 | 85 |
<td colspan=3><input name=transaction_description size=40></td> |
Auch abrufbar als: Unified diff
In Verkaufsberichte->Rechnungen auch nach Bearbeiter/Verkäufer filtern
Wie in den anderen Berichten auch