X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/44bd0e5177f6b04d1183911eb47118348d96c411..aae5bae7d37a440abdfab7cf5c36d4fe77ff68f3:/SL/GL.pm diff --git a/SL/GL.pm b/SL/GL.pm index 11cbe3646..3b0e74e82 100644 --- a/SL/GL.pm +++ b/SL/GL.pm @@ -38,6 +38,8 @@ package GL; +use Data::Dumper; + sub delete_transaction { my ($self, $myconfig, $form) = @_; $main::lxdebug->enter_sub(); @@ -350,8 +352,10 @@ sub all_transactions { map { $sortorder =~ s/$_/$ordinal{$_}/ } keys %ordinal; if ($form->{sort}) { - $sortorder = $form->{sort} . ',' . $sortorder; - } + $sortorder = $form->{sort} . ","; + } else { + $sortorder = ""; + } my $query = qq|SELECT g.id, 'gl' AS type, $false AS invoice, g.reference, ac.taxkey, t.taxkey AS sorttax, @@ -382,7 +386,7 @@ sub all_transactions { AND ac.chart_id = c.id AND a.vendor_id = ct.id AND a.id = ac.trans_id - ORDER BY $sortorder, oid|; + ORDER BY $sortorder transdate, trans_id, taxkey DESC, sorttax DESC,oid|; my $sth = $dbh->prepare($query); $sth->execute || $form->dberror($query); my $trans_id = ""; @@ -516,6 +520,7 @@ sub all_transactions { ($form->{gifi_account_description}) = $sth->fetchrow_array; $sth->finish; } + print(STDERR Dumper($form->{GL})); $main::lxdebug->leave_sub(); $dbh->disconnect;