From ce672a522185d4844494b81c5d9f8bb34c70db55 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 12 Aug 2014 15:40:49 +0200 Subject: [PATCH] IDEMPIERE-2134 Issues found on Payment Selection process - make the call at the end of payment selection configurable --- .../i2.0z/oracle/201408121535_IDEMPIERE-2134.sql | 11 +++++++++++ .../postgresql/201408121535_IDEMPIERE-2134.sql | 8 ++++++++ .../src/org/compiere/model/MSysConfig.java | 3 ++- .../org/adempiere/webui/apps/form/WPaySelect.java | 14 +++++++++++--- 4 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 migration/i2.0z/oracle/201408121535_IDEMPIERE-2134.sql create mode 100644 migration/i2.0z/postgresql/201408121535_IDEMPIERE-2134.sql diff --git a/migration/i2.0z/oracle/201408121535_IDEMPIERE-2134.sql b/migration/i2.0z/oracle/201408121535_IDEMPIERE-2134.sql new file mode 100644 index 0000000000..9e0b3a5aa6 --- /dev/null +++ b/migration/i2.0z/oracle/201408121535_IDEMPIERE-2134.sql @@ -0,0 +1,11 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Aug 12, 2014 3:34:19 PM CEST +-- IDEMPIERE-2134 Issues found on Payment Selection process +INSERT INTO AD_SysConfig (AD_SysConfig_ID,ConfigurationLevel,Value,Description,AD_SysConfig_UU,AD_Org_ID,CreatedBy,IsActive,UpdatedBy,Name,AD_Client_ID,EntityType,Created,Updated) VALUES (200058,'O','Y','Define if the payment selection manual process ask the user to invoke generate payments at the end','f7aa5604-3835-40ef-a9fd-4d7b92b323e5',0,100,'Y',100,'PAYMENT_SELECTION_MANUAL_ASK_INVOKE_GENERATE',0,'D',TO_DATE('2014-08-12 15:34:19','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2014-08-12 15:34:19','YYYY-MM-DD HH24:MI:SS')) +; + +SELECT register_migration_script('201408121535_IDEMPIERE-2134.sql') FROM dual +; + diff --git a/migration/i2.0z/postgresql/201408121535_IDEMPIERE-2134.sql b/migration/i2.0z/postgresql/201408121535_IDEMPIERE-2134.sql new file mode 100644 index 0000000000..367c7280ed --- /dev/null +++ b/migration/i2.0z/postgresql/201408121535_IDEMPIERE-2134.sql @@ -0,0 +1,8 @@ +-- Aug 12, 2014 3:34:19 PM CEST +-- IDEMPIERE-2134 Issues found on Payment Selection process +INSERT INTO AD_SysConfig (AD_SysConfig_ID,ConfigurationLevel,Value,Description,AD_SysConfig_UU,AD_Org_ID,CreatedBy,IsActive,UpdatedBy,Name,AD_Client_ID,EntityType,Created,Updated) VALUES (200058,'O','Y','Define if the payment selection manual process ask the user to invoke generate payments at the end','f7aa5604-3835-40ef-a9fd-4d7b92b323e5',0,100,'Y',100,'PAYMENT_SELECTION_MANUAL_ASK_INVOKE_GENERATE',0,'D',TO_TIMESTAMP('2014-08-12 15:34:19','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2014-08-12 15:34:19','YYYY-MM-DD HH24:MI:SS')) +; + +SELECT register_migration_script('201408121535_IDEMPIERE-2134.sql') FROM dual +; + diff --git a/org.adempiere.base/src/org/compiere/model/MSysConfig.java b/org.adempiere.base/src/org/compiere/model/MSysConfig.java index 06573cceec..84da9748bb 100644 --- a/org.adempiere.base/src/org/compiere/model/MSysConfig.java +++ b/org.adempiere.base/src/org/compiere/model/MSysConfig.java @@ -42,7 +42,7 @@ public class MSysConfig extends X_AD_SysConfig /** * */ - private static final long serialVersionUID = 7046297257733064917L; + private static final long serialVersionUID = -916592278422470367L; public static final String ADDRESS_SAVE_REQUEST_RESPONSE_LOG = "ADDRESS_SAVE_REQUEST_RESPONSE_LOG"; public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION"; @@ -91,6 +91,7 @@ public class MSysConfig extends X_AD_SysConfig public static final String PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT = "PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT"; public static final String PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT = "PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT"; public static final String PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD = "PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD"; + public static final String PAYMENT_SELECTION_MANUAL_ASK_INVOKE_GENERATE = "PAYMENT_SELECTION_MANUAL_ASK_INVOKE_GENERATE"; public static final String PDF_FONT_DIR = "PDF_FONT_DIR"; public static final String ProductUOMConversionRateValidate = "ProductUOMConversionRateValidate"; public static final String ProductUOMConversionUOMValidate = "ProductUOMConversionUOMValidate"; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java index 7ead8478bd..6039c5609e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java @@ -28,6 +28,7 @@ import java.util.logging.Level; import org.adempiere.util.Callback; import org.adempiere.util.IProcessUI; +import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.apps.ProcessModalDialog; import org.adempiere.webui.component.Button; import org.adempiere.webui.component.Checkbox; @@ -53,6 +54,8 @@ import org.adempiere.webui.panel.IFormController; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.window.FDialog; import org.compiere.apps.form.PaySelect; +import org.compiere.model.MPaySelection; +import org.compiere.model.MSysConfig; import org.compiere.model.X_C_PaySelection; import org.compiere.process.ProcessInfo; import org.compiere.util.Env; @@ -407,8 +410,10 @@ public class WPaySelect extends PaySelect return; } - // Ask to Post it - FDialog.ask(m_WindowNo, form, "VPaySelectGenerate?", new Callback() { + loadTableInfo(); + if (MSysConfig.getBooleanValue(MSysConfig.PAYMENT_SELECTION_MANUAL_ASK_INVOKE_GENERATE, true, m_ps.getAD_Client_ID(), m_ps.getAD_Org_ID())) { + // Ask to Post it + FDialog.ask(m_WindowNo, form, "VPaySelectGenerate?", new Callback() { @Override public void onCallback(Boolean result) @@ -434,7 +439,10 @@ public class WPaySelect extends PaySelect } } - }); + }); + } else { + AEnv.zoom(MPaySelection.Table_ID, m_ps.getC_PaySelection_ID()); + } } // generatePaySelect /**