[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[4983] branches/1.3



Revision: 4983
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4983&view=rev
Author:   einhverfr
Date:     2012-07-14 09:04:15 +0000 (Sat, 14 Jul 2012)
Log Message:
-----------
Corrects bug  3537592, customer/vendor search results not subject to ordering

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/LedgerSMB/ScriptLib/Company.pm
    branches/1.3/lsmb-request.pl

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2012-07-14 08:46:06 UTC (rev 4982)
+++ branches/1.3/Changelog	2012-07-14 09:04:15 UTC (rev 4983)
@@ -14,12 +14,14 @@
 * Fixed inability to look up vendor by ECA with discounts (Erik H h/t Matt B)
 * Removed broken cash-basis reports (Chris T, h/t Jigme D
 * Backporting LedgerSMB::App_State to make other backports easier (Chris T)
+* Fixed Customer/Vendor search results unsorted (Chris T, h/t lbm, 3537592)
 
 Andres B is Andres Basile
 Brian W is Brian Wolf
 Chris T is Chris Travers
 Erik H is Erik Huelsmann
 Jigme D is JigmeDatse
+lbm is Louis Moore
 Matt B is Matthew Bourque
 
 Changelog for 1.3.19

Modified: branches/1.3/LedgerSMB/ScriptLib/Company.pm
===================================================================
--- branches/1.3/LedgerSMB/ScriptLib/Company.pm	2012-07-14 08:46:06 UTC (rev 4982)
+++ branches/1.3/LedgerSMB/ScriptLib/Company.pm	2012-07-14 09:04:15 UTC (rev 4983)
@@ -344,6 +344,7 @@
         
     my $company = new_company($request);
     set_entity_class($company);
+    $company->set_ordering({method => 'company__search', column => $request->{order_by}});
     $company->{contact_info} = 
              qq|{"%$request->{email}%","%$request->{phone}%"}|;
     my $results = $company->search();

Modified: branches/1.3/lsmb-request.pl
===================================================================
--- branches/1.3/lsmb-request.pl	2012-07-14 08:46:06 UTC (rev 4982)
+++ branches/1.3/lsmb-request.pl	2012-07-14 09:04:15 UTC (rev 4983)
@@ -106,6 +106,7 @@
   catch CancelFurtherProcessing with {
     my $ex = shift;
     $logger->debug("CancelFurtherProcessing \$ex=$ex");
+     $LedgerSMB::App_State::DBH->rollback if $LedgerSMB::App_State::DBH;
     LedgerSMB::App_State->cleanup();
   };
 }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.