From ff338f61ac95e8e276e61b71d6dcbf73680300aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 21 Jun 2013 10:30:41 +0200 Subject: [PATCH] =?utf8?q?Zirkul=C3=A4res=20Include=20TaxKey=20->=20Chart?= =?utf8?q?=20->=20TaxKey=20aufbrechen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Chart.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/DB/Chart.pm b/SL/DB/Chart.pm index 70019c6fb..718d42251 100644 --- a/SL/DB/Chart.pm +++ b/SL/DB/Chart.pm @@ -4,7 +4,6 @@ use strict; use SL::DB::MetaSetup::Chart; use SL::DB::Manager::Chart; -use SL::DB::TaxKey; __PACKAGE__->meta->add_relationships(taxkeys => { type => 'one to many', class => 'SL::DB::TaxKey', @@ -17,6 +16,7 @@ __PACKAGE__->meta->initialize; sub get_active_taxkey { my ($self, $date) = @_; $date ||= DateTime->today_local; + require SL::DB::TaxKey; return SL::DB::Manager::TaxKey->get_all(query => [ and => [ chart_id => $self->id, startdate => { le => $date } ] ], sort_by => "startdate DESC")->[0]; -- 2.20.1