From: Thomas Heck Date: Fri, 3 May 2013 13:52:14 +0000 (+0200) Subject: Validity-Accessor für CVars X-Git-Tag: release-3.1.0beta1~161^2~42 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=cb146b01ef65090e36e9ab95743176f64ab8eed3;p=kivitendo-erp.git Validity-Accessor für CVars --- diff --git a/SL/DB/CustomVariable.pm b/SL/DB/CustomVariable.pm index 09718de65..83ee89db7 100644 --- a/SL/DB/CustomVariable.pm +++ b/SL/DB/CustomVariable.pm @@ -6,6 +6,7 @@ package SL::DB::CustomVariable; use strict; use SL::DB::MetaSetup::CustomVariable; +use SL::DB::CustomVariableValidity; __PACKAGE__->meta->initialize; @@ -22,4 +23,10 @@ sub value { goto &text_value; # text and select } +sub is_valid { + my ($self) = @_; + + return SL::DB::Manager::CustomVariableValidity->get_all_count(config_id => $self->config_id, trans_id => $self->trans_id) == 0; +} + 1;