]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/DB/CustomVariable.pm
SL::DB::CustomVariable->value: undef anstelle von 0 wenn ref.Objekt nicht existiert
[kivitendo-erp.git] / SL / DB / CustomVariable.pm
index 7e6b5008079dff871a9d51ca7ec30e0106284677..4be4b6ef26a412abc719097474cc17c56cf5f0a3 100644 (file)
@@ -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