Revision d2ed673e
Von Jan Büren vor mehr als 4 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
2113 | 2113 |
$main::lxdebug->leave_sub(); |
2114 | 2114 |
} |
2115 | 2115 |
|
2116 |
sub _get_taxcharts { |
|
2117 |
$main::lxdebug->enter_sub(); |
|
2118 |
|
|
2119 |
my ($self, $dbh, $params) = @_; |
|
2120 |
|
|
2121 |
my $key = "all_taxcharts"; |
|
2122 |
my @where; |
|
2123 |
|
|
2124 |
if (ref $params eq 'HASH') { |
|
2125 |
$key = $params->{key} if ($params->{key}); |
|
2126 |
if ($params->{module} eq 'AR') { |
|
2127 |
push @where, 'chart_categories ~ \'[ACILQ]\''; |
|
2128 |
|
|
2129 |
} elsif ($params->{module} eq 'AP') { |
|
2130 |
push @where, 'chart_categories ~ \'[ACELQ]\''; |
|
2131 |
} |
|
2132 |
|
|
2133 |
} elsif ($params) { |
|
2134 |
$key = $params; |
|
2135 |
} |
|
2136 |
|
|
2137 |
my $where = @where ? ' WHERE ' . join(' AND ', map { "($_)" } @where) : ''; |
|
2138 |
|
|
2139 |
my $query = qq|SELECT * FROM tax $where ORDER BY taxkey, rate|; |
|
2140 |
|
|
2141 |
$self->{$key} = selectall_hashref_query($self, $dbh, $query); |
|
2142 |
|
|
2143 |
$main::lxdebug->leave_sub(); |
|
2144 |
} |
|
2145 |
|
|
2146 | 2116 |
sub _get_taxzones { |
2147 | 2117 |
$main::lxdebug->enter_sub(); |
2148 | 2118 |
|
... | ... | |
2397 | 2367 |
$self->_get_charts($dbh, $params{"charts"}); |
2398 | 2368 |
} |
2399 | 2369 |
|
2400 |
if ($params{"taxcharts"}) { |
|
2401 |
$self->_get_taxcharts($dbh, $params{"taxcharts"}); |
|
2402 |
} |
|
2403 |
|
|
2404 | 2370 |
if ($params{"taxzones"}) { |
2405 | 2371 |
$self->_get_taxzones($dbh, $params{"taxzones"}); |
2406 | 2372 |
} |
Auch abrufbar als: Unified diff
Form: Backend-Funktion get_taxcharts entfernt
Toter Code, die ALL_TAXCHARTS werden nicht mehr verwendet
Aufruf auch in ar.pl entfernt