X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/486d0a3bc8e6ff90823a1b5e0461d0b61c11b771..f60e94b5ac8c2a20711101a551534bb7a0276d6c:/SL/AM.pm diff --git a/SL/AM.pm b/SL/AM.pm index 0ba1ec8f5..b7c60033b 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -106,7 +106,7 @@ sub get_account { # get the taxkeys of the account $form->{ACCOUNT_TAXKEYS} = []; - foreach my $taxkey ( @{ $chart_obj->taxkeys } ) { + foreach my $taxkey ( sort { $b->startdate <=> $a->startdate } @{ $chart_obj->taxkeys } ) { push @{ $form->{ACCOUNT_TAXKEYS} }, { id => $taxkey->id, chart_id => $taxkey->chart_id, tax_id => $taxkey->tax_id, @@ -1207,7 +1207,7 @@ sub _save_tax { chart_categories, id ) - VALUES (?, ?, ?, ?, (SELECT accno FROM chart WHERE id = ?), ?, ?, ?, ?)|; + VALUES (?, ?, ?, ?, ?, ?, ?, ?)|; } push(@values, $form->{id}); do_query($form, $dbh, $query, @values);