details:   https://code.openbravo.com/erp/devel/pi/rev/f7c45b01fda4
changeset: 28151:f7c45b01fda4
user:      Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
date:      Tue Dec 01 18:20:18 2015 +0100
summary:   Fixes issue 31470: UniqueValidCombination modulescript is 
deactivating accounts

Add group by c_acctschema_id in selectDuplicates and 
updateValidCombinationDeactivateDuplicated queries in UniqueValidCombination 
modulescript.

diffstat:

 
src-util/modulescript/build/classes/org/openbravo/modulescript/UniqueValidCombinationData.class
 |    0 
 
src-util/modulescript/src/org/openbravo/modulescript/UniqueValidCombination_data.xsql
           |    8 ++++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 6e39d4773c59 -r f7c45b01fda4 
src-util/modulescript/build/classes/org/openbravo/modulescript/UniqueValidCombinationData.class
Binary file 
src-util/modulescript/build/classes/org/openbravo/modulescript/UniqueValidCombinationData.class
 has changed
diff -r 6e39d4773c59 -r f7c45b01fda4 
src-util/modulescript/src/org/openbravo/modulescript/UniqueValidCombination_data.xsql
--- 
a/src-util/modulescript/src/org/openbravo/modulescript/UniqueValidCombination_data.xsql
     Thu Dec 17 13:23:14 2015 +0100
+++ 
b/src-util/modulescript/src/org/openbravo/modulescript/UniqueValidCombination_data.xsql
     Tue Dec 01 18:20:18 2015 +0100
@@ -12,7 +12,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -41,7 +41,7 @@
         and USER1_ID is null
         and USER2_ID is null
         and isactive = 'Y'
-        group by account_id, ad_client_id
+        group by account_id, ad_client_id, c_acctschema_id
         having count(account_id) > 1) a
       ]]>
     </Sql>
@@ -128,7 +128,7 @@
                             and USER1_ID is null
                             and USER2_ID is null
                            AND ISACTIVE = 'Y'
-                            group by account_id, ad_client_id
+                            group by account_id, ad_client_id, c_acctschema_id
                             having count(account_id) > 1)
         and c_validcombination_id not in (select max(c_validcombination_id)
                                         from c_validcombination
@@ -141,7 +141,7 @@
                                         and USER1_ID is null
                                         and USER2_ID is null
                                        AND ISACTIVE = 'Y'
-                                        group by account_id, ad_client_id
+                                        group by account_id, ad_client_id, 
c_acctschema_id
                                         having count(account_id) > 1
                                         )
         AND ISACTIVE='Y'

------------------------------------------------------------------------------
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to