From 7ed8903a4ff6e75d34069eb3bdeba2cf4f8f11db Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 21 Oct 2010 11:34:45 +0200 Subject: [PATCH] =?utf8?q?accessoren=20f=C3=BCr=20income/expense=5Faccno?= =?utf8?q?=5Fid,=20die=20die=20postfix=20Indizes=20abstrahieren.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Buchungsgruppe.pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/SL/DB/Buchungsgruppe.pm b/SL/DB/Buchungsgruppe.pm index 2dffaa5a9..26f446b33 100644 --- a/SL/DB/Buchungsgruppe.pm +++ b/SL/DB/Buchungsgruppe.pm @@ -10,4 +10,20 @@ use SL::DB::MetaSetup::Buchungsgruppe; # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. __PACKAGE__->meta->make_manager_class; +sub income_accno_id { + my ($self, $taxzone) = @_; + my $taxzone_id = ref $taxzone && $taxzone->isa('SL::DB::TaxZone') ? $taxzone->id : $taxzone; + my $method = 'income_accno_id_' . $taxzone_id; + + return $self->$method; +} + +sub expense_accno_id { + my ($self, $taxzone) = @_; + my $taxzone_id = ref $taxzone && $taxzone->isa('SL::DB::TaxZone') ? $taxzone->id : $taxzone; + my $method = 'expense_accno_id_' . $taxzone_id; + + return $self->$method; +} + 1; -- 2.20.1