From a93cb8e05a630e66130cdfcf3287fd530d78cac6 Mon Sep 17 00:00:00 2001
From: Philip Reetz
Date: Fri, 13 Jan 2006 15:16:50 +0000
Subject: [PATCH] Fehler im Buchungsjournal, Steuern wurden separat angezeigt,
gefixed und jetzt auch sortierung moeglich
---
SL/GL.pm | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/SL/GL.pm b/SL/GL.pm
index 11cbe3646..8ec98c8e5 100644
--- a/SL/GL.pm
+++ b/SL/GL.pm
@@ -350,8 +350,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 +384,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 = "";
--
2.20.1