6 Jan 2006 00:17
[SVN: lx-office-erp] r737 - trunk/unstable/SL
SVN commit mailer <m.bunkus <at> linet-services.de>
2006-01-05 23:17:40 GMT
2006-01-05 23:17:40 GMT
Author: udo_spallek
Date: 2006-01-06 00:17:36 +0100 (Fri, 06 Jan 2006)
New Revision: 737
Modified:
trunk/unstable/SL/GL.pm
Log:
BUG 125 solved. (Dank an Hartmut Goebel)
Modified: trunk/unstable/SL/GL.pm
===================================================================
--- trunk/unstable/SL/GL.pm 2006-01-03 17:05:02 UTC (rev 736)
+++ trunk/unstable/SL/GL.pm 2006-01-05 23:17:36 UTC (rev 737)
<at> <at> -342,6 +342,17 <at> <at>
my $false = ($myconfig->{dbdriver} eq 'Pg') ? FALSE: q|'0'|;
+ my $sortorder = join ', ', $form->sort_columns(qw(transdate reference source description accno));
+ my %ordinal = ( transdate => 6,
+ reference => 4,
+ source => 7,
+ description => 5 );
+ map { $sortorder =~ s/$_/$ordinal{$_}/ } keys %ordinal;
+
+ if ($form->{sort}) {
+ $sortorder = $form->{sort} . ',' . $sortorder;
+ }
+
my $query =
qq|SELECT g.id, 'gl' AS type, $false AS invoice, g.reference, ac.taxkey, t.taxkey AS sorttax,
g.description, ac.transdate, ac.source, ac.trans_id,
<at> <at> -371,7 +382,7 <at> <at>
AND ac.chart_id = c.id
AND a.vendor_id = ct.id
AND a.id = ac.trans_id
- ORDER BY transdate, trans_id, taxkey DESC, sorttax DESC, oid|;
+ ORDER BY $sortorder, oid|;
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
my $trans_id = "";
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
RSS Feed