From d6a35fc81546c9dc51184e6a8469b51285f6b105 Mon Sep 17 00:00:00 2001 From: vpj-cd Date: Tue, 10 Jul 2007 06:08:29 +0000 Subject: [PATCH] fixed [ 1750958 ] Error show PO different Receipt Warehouse in Create From https://sourceforge.net/tracker/index.php?func=detail&aid=1750958&group_id=176962&atid=879332 --- client/src/org/compiere/grid/VCreateFrom.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/org/compiere/grid/VCreateFrom.java b/client/src/org/compiere/grid/VCreateFrom.java index e3a5c899b4..391bac367b 100644 --- a/client/src/org/compiere/grid/VCreateFrom.java +++ b/client/src/org/compiere/grid/VCreateFrom.java @@ -337,7 +337,9 @@ public abstract class VCreateFrom extends CDialog { log.config("C_BPartner_ID=" + C_BPartner_ID); KeyNamePair pp = new KeyNamePair(0,""); - + // + int M_Warehouse_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "M_Warehouse_ID"); + // load PO Orders - Closed, Completed orderField.removeActionListener(this); orderField.removeAllItems(); @@ -354,6 +356,7 @@ public abstract class VCreateFrom extends CDialog StringBuffer sql = new StringBuffer("SELECT o.C_Order_ID,").append(display) .append(" FROM C_Order o " + "WHERE o.C_BPartner_ID=? AND o.IsSOTrx='N' AND o.DocStatus IN ('CL','CO')" + + " AND o.M_Warehouse_ID = " + M_Warehouse_ID + " AND o.C_Order_ID IN " + "(SELECT ol.C_Order_ID FROM C_OrderLine ol" + " LEFT OUTER JOIN M_MatchPO m ON (ol.C_OrderLine_ID=m.C_OrderLine_ID) "