From: Moritz Bunkus Date: Mon, 14 Jul 2008 10:30:03 +0000 (+0000) Subject: 1. Salesman-Daten wurden nicht in $form eingetragen, weil die User-Klasse nur noch... X-Git-Tag: release-2.6.0beta1~53 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0534e31033f43074b6e4ae2a1178609bd15e9813;p=kivitendo-erp.git 1. Salesman-Daten wurden nicht in $form eingetragen, weil die User-Klasse nur noch einen Parameter erwartet. 2. Kosmetik. --- diff --git a/SL/Form.pm b/SL/Form.pm index 5fcd09ef8..6e7ef63f6 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1890,21 +1890,15 @@ sub get_salesman { $main::lxdebug->leave_sub() and return unless $salesman_id; - my $dbh = $self->get_standard_dbh($myconfig); - - my ($login) = - selectrow_query($self, $dbh, qq|SELECT login FROM employee WHERE id = ?|, - $salesman_id); + my $dbh = $self->get_standard_dbh($myconfig); + my ($login) = selectrow_query($self, $dbh, qq|SELECT login FROM employee WHERE id = ?|, $salesman_id); if ($login) { - my $user = new User($main::memberfile, $login); - map({ $self->{"salesman_$_"} = $user->{$_}; } - qw(address businessnumber co_ustid company duns email fax name - taxnumber tel)); - $self->{salesman_login} = $login; - - $self->{salesman_name} = $login - if ($self->{salesman_name} eq ""); + my $user = User->new($login); + map { $self->{"salesman_$_"} = $user->{$_}; } qw(address businessnumber co_ustid company duns email fax name taxnumber tel); + + $self->{salesman_login} = $login; + $self->{salesman_name} ||= $login; } $main::lxdebug->leave_sub();