From d7a9026aeace4b76b815a276c61b90feac1724f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 28 Jun 2013 14:21:25 +0200 Subject: [PATCH] Nachtrag zu Steuerzonen: benutzte Klassen mit require einbinden. --- SL/DB/Buchungsgruppe.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/SL/DB/Buchungsgruppe.pm b/SL/DB/Buchungsgruppe.pm index bac0f7bcb..e71d0f270 100644 --- a/SL/DB/Buchungsgruppe.pm +++ b/SL/DB/Buchungsgruppe.pm @@ -39,6 +39,10 @@ sub inventory_accno_description { sub income_accno_id { my ($self, $taxzone) = @_; + + require SL::DB::TaxZone; + require SL::DB::TaxzoneChart; + my $taxzone_id = ref $taxzone && $taxzone->isa('SL::DB::TaxZone') ? $taxzone->id : $taxzone; my $taxzone_chart = SL::DB::Manager::TaxzoneChart->find_by(taxzone_id => $taxzone_id, buchungsgruppen_id => $self->id); return $taxzone_chart->income_accno_id if $taxzone_chart; @@ -46,6 +50,9 @@ sub income_accno_id { sub expense_accno_id { my ($self, $taxzone) = @_; + require SL::DB::TaxZone; + require SL::DB::TaxzoneChart; + my $taxzone_id = ref $taxzone && $taxzone->isa('SL::DB::TaxZone') ? $taxzone->id : $taxzone; my $taxzone_chart = SL::DB::Manager::TaxzoneChart->find_by(taxzone_id => $taxzone_id, buchungsgruppen_id => $self->id); return $taxzone_chart->expense_accno_id if $taxzone_chart; @@ -53,6 +60,10 @@ sub expense_accno_id { sub income_account { my ($self, $taxzone) = @_; + + require SL::DB::TaxZone; + require SL::DB::TaxzoneChart; + my $taxzone_id = ref $taxzone && $taxzone->isa('SL::DB::TaxZone') ? $taxzone->id : $taxzone; my $taxzone_chart = SL::DB::Manager::TaxzoneChart->find_by(taxzone_id => $taxzone_id, buchungsgruppen_id => $self->id); return $taxzone_chart->income_accno if $taxzone_chart; @@ -60,6 +71,10 @@ sub income_account { sub expense_account { my ($self, $taxzone) = @_; + + require SL::DB::TaxZone; + require SL::DB::TaxzoneChart; + my $taxzone_id = ref $taxzone && $taxzone->isa('SL::DB::TaxZone') ? $taxzone->id : $taxzone; my $taxzone_chart = SL::DB::Manager::TaxzoneChart->find_by(taxzone_id => $taxzone_id, buchungsgruppen_id => $self->id); return $taxzone_chart->expense_accno if $taxzone_chart; -- 2.20.1