Fixes bug 20901
authorEduardo Argal Guibert <eduardo.argal@openbravo.com>
Fri, 29 Jun 2012 16:53:13 +0200
changeset 17393 0a53d05f65c1
parent 17392 998cff5a63d7
child 17394 ce760b148e29
Fixes bug 20901
src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/DuplicateDocExchangeRate.class
src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/DuplicateDocExchangeRateData.class
src-util/buildvalidation/src/org/openbravo/buildvalidation/DuplicateDocExchangeRate.java
src-util/buildvalidation/src/org/openbravo/buildvalidation/DuplicateDocExchangeRate_data.xsql
Binary file src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/DuplicateDocExchangeRate.class has changed
Binary file src-util/buildvalidation/build/classes/org/openbravo/buildvalidation/DuplicateDocExchangeRateData.class has changed
--- a/src-util/buildvalidation/src/org/openbravo/buildvalidation/DuplicateDocExchangeRate.java	Fri Jun 29 14:48:08 2012 +0200
+++ b/src-util/buildvalidation/src/org/openbravo/buildvalidation/DuplicateDocExchangeRate.java	Fri Jun 29 16:53:13 2012 +0200
@@ -54,7 +54,8 @@
     ArrayList<String> errors = new ArrayList<String>();
     try {
       // Prevent error when upgrading from a pure 2.50
-      if (DuplicateDocExchangeRateData.existAPRMbasetables(cp)) {
+      // Check if APRM tables and C_Conversion_Rate_Document table exist
+      if (DuplicateDocExchangeRateData.existConvRateDoctable(cp)) {
         
         String errorMessage = "It is not allowed to have the multiple exchange rates defined for the same pair of currencies (Currency From -> Currency To) in the same %s. " +
             "To fix this problem in your instance, you can know the duplicated entries by reviewing Alerts in your system. " + 
--- a/src-util/buildvalidation/src/org/openbravo/buildvalidation/DuplicateDocExchangeRate_data.xsql	Fri Jun 29 14:48:08 2012 +0200
+++ b/src-util/buildvalidation/src/org/openbravo/buildvalidation/DuplicateDocExchangeRate_data.xsql	Fri Jun 29 16:53:13 2012 +0200
@@ -173,12 +173,12 @@
     <Parameter name="adAlertRuleId" />
     <Parameter name="role" />
   </SqlMethod>
-  <SqlMethod name="existAPRMbasetables" type="preparedStatement" return="boolean">
-    <SqlMethodComment>Check if the FIN_Finacc_Transaction table exist</SqlMethodComment>
+  <SqlMethod name="existConvRateDoctable" type="preparedStatement" return="boolean">
+    <SqlMethodComment>Check if the C_Conversion_Rate_Document table exist</SqlMethodComment>
     <Sql><![CDATA[
        SELECT count(*) AS EXISTING
        FROM ad_table
-       WHERE ad_table_id = '4D8C3B3C31D1410DA046140C9F024D17'
+       WHERE ad_table_id = 'FF808181308EA42301308FB5F7BC0049'
       ]]>
     </Sql>
   </SqlMethod>