From 7de7553dac665dfb4a7c7635ce87e016f946300a Mon Sep 17 00:00:00 2001 From: vpj-cd Date: Wed, 3 Sep 2008 02:11:33 +0000 Subject: [PATCH] fixed [ 1943736 ] Wrong price used in Orders http://sourceforge.net/tracker/index.php?func=detail&aid=1943736&group_id=176962&atid=879332 bug introduced in revision http://adempiere.svn.sourceforge.net/viewvc/adempiere/trunk/base/src/org/compiere/model/CalloutOrder.java?r1=1308&r2=1307&pathrev=1308 http://sourceforge.net/tracker/index.php?func=detail&aid=1643489&group_id=176962&atid=879332 --- .../src/org/compiere/model/CalloutInvoice.java | 18 ++---------------- base/src/org/compiere/model/CalloutOrder.java | 18 ++---------------- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/base/src/org/compiere/model/CalloutInvoice.java b/base/src/org/compiere/model/CalloutInvoice.java index 67b7dff1ec..6712b23c08 100644 --- a/base/src/org/compiere/model/CalloutInvoice.java +++ b/base/src/org/compiere/model/CalloutInvoice.java @@ -314,14 +314,7 @@ public class CalloutInvoice extends CalloutEngine // int M_PriceList_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_ID"); pp.setM_PriceList_ID(M_PriceList_ID); - // globalqss - fix reported bug [ 1643489 ] PriceListVersion misfunctionality - int M_PriceList_Version_ID; - // try to get the price list version from info product tab - M_PriceList_Version_ID = Env.getContextAsInt(Env.getCtx(), WindowNo, Env.TAB_INFO, "M_PriceList_Version_ID"); - // if not found try to get from the context of window - if (M_PriceList_Version_ID == 0) - M_PriceList_Version_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_Version_ID"); - // end globalqss + int M_PriceList_Version_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_Version_ID"); pp.setM_PriceList_Version_ID(M_PriceList_Version_ID); Timestamp date = Env.getContextAsDate(ctx, WindowNo, "DateInvoiced"); pp.setPriceDate(date); @@ -518,14 +511,7 @@ public class CalloutInvoice extends CalloutEngine boolean IsSOTrx = Env.getContext(ctx, WindowNo, "IsSOTrx").equals("Y"); MProductPricing pp = new MProductPricing (M_Product_ID, C_BPartner_ID, QtyInvoiced, IsSOTrx); pp.setM_PriceList_ID(M_PriceList_ID); - // globalqss - fix reported bug [ 1643489 ] PriceListVersion misfunctionality - int M_PriceList_Version_ID; - // try to get the price list version from info product tab - M_PriceList_Version_ID = Env.getContextAsInt(Env.getCtx(), WindowNo, Env.TAB_INFO, "M_PriceList_Version_ID"); - // if not found try to get from the context of window - if (M_PriceList_Version_ID == 0) - M_PriceList_Version_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_Version_ID"); - // end globalqss + int M_PriceList_Version_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_Version_ID"); pp.setM_PriceList_Version_ID(M_PriceList_Version_ID); Timestamp date = (Timestamp)mTab.getValue("DateInvoiced"); pp.setPriceDate(date); diff --git a/base/src/org/compiere/model/CalloutOrder.java b/base/src/org/compiere/model/CalloutOrder.java index afe663978f..a5483a94d2 100644 --- a/base/src/org/compiere/model/CalloutOrder.java +++ b/base/src/org/compiere/model/CalloutOrder.java @@ -707,14 +707,7 @@ public class CalloutOrder extends CalloutEngine int M_PriceList_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_ID"); pp.setM_PriceList_ID(M_PriceList_ID); /** PLV is only accurate if PL selected in header */ - // globalqss - fix reported bug [ 1643489 ] PriceListVersion misfunctionality - int M_PriceList_Version_ID; - // try to get the price list version from info product tab - M_PriceList_Version_ID = Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_PriceList_Version_ID"); - // if not found try to get from the context of window - if (M_PriceList_Version_ID == 0) - M_PriceList_Version_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_Version_ID"); - // end globalqss + int M_PriceList_Version_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_Version_ID"); pp.setM_PriceList_Version_ID(M_PriceList_Version_ID); Timestamp orderDate = (Timestamp)mTab.getValue("DateOrdered"); pp.setPriceDate(orderDate); @@ -973,14 +966,7 @@ public class CalloutOrder extends CalloutEngine boolean IsSOTrx = Env.getContext(ctx, WindowNo, "IsSOTrx").equals("Y"); MProductPricing pp = new MProductPricing (M_Product_ID, C_BPartner_ID, QtyOrdered, IsSOTrx); pp.setM_PriceList_ID(M_PriceList_ID); - // globalqss - fix reported bug [ 1643489 ] PriceListVersion misfunctionality - int M_PriceList_Version_ID; - // try to get the price list version from info product tab - M_PriceList_Version_ID = Env.getContextAsInt(ctx, WindowNo, Env.TAB_INFO, "M_PriceList_Version_ID"); - // if not found try to get from the context of window - if (M_PriceList_Version_ID == 0) - M_PriceList_Version_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_Version_ID"); - // end globalqss + int M_PriceList_Version_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_Version_ID"); pp.setM_PriceList_Version_ID(M_PriceList_Version_ID); Timestamp date = (Timestamp)mTab.getValue("DateOrdered"); pp.setPriceDate(date);