From 820545bc126db779c7982730c12a9131eff8157f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 1 Jun 2007 13:08:02 +0000 Subject: [PATCH] =?utf8?q?Verkaufsrechnung:=20Die=20Drop-Down-Box=20f?= =?utf8?q?=C3=BCr=20den=20Bearbeiter=20hei=C3=9Ft=20nun=20employee=5Fid=20?= =?utf8?q?(wie=20auch=20in=20oe.pl)=20und=20wird=20richtig=20bef=C3=BCllt?= =?utf8?q?=20und=20vorausgew=C3=A4hlt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/IS.pm | 3 +-- bin/mozilla/is.pl | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/SL/IS.pm b/SL/IS.pm index 97f6fef05..7b6752889 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -489,8 +489,7 @@ sub post_invoice { my ($query, $sth, $null, $project_id, $deliverydate, @values); my $exchangerate = 0; - ($null, $form->{employee_id}) = split(/--/, $form->{employee}); - unless ($form->{employee_id}) { + if (!$form->{employee_id}) { $form->get_employee($dbh); } diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 693914fa7..b8eb07479 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -357,14 +357,14 @@ sub form_header { @values = (); foreach my $item (@{ $form->{"ALL_SALESMEN"} }) { push(@values, $item->{"id"}); - $labels{$item->{"id"}} = $item->{"name"}; + $labels{$item->{id}} = $item->{name} ne "" ? $item->{name} : $item->{login}; } my $employees = qq| | . $locale->text('Employee') . qq| | . - NTI($cgi->popup_menu('-name' => 'employee', '-default' => $form->{"employee_id"}, + NTI($cgi->popup_menu('-name' => 'employee_id', '-default' => $form->{"employee_id"}, '-values' => \@values, '-labels' => \%labels)) . qq| |; @@ -438,7 +438,7 @@ sub form_header { '-default' => $form->{"globalproject_id"})); %labels = (); - @values = (""); + @values = (); foreach my $item (@{ $form->{ALL_SALESMEN} }) { push(@values, $item->{id}); $labels{$item->{id}} = $item->{name} ne "" ? $item->{name} : $item->{login}; @@ -448,8 +448,8 @@ sub form_header { qq| | . $locale->text('Salesman') . qq| | . - NTI($cgi->popup_menu('-name' => 'salesman_id', '-default' => $form->{salesman_id}, - '-values' => \@values, '-labels' => \%labels)) + NTI($cgi->popup_menu('-name' => 'salesman_id', '-default' => $form->{salesman_id} ? $form->{salesman_id} : $form->{employee_id}, + '-values' => \@values, '-labels' => \%labels)) . qq| |; -- 2.20.1