X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/be5edc51066e3aec49b02c04e21762f9e112ea47..766f5705ecb9cd56adfbffd94c871959bb64c6fd:/SL/DB/CustomVariable.pm diff --git a/SL/DB/CustomVariable.pm b/SL/DB/CustomVariable.pm index 6073925bf..dd32ef9cb 100644 --- a/SL/DB/CustomVariable.pm +++ b/SL/DB/CustomVariable.pm @@ -15,7 +15,7 @@ sub value { my $self = $_[0]; my $type = $self->config->type; - goto &bool_value if $type eq 'boolean'; + goto &bool_value if $type eq 'bool'; goto ×tamp_value if $type eq 'timestamp'; goto &number_value if $type eq 'number'; @@ -70,8 +70,8 @@ sub value_as_text { require SL::DB::Part; my $id = int($self->number_value); - my $vendor = $id ? SL::DB::Part->new(id => $id)->load() : 0; - return $vendor ? $vendor->name : ''; + my $part = $id ? SL::DB::Part->new(id => $id)->load() : 0; + return $part ? $part->description : ''; } goto &text_value; # text, textfield, date and select