# HG changeset patch
# User Mark <markmm82@gmail.com>
# Date 1470164463 14400
#      Tue Aug 02 15:01:03 2016 -0400
# Node ID 3af3348059a3e10fb53dc253d85bc187f7a4c9be
# Parent  6bef7cf32538272b1119cafab0ab29d998d5d5c4
Fixed issue 33489:Cannot post a CAD if the period was created previous 3.0PR14Q4

Cost Adjustments feature was included in Openbravo 3.0PR14Q4, so periods created in lower versions doesn't includes the Cost Adjustment Document. When the instance is upgrated, these periods was not updated and it causes that CAD can't be posted. To include this document to all these periods was updated the CreateAccountingConfiguration module script to take into account control periods that has not included the CAD. Also was updated the Module Script Execution Limits to the 29718 version.

diff -r 6bef7cf32538 -r 3af3348059a3 modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.class
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.class has changed
diff -r 6bef7cf32538 -r 3af3348059a3 modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.java
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.java	Fri Jul 29 11:18:31 2016 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.java	Tue Aug 02 15:01:03 2016 -0400
@@ -11,7 +11,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) 2010-2015 Openbravo SLU
+ * All portions are Copyright (C) 2010-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -55,7 +55,7 @@
   @Override
   protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
     return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
-        new OpenbravoVersion(3,0,19579));
+        new OpenbravoVersion(3,0,29718));
   }
 
   void createAcctSchemaTables(ConnectionProvider cp) throws Exception {
@@ -64,7 +64,8 @@
     // Tables to be added hardcoded due to problem when executing module script. The tables
     // sometimes do not exist yet
     String tables[] = { "4D8C3B3C31D1410DA046140C9F024D17", "B1B7075C46934F0A9FD4C4D0F1457B42",
-        "D1A97202E832470285C9B1EB026D54E2", "D4C23A17190649E7B78F55A05AF3438C", "30721072789F410E9606D2235CB2A226"};
+        "D1A97202E832470285C9B1EB026D54E2", "D4C23A17190649E7B78F55A05AF3438C",
+        "30721072789F410E9606D2235CB2A226", "D022B92163074E5E82449C8E0B5AFDF6" };
     for (int i = 0; i < data.length; i++) {
       for (int j = 0; j < tables.length; j++) {
         boolean exist = CreateAccountingConfigurationData.selectTables(cp, data[i].cAcctschemaId,
