From: Bernd Bleßmann Date: Fri, 28 Jun 2013 12:21:25 +0000 (+0200) Subject: Nachtrag zu Steuerzonen: benutzte Klassen mit require einbinden. X-Git-Tag: release-3.2.0beta~372 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/commitdiff_plain/d7a9026aeace4b76b815a276c61b90feac1724f8 Nachtrag zu Steuerzonen: benutzte Klassen mit require einbinden. --- 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;