X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FCustomVariable.pm;h=edc595ce482f4ab35c39af437b278fec42822ed7;hb=cc6da32007ec4ba8f51719720fb90b3c275945ce;hp=c90e03800b935487d079dc2c5c32aa71c9bb0394;hpb=cb44d4433f14900820da519b9f9016342fde1b24;p=kivitendo-erp.git diff --git a/SL/DB/CustomVariable.pm b/SL/DB/CustomVariable.pm index c90e03800..edc595ce4 100644 --- a/SL/DB/CustomVariable.pm +++ b/SL/DB/CustomVariable.pm @@ -4,10 +4,7 @@ package SL::DB::CustomVariable; use strict; - use SL::DB::MetaSetup::CustomVariable; -use SL::DB::CustomVariableValidity; -use SL::DB::Customer; __PACKAGE__->meta->initialize; @@ -26,6 +23,8 @@ sub value { goto &number_value; } else { + require SL::DB::Customer; + my $id = int($self->number_value); return $id ? SL::DB::Customer->new(id => $id)->load() : 0; } @@ -36,6 +35,8 @@ sub value { sub is_valid { my ($self) = @_; + require SL::DB::CustomVariableValidity; + return SL::DB::Manager::CustomVariableValidity->get_all_count(config_id => $self->config_id, trans_id => $self->trans_id) == 0; }