X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/fe4751dee76f518853a0546a2b0ef4149c2324c4..42e01a1aa0f5be9e984932de7b01357e14d74d09:/SL/DB/CustomVariable.pm diff --git a/SL/DB/CustomVariable.pm b/SL/DB/CustomVariable.pm index 7e6b50080..4be4b6ef2 100644 --- a/SL/DB/CustomVariable.pm +++ b/SL/DB/CustomVariable.pm @@ -64,17 +64,17 @@ sub value { require SL::DB::Customer; my $id = int($self->number_value); - return $id ? SL::DB::Customer->new(id => $id)->load() : 0; + return $id ? SL::DB::Customer->new(id => $id)->load() : undef; } elsif ( $type eq 'vendor' ) { require SL::DB::Vendor; my $id = int($self->number_value); - return $id ? SL::DB::Vendor->new(id => $id)->load() : 0; + return $id ? SL::DB::Vendor->new(id => $id)->load() : undef; } elsif ( $type eq 'part' ) { require SL::DB::Part; my $id = int($self->number_value); - return $id ? SL::DB::Part->new(id => $id)->load() : 0; + return $id ? SL::DB::Part->new(id => $id)->load() : undef; } goto &text_value; # text, textfield, date and select