Revision 0c1285eb
Von Kivitendo Admin vor mehr als 9 Jahren hinzugefügt
SL/DB/TaxzoneChart.pm | ||
---|---|---|
24 | 24 |
|
25 | 25 |
# inventory_accno and description of the Buchungsgruppe: |
26 | 26 |
$list{inventory_accno} = SL::DB::Manager::Buchungsgruppe->find_by(id => $buchungsgruppen_id)->inventory_account->accno; |
27 |
$list{inventory_accno_description} = SL::DB::Manager::Buchungsgruppe->find_by(id => $buchungsgruppen_id)->inventory_account->description;
|
|
27 |
$list{inventory_accno_description} = SL::DB::Manager::Buchungsgruppe->find_by(id => $buchungsgruppen_id)->inventory_account->displayable_name;
|
|
28 | 28 |
|
29 | 29 |
foreach my $taxzonechart (@{ $all_taxzonecharts }) { |
30 | 30 |
$list{ $taxzonechart->taxzone_id }{taxzone_chart_id} = $taxzonechart->id; |
31 |
$list{ $taxzonechart->taxzone_id }{income_accno} = $taxzonechart->get_income_accno;
|
|
32 |
$list{ $taxzonechart->taxzone_id }{expense_accno} = $taxzonechart->get_expense_accno;
|
|
33 |
$list{ $taxzonechart->taxzone_id }{income_accno_id} = $taxzonechart->income_accno_id;
|
|
34 |
$list{ $taxzonechart->taxzone_id }{expense_accno_id} = $taxzonechart->expense_accno_id;
|
|
35 |
$list{ $taxzonechart->taxzone_id }{income_accno_description} = $taxzonechart->get_income_accno_description;
|
|
36 |
$list{ $taxzonechart->taxzone_id }{expense_accno_description} = $taxzonechart->get_expense_accno_description;
|
|
31 |
$list{ $taxzonechart->taxzone_id }{income_accno} = $taxzonechart->income_accno->accno;
|
|
32 |
$list{ $taxzonechart->taxzone_id }{expense_accno} = $taxzonechart->expense_accno->accno;
|
|
33 |
$list{ $taxzonechart->taxzone_id }{income_accno_id} = $taxzonechart->income_accno->id;
|
|
34 |
$list{ $taxzonechart->taxzone_id }{expense_accno_id} = $taxzonechart->expense_accno->id;
|
|
35 |
$list{ $taxzonechart->taxzone_id }{income_accno_description} = $taxzonechart->income_accno->displayable_name;
|
|
36 |
$list{ $taxzonechart->taxzone_id }{expense_accno_description} = $taxzonechart->expense_accno->displayable_name;
|
|
37 | 37 |
} |
38 | 38 |
return \%list; |
39 | 39 |
} |
... | ... | |
47 | 47 |
|
48 | 48 |
foreach my $tzchart (@{ $all_taxzonecharts }) { |
49 | 49 |
$list{ $tzchart->buchungsgruppen_id }{taxzone_chart_id} = $tzchart->id; |
50 |
$list{ $tzchart->buchungsgruppen_id }{income_accno} = $tzchart->get_income_accno;
|
|
51 |
$list{ $tzchart->buchungsgruppen_id }{expense_accno} = $tzchart->get_expense_accno;
|
|
52 |
$list{ $tzchart->buchungsgruppen_id }{income_accno_id} = $tzchart->income_accno_id;
|
|
53 |
$list{ $tzchart->buchungsgruppen_id }{expense_accno_id} = $tzchart->expense_accno_id;
|
|
54 |
$list{ $tzchart->buchungsgruppen_id }{income_accno_description} = $tzchart->get_income_accno_description;
|
|
55 |
$list{ $tzchart->buchungsgruppen_id }{expense_accno_description} = $tzchart->get_expense_accno_description;
|
|
50 |
$list{ $tzchart->buchungsgruppen_id }{income_accno} = $tzchart->income_accno->accno;
|
|
51 |
$list{ $tzchart->buchungsgruppen_id }{expense_accno} = $tzchart->expense_accno->accno;
|
|
52 |
$list{ $tzchart->buchungsgruppen_id }{income_accno_id} = $tzchart->income_accno->id;
|
|
53 |
$list{ $tzchart->buchungsgruppen_id }{expense_accno_id} = $tzchart->expense_accno->id;
|
|
54 |
$list{ $tzchart->buchungsgruppen_id }{income_accno_description} = $tzchart->income_accno->displayable_name;
|
|
55 |
$list{ $tzchart->buchungsgruppen_id }{expense_accno_description} = $tzchart->expense_accno->displayable_name;
|
|
56 | 56 |
} |
57 | 57 |
|
58 | 58 |
return \%list; |
59 | 59 |
} |
60 | 60 |
|
61 |
sub get_income_accno { |
|
62 |
my $self = shift; |
|
63 |
require SL::DB::Manager::Chart; |
|
64 |
return SL::DB::Manager::Chart->find_by(id => $self->income_accno_id)->accno(); |
|
65 |
} |
|
66 |
|
|
67 |
sub get_expense_accno { |
|
68 |
my $self = shift; |
|
69 |
require SL::DB::Manager::Chart; |
|
70 |
return SL::DB::Manager::Chart->find_by(id => $self->expense_accno_id)->accno(); |
|
71 |
} |
|
72 |
|
|
73 |
sub get_income_accno_description { |
|
74 |
my $self = shift; |
|
75 |
require SL::DB::Manager::Chart; |
|
76 |
return SL::DB::Manager::Chart->find_by(id => $self->income_accno_id)->description(); |
|
77 |
} |
|
78 |
|
|
79 |
sub get_expense_accno_description { |
|
80 |
my $self = shift; |
|
81 |
require SL::DB::Manager::Chart; |
|
82 |
return SL::DB::Manager::Chart->find_by(id => $self->expense_accno_id)->description(); |
|
83 |
} |
|
84 |
|
|
85 | 61 |
1; |
Auch abrufbar als: Unified diff
TaxzoneChart displayable_name und refactoring
displayable_name für die Kontenbeschreibung benutzen.
Statt eigener Methoden in TaxzoneChart die Foreign Key Verknüpfungen von
Rose nutzen.