Revision 7ed8903a
Von Sven Schöling vor etwa 14 Jahren hinzugefügt
SL/DB/Buchungsgruppe.pm | ||
---|---|---|
10 | 10 |
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. |
11 | 11 |
__PACKAGE__->meta->make_manager_class; |
12 | 12 |
|
13 |
sub income_accno_id { |
|
14 |
my ($self, $taxzone) = @_; |
|
15 |
my $taxzone_id = ref $taxzone && $taxzone->isa('SL::DB::TaxZone') ? $taxzone->id : $taxzone; |
|
16 |
my $method = 'income_accno_id_' . $taxzone_id; |
|
17 |
|
|
18 |
return $self->$method; |
|
19 |
} |
|
20 |
|
|
21 |
sub expense_accno_id { |
|
22 |
my ($self, $taxzone) = @_; |
|
23 |
my $taxzone_id = ref $taxzone && $taxzone->isa('SL::DB::TaxZone') ? $taxzone->id : $taxzone; |
|
24 |
my $method = 'expense_accno_id_' . $taxzone_id; |
|
25 |
|
|
26 |
return $self->$method; |
|
27 |
} |
|
28 |
|
|
13 | 29 |
1; |
Auch abrufbar als: Unified diff
accessoren für income/expense_accno_id, die die postfix Indizes abstrahieren.