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;
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;
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;
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;
=item C<expense_accno_id $taxzone>
Return the chart ID for the expense account for the given taxzone
-(either an integer between 0 and 3 inclusively or an instance of
-L<SL::DB::TaxZone>).
+(either the DB id or an instance of L<SL::DB::TaxZone>).
=item C<expense_account>
Return the chart (an instance of L<SL::DB::Chart>) for the expense
-account for the given taxzone (either an integer between 0 and 3
-inclusively or an instance of L<SL::DB::TaxZone>).
+account for the given taxzone (either the DB id or an instance of
+L<SL::DB::TaxZone>).
=item C<income_accno_id>
Return the chart ID for the income account for the given taxzone
-(either an integer between 0 and 3 inclusively or an instance of
+(either the DB id or an instance of L<SL::DB::TaxZone>).
L<SL::DB::TaxZone>).
=item C<income_account>
Return the chart (an instance of L<SL::DB::Chart>) for the income
-account for the given taxzone (either an integer between 0 and 3
-inclusively or an instance of L<SL::DB::TaxZone>).
+account for the given taxzone (either the DB id or an instance of
+L<SL::DB::TaxZone>).
=back