Revision 797ad4c5
Von Moritz Bunkus vor fast 16 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
2077 | 2077 |
sub _get_taxcharts { |
2078 | 2078 |
$main::lxdebug->enter_sub(); |
2079 | 2079 |
|
2080 |
my ($self, $dbh, $key) = @_; |
|
2080 |
my ($self, $dbh, $params) = @_; |
|
2081 |
|
|
2082 |
my $key = "all_taxcharts"; |
|
2083 |
my @where; |
|
2084 |
|
|
2085 |
if (ref $params eq 'HASH') { |
|
2086 |
$key = $params->{key} if ($params->{key}); |
|
2087 |
if ($params->{module} eq 'AR') { |
|
2088 |
push @where, 'taxkey NOT IN (8, 9, 18, 19)'; |
|
2089 |
|
|
2090 |
} elsif ($params->{module} eq 'AP') { |
|
2091 |
push @where, 'taxkey NOT IN (1, 2, 3, 12, 13)'; |
|
2092 |
} |
|
2093 |
|
|
2094 |
} elsif ($params) { |
|
2095 |
$key = $params; |
|
2096 |
} |
|
2081 | 2097 |
|
2082 |
$key = "all_taxcharts" unless ($key);
|
|
2098 |
my $where = ' WHERE ' . join(' AND ', map { "($_)" } @where) if (@where);
|
|
2083 | 2099 |
|
2084 |
my $query = qq|SELECT * FROM tax ORDER BY taxkey|; |
|
2100 |
my $query = qq|SELECT * FROM tax $where ORDER BY taxkey|;
|
|
2085 | 2101 |
|
2086 | 2102 |
$self->{$key} = selectall_hashref_query($self, $dbh, $query); |
2087 | 2103 |
|
Auch abrufbar als: Unified diff
Bei Kreditorenbuchungen die Umsatzsteuer-Steuerschlüssel und bei Debitorenbuchungen die Vorsteuer-Steuerschlüssel nicht anzeigen.