Revision 2ff471a7
Von Moritz Bunkus vor fast 18 Jahren hinzugefügt
bin/mozilla/oe.pl | ||
---|---|---|
167 | 167 |
# set jscalendar |
168 | 168 |
$form->{jscalendar} = $jscalendar; |
169 | 169 |
|
170 |
my $editing = $form->{id}; |
|
171 |
|
|
170 | 172 |
OE->retrieve(\%myconfig, \%$form); |
171 | 173 |
|
172 | 174 |
if ($form->{payment_id}) { |
... | ... | |
179 | 181 |
$taxzone_id = $form->{taxzone_id}; |
180 | 182 |
} |
181 | 183 |
|
184 |
$salesman_id = $form->{salesman_id} if ($editing); |
|
185 |
|
|
182 | 186 |
|
183 | 187 |
# if multiple rowcounts (== collective order) then check if the |
184 | 188 |
# there were more than one customer (in that case OE::retrieve removes |
... | ... | |
282 | 286 |
# forex |
283 | 287 |
$form->{forex} = $form->{exchangerate}; |
284 | 288 |
|
289 |
$form->{salesman_id} = $salesman_id if ($editing); |
|
290 |
|
|
285 | 291 |
$lxdebug->leave_sub(); |
286 | 292 |
} |
287 | 293 |
|
... | ... | |
418 | 424 |
"shipto" => "ALL_SHIPTO", |
419 | 425 |
"projects" => { "key" => "ALL_PROJECTS", |
420 | 426 |
"all" => 0, |
421 |
"old_id" => \@old_project_ids }); |
|
427 |
"old_id" => \@old_project_ids }, |
|
428 |
"employees" => "ALL_SALESMEN"); |
|
422 | 429 |
|
423 | 430 |
my (%labels, @values); |
424 | 431 |
foreach my $item (@{ $form->{"ALL_CONTACTS"} }) { |
... | ... | |
456 | 463 |
'-labels' => \%labels, |
457 | 464 |
'-default' => $form->{"globalproject_id"})); |
458 | 465 |
|
466 |
$salesman = ""; |
|
467 |
if ($form->{type} =~ /^sales_/) { |
|
468 |
%labels = (); |
|
469 |
@values = (""); |
|
470 |
foreach my $item (@{ $form->{ALL_SALESMEN} }) { |
|
471 |
push(@values, $item->{id}); |
|
472 |
$labels{$item->{id}} = $item->{name} ne "" ? $item->{name} : $item->{login}; |
|
473 |
} |
|
474 |
|
|
475 |
$salesman = |
|
476 |
qq|<tr> |
|
477 |
<th align="right">| . $locale->text('Salesman') . qq|</th> |
|
478 |
<td>| . |
|
479 |
NTI($cgi->popup_menu('-name' => 'salesman_id', '-default' => $form->{salesman_id}, |
|
480 |
'-values' => \@values, '-labels' => \%labels)) |
|
481 |
. qq|</td> |
|
482 |
</tr>|; |
|
483 |
} |
|
484 |
|
|
459 | 485 |
$form->{exchangerate} = |
460 | 486 |
$form->format_amount(\%myconfig, $form->{exchangerate}); |
461 | 487 |
|
... | ... | |
803 | 829 |
<table> |
804 | 830 |
$openclosed |
805 | 831 |
$employee |
832 |
$salesman |
|
806 | 833 |
$ordnumber |
807 | 834 |
<tr> |
808 | 835 |
<th width="70%" align="right" nowrap>| . $locale->text('Project Number') . qq|</th> |
Auch abrufbar als: Unified diff
Speichern und Anzeigen eines Verkäufers bei Verkaufsmasken.