X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FCustomVariable.pm;h=dd32ef9cbc404faf37136c911a9a88ba6efba4c0;hb=1561b7f3d98390ba97bd5a81945f16e82d96915b;hp=6073925bfffa85ec4ccab97d929012a3449d5e8f;hpb=be5edc51066e3aec49b02c04e21762f9e112ea47;p=kivitendo-erp.git 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