X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FGL.pm;h=f97e2b2489da2c586a8fa221bd0a57764ad46300;hb=0152cc2e4e1e451cb51d4d3fd8a0e450eff5efcb;hp=594d57c7f8ff1bda887b76440fde6c83bb24ef99;hpb=9d2d867c1a5569ea0ddee859f77f9edead770720;p=kivitendo-erp.git diff --git a/SL/GL.pm b/SL/GL.pm index 594d57c7f..f97e2b248 100644 --- a/SL/GL.pm +++ b/SL/GL.pm @@ -789,23 +789,26 @@ sub get_chart_balances { } sub get_tax_dropdown { + my ($self, $accno) = @_; + my $myconfig = \%main::myconfig; my $form = $main::form; my $dbh = $form->get_standard_dbh($myconfig); my $query = qq|SELECT category FROM chart WHERE accno = ?|; - my ($category) = selectrow_query($form, $dbh, $query, $form->{accno}); + my ($category) = selectrow_query($form, $dbh, $query, $accno); $query = qq|SELECT * FROM tax WHERE chart_categories like '%$category%' order by taxkey, rate|; my $sth = prepare_execute_query($form, $dbh, $query); - $form->{TAX_ACCOUNTS} = []; + my @tax_accounts = (); while (my $ref = $sth->fetchrow_hashref("NAME_lc")) { - push(@{ $form->{TAX_ACCOUNTS} }, $ref); + push(@tax_accounts, $ref); } + return @tax_accounts; } 1;