BF [ 2606351 ] Sales Order take inactive pricing

https://sourceforge.net/tracker/index.php?func=detail&aid=2606351&group_id=176962&atid=879332

Don't use inactive product prices in MProductPricing
This commit is contained in:
phib 2009-02-18 01:49:19 +00:00
parent 2c95c3a129
commit e7a103b84a
1 changed files with 3 additions and 0 deletions

View File

@ -130,6 +130,7 @@ public class MProductPricing
+ " INNER JOIN M_PriceList_Version pv ON (pp.M_PriceList_Version_ID=pv.M_PriceList_Version_ID)"
+ " INNER JOIN M_Pricelist pl ON (pv.M_PriceList_ID=pl.M_PriceList_ID) "
+ "WHERE pv.IsActive='Y'"
+ " AND pp.IsActive='Y'"
+ " AND p.M_Product_ID=?" // #1
+ " AND pv.M_PriceList_Version_ID=?"; // #2
m_calculated = false;
@ -239,6 +240,7 @@ public class MProductPricing
+ " INNER JOIN M_PriceList_Version pv ON (pp.M_PriceList_Version_ID=pv.M_PriceList_Version_ID)"
+ " INNER JOIN M_Pricelist pl ON (pv.M_PriceList_ID=pl.M_PriceList_ID) "
+ "WHERE pv.IsActive='Y'"
+ " AND pp.IsActive='Y'"
+ " AND p.M_Product_ID=?" // #1
+ " AND pv.M_PriceList_ID=?" // #2
+ "ORDER BY pv.ValidFrom DESC";
@ -313,6 +315,7 @@ public class MProductPricing
+ " INNER JOIN M_Pricelist bpl ON (pv.M_PriceList_ID=bpl.M_PriceList_ID)"
+ " INNER JOIN M_Pricelist pl ON (bpl.M_PriceList_ID=pl.BasePriceList_ID) "
+ "WHERE pv.IsActive='Y'"
+ " AND pp.IsActive='Y'"
+ " AND p.M_Product_ID=?" // #1
+ " AND pl.M_PriceList_ID=?" // #2
+ "ORDER BY pv.ValidFrom DESC";