X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/e3810fbd565d14993f6b5a6fe89f0e4e27c95869..a94080db277740fb7666781601a83ada92ff38c2:/SL/DB/CustomVariable.pm diff --git a/SL/DB/CustomVariable.pm b/SL/DB/CustomVariable.pm index 4be4b6ef2..560a2de6f 100644 --- a/SL/DB/CustomVariable.pm +++ b/SL/DB/CustomVariable.pm @@ -103,7 +103,8 @@ sub value_as_text { require SL::DB::Vendor; my $id = int($self->number_value); - return $id ? SL::DB::Vendor->new(id => $id)->load() : 0; + my $vendor = $id ? SL::DB::Vendor->new(id => $id)->load() : 0; + return $vendor ? $vendor->name : ''; } elsif ( $type eq 'part' ) { require SL::DB::Part;