From 1072f6eefb3810cc41a5c961c33127b3acf31fc3 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Thu, 5 Nov 2009 13:06:57 +0000 Subject: [PATCH] BF [ 2892578 ] Order should autoset only active price lists https://sourceforge.net/tracker/?func=detail&aid=2892578&group_id=176962&atid=879335 --- base/src/org/compiere/model/MOrder.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/base/src/org/compiere/model/MOrder.java b/base/src/org/compiere/model/MOrder.java index 5d712793ac..5d3aea7912 100644 --- a/base/src/org/compiere/model/MOrder.java +++ b/base/src/org/compiere/model/MOrder.java @@ -55,6 +55,8 @@ import org.eevolution.model.MPPProductBOMLine; * * @author Teo Sarca, www.arhipac.ro *
  • BF [ 2419978 ] Voiding PO, requisition don't set on NULL + *
  • BF [ 2892578 ] Order should autoset only active price lists + * https://sourceforge.net/tracker/?func=detail&aid=2892578&group_id=176962&atid=879335 * @author Michael Judd, www.akunagroup.com *
  • BF [ 2804888 ] Incorrect reservation of products with attributes */ @@ -927,10 +929,10 @@ public class MOrder extends X_C_Order implements DocAction // Default Price List if (getM_PriceList_ID() == 0) { - int ii = DB.getSQLValue(null, + int ii = DB.getSQLValueEx(null, "SELECT M_PriceList_ID FROM M_PriceList " - + "WHERE AD_Client_ID=? AND IsSOPriceList=? " - + "ORDER BY IsDefault DESC", getAD_Client_ID(), isSOTrx() ? "Y" : "N"); + + "WHERE AD_Client_ID=? AND IsSOPriceList=? AND IsActive=?" + + "ORDER BY IsDefault DESC", getAD_Client_ID(), isSOTrx(), true); if (ii != 0) setM_PriceList_ID (ii); }