]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Chart.pm
PriceTaxCalculator: chart->taxkey lookup vorberechnen
[mfinanz.git] / SL / DB / Chart.pm
index 718d42251cab9ae6e8664a0d5b2b0f55357c8d2b..db8a3b945c13805d60306361865f5d8b669db3ca 100644 (file)
@@ -16,6 +16,12 @@ __PACKAGE__->meta->initialize;
 sub get_active_taxkey {
   my ($self, $date) = @_;
   $date ||= DateTime->today_local;
+
+  my $cache = $::request->{cache}{chart}{$date};
+  if ($cache->{$self->id}) {
+    return $cache->{$self->id};
+  }
+
   require SL::DB::TaxKey;
   return SL::DB::Manager::TaxKey->get_all(query   => [ and => [ chart_id  => $self->id,
                                                                 startdate => { le => $date } ] ],