Revision ff338f61
Von Sven Schöling vor mehr als 11 Jahren hinzugefügt
SL/DB/Chart.pm | ||
---|---|---|
4 | 4 |
|
5 | 5 |
use SL::DB::MetaSetup::Chart; |
6 | 6 |
use SL::DB::Manager::Chart; |
7 |
use SL::DB::TaxKey; |
|
8 | 7 |
|
9 | 8 |
__PACKAGE__->meta->add_relationships(taxkeys => { type => 'one to many', |
10 | 9 |
class => 'SL::DB::TaxKey', |
... | ... | |
17 | 16 |
sub get_active_taxkey { |
18 | 17 |
my ($self, $date) = @_; |
19 | 18 |
$date ||= DateTime->today_local; |
19 |
require SL::DB::TaxKey; |
|
20 | 20 |
return SL::DB::Manager::TaxKey->get_all(query => [ and => [ chart_id => $self->id, |
21 | 21 |
startdate => { le => $date } ] ], |
22 | 22 |
sort_by => "startdate DESC")->[0]; |
Auch abrufbar als: Unified diff
Zirkuläres Include TaxKey -> Chart -> TaxKey aufbrechen