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

SF.net SVN: ledger-smb:[5940] trunk/LedgerSMB/Scripts/contact.pm



Revision: 5940
          http://sourceforge.net/p/ledger-smb/code/5940
Author:   einhverfr
Date:     2013-08-08 11:17:58 +0000 (Thu, 08 Aug 2013)
Log Message:
-----------
Correcting double rendering pricelist

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/contact.pm

Modified: trunk/LedgerSMB/Scripts/contact.pm
===================================================================
--- trunk/LedgerSMB/Scripts/contact.pm	2013-08-08 11:06:20 UTC (rev 5939)
+++ trunk/LedgerSMB/Scripts/contact.pm	2013-08-08 11:17:58 UTC (rev 5940)
@@ -720,8 +720,10 @@
 
 sub save_pricelist {
     my ($request) = @_;
+    use LedgerSMB::App_State;
     use LedgerSMB::ScriptLib::Common_Search::Part;
     use LedgerSMB::DBObject::Pricelist;
+
     my $count = $request->{rowcount_pricematrix};
 
     my $pricelist = LedgerSMB::DBObject::Pricelist->new({base => $request});
@@ -773,11 +775,12 @@
     $pricelist->save(..hidden..);
 
     # Return to UI
-
-    get_pricelist($request) unless $redirect_to_selection;
-
-    $request->{search_redirect} = 'pricelist_search_handle';
-    $psearch->render($request);
+    if (!$redirect_to_selection){
+        get_pricelist($request);
+    } else { 
+        $request->{search_redirect} = 'pricelist_search_handle';
+        $psearch->render($request);
+   }
 }
 
 

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