[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5395] branches/1.3/scripts/recon.pl
- Subject: SF.net SVN: ledger-smb:[5395] branches/1.3/scripts/recon.pl
- From: ..hidden..
- Date: Sat, 22 Dec 2012 23:03:03 +0000
Revision: 5395
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5395&view=rev
Author: einhverfr
Date: 2012-12-22 23:02:59 +0000 (Sat, 22 Dec 2012)
Log Message:
-----------
Fixing problems sorting recon report lists by account
Modified Paths:
--------------
branches/1.3/scripts/recon.pl
Modified: branches/1.3/scripts/recon.pl
===================================================================
--- branches/1.3/scripts/recon.pl 2012-12-22 06:28:17 UTC (rev 5394)
+++ branches/1.3/scripts/recon.pl 2012-12-22 23:02:59 UTC (rev 5395)
@@ -156,7 +156,7 @@
$request->{submitted} = undef;
}
my $search = LedgerSMB::DBObject::Reconciliation->new(base => $request, copy => 'all');
- if ($search->{order_by}){
+ if ($search->{order_by} and $search->{order_by} ne 'account'){
$search->set_ordering({
method => 'reconciliation__search',
column => $search->{order_by},
@@ -171,6 +171,9 @@
for my $row (@results){
$row->{account} = $act_hash->{"$row->{chart_id}"};
}
+ if ($search->{order_by} eq 'account'){
+ sort {$a->{account} cmp $b->{account}} @results;
+ }
my $base_url = "recon.pl?action=display_report";
my $search_url = "recon.pl?action=get_results".
"&date_from=$search->{date_from}&date_to=$search->{date_to}".
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.