X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/9d2d867c1a5569ea0ddee859f77f9edead770720..b776c6ba9ed5a14b60aabdf841e87e8dea3c0c39:/SL/GL.pm 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;