From 6c840d11ad48b8366261bd2d91a6a653700b4d32 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 1 Jul 2015 19:45:04 -0500 Subject: [PATCH] IDEMPIERE-2665 / peer review --- .../src/org/adempiere/webui/apps/form/WFactReconcile.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFactReconcile.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFactReconcile.java index cf93adf9f4..5f179cfd25 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFactReconcile.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WFactReconcile.java @@ -280,7 +280,7 @@ implements IFormController, EventListener, WTableModelListener, ValueChan " C_ElementValue.IsActive='Y' AND C_ElementValue.IsSummary='N' " + "AND EXISTS (SELECT 1 FROM C_AcctSchema_Element ase " + "WHERE ase.C_Element_ID=C_ElementValue.C_Element_ID AND ase.ElementType='AC' " - + "AND ase.C_AcctSchema_ID=" + m_C_AcctSchema_ID + " AND ase.AD_Client_ID=" + m_AD_Client_ID + ") "); + + "AND ase.C_AcctSchema_ID=@C_AcctSchema_ID@ AND ase.AD_Client_ID=@AD_Client_ID@) "); fieldAccount = new WTableDirEditor("C_ElementValue_ID", false, false, true, lookupAccount); } @@ -380,6 +380,8 @@ implements IFormController, EventListener, WTableModelListener, ValueChan if (name.equals("C_AcctSchema_ID")) { m_C_AcctSchema_ID = ((Integer)value).intValue(); + Env.setContext(Env.getCtx(), form.getWindowNo(), "C_AcctSchema_ID", m_C_AcctSchema_ID); + Env.setContext(Env.getCtx(), form.getWindowNo(), "AD_Client_ID", Env.getAD_Client_ID(Env.getCtx())); fieldAccount.actionRefresh(); } }