Revision 3a6d52b8
Von Sven Schöling vor fast 13 Jahren hinzugefügt
bin/mozilla/ct.pl | ||
---|---|---|
314 | 314 |
my %myconfig = %main::myconfig; |
315 | 315 |
my $locale = $main::locale; |
316 | 316 |
|
317 |
$form->get_lists(employees => "ALL_EMPLOYEES", |
|
318 |
taxzones => "ALL_TAXZONES", |
|
317 |
$form->get_lists(taxzones => "ALL_TAXZONES", |
|
319 | 318 |
currencies => "ALL_CURRENCIES"); |
320 | 319 |
$form->get_pricegroup(\%myconfig, { all => 1 }); |
321 | 320 |
|
322 | 321 |
$form->get_lists(customers => { key => "ALL_SALESMAN_CUSTOMERS", business_is_salesman => 1 }) if $::lx_office_conf{features}->{vertreter}; |
322 |
$form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{FU_created_for_user}, deleted => 0 ] ]); |
|
323 |
$form->{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); |
|
324 |
$form->{USER} = SL::DB::Manager::Employee->current; |
|
323 | 325 |
|
324 |
$form->{ALL_SALESMEN} = $form->{ALL_EMPLOYEES}; |
|
325 | 326 |
$form->{taxincluded} = ($form->{taxincluded}) ? "checked" : ""; |
326 | 327 |
$form->{is_customer} = $form->{db} eq 'customer'; |
327 |
$form->{salesman_label} = sub { $_[0]->{name} ne "" ? $_[0]->{name} : $_[0]->{login} }; |
|
328 | 328 |
$form->{shipto_label} = \&_shipto_label; |
329 | 329 |
$form->{contacts_label} = \&_contacts_label; |
330 | 330 |
$form->{taxzone_id} = 0 if !$form->{id}; |
templates/webpages/ct/form_header.html | ||
---|---|---|
279 | 279 |
</td> |
280 | 280 |
[%- IF is_customer && !conf_vertreter %] |
281 | 281 |
<th align="right">[% 'Salesman' | $T8 %]</th> |
282 |
<td> |
|
283 |
[%- INCLUDE generic/multibox.html |
|
284 |
name = 'salesman_id', |
|
285 |
DATA = ALL_SALESMEN, |
|
286 |
show_empty = 1, |
|
287 |
id_key = 'id', |
|
288 |
label_sub = 'salesman_label', |
|
289 |
-%] |
|
290 |
</td> |
|
282 |
<td>[% L.select_tag('salesman_id', L.options_for_select(ALL_SALESMEN, default=salesman_id, show_empty=1, title='safe_name')) %]</td> |
|
291 | 283 |
[%- END %] |
292 | 284 |
</tr> |
293 | 285 |
</table> |
... | ... | |
407 | 399 |
<input name="FU_date" id="FU_date" value="[% HTML.escape(FU_date) %]" size="12"> |
408 | 400 |
<input type="button" name="FU_date_button" id="FU_date_trigger" value="?"> |
409 | 401 |
[% 'for' | $T8 %] |
410 |
<select name="FU_created_for_user"> |
|
411 |
[%- FOREACH row = ALL_EMPLOYEES %] |
|
412 |
<option value="[% HTML.escape(row.id) %]"[% IF (NOTE_id && (row.id == FU_created_for_user)) || (row.login == login) %] selected[% END %]> |
|
413 |
[%- IF row.name %][%- HTML.escape(row.name) %] ([% HTML.escape(row.login) %])[% ELSE %][% HTML.escape(row.login) %][% END %] |
|
414 |
</option> |
|
415 |
[%- END %] |
|
416 |
</select> |
|
402 |
[% L.select_tag('FU_created_for_user', L.options_for_select(ALL_EMPLOYEES, default=(FU_created_for_user ? FU_created_for_user : USER.id), title='safe_name')) %] |
|
417 | 403 |
</td> |
418 | 404 |
</tr> |
419 | 405 |
|
Auch abrufbar als: Unified diff
gelöschte Benutzer in ct/form_header ausblenden