IDEMPIERE-4469 when recalculating price on price list generation all T_Selection entries are used independently of AD_PInstance_ID (#273)

* IDEMPIERE-4469 when recalculating price on price list generation all T_Selection entries are used independently of AD_PInstance_ID

* IDEMPIERE-4469 when recalculating price on price list generation all T_Selection entries are used independently of AD_PInstance_ID
This commit is contained in:
Martin Schönbeck 2020-09-24 17:13:30 +02:00 committed by GitHub
parent 9cca6c08be
commit 1f2d760ed2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -336,7 +336,7 @@ public class M_PriceList_Create extends SvrProcess {
/** Calculations **/
MProductPrice[] pp = m_plv.getProductPrice(
"AND EXISTS (SELECT * FROM T_Selection s "
+ "WHERE s.T_Selection_ID=M_ProductPrice.M_Product_ID)");
+ "WHERE s.AD_PInstance_ID = " + m_AD_PInstance_ID + " AND s.T_Selection_ID=M_ProductPrice.M_Product_ID)");
for (MProductPrice price : pp) {
BigDecimal priceList = price.getPriceList();
BigDecimal priceStd = price.getPriceStd();