diff --git a/process/Product_lib/process.js b/process/Product_lib/process.js index c6e9a85c7e3f79e56275a1512dbaba6204a9b362..ee03a52bec3a0052633d48aace52aeb834a107da 100644 --- a/process/Product_lib/process.js +++ b/process/Product_lib/process.js @@ -291,10 +291,10 @@ ProductUtils.getProductDetails = function(pid, priceListFilter, additionalProduc for(var index in priceLists) { - if (!escape && priceLists[index]["priceList"] == priceListFilter.priceList) + if (priceLists[index]["priceList"] == priceListFilter.priceList) { res = priceLists[index]; //The first time the condition is true the correct pricelist is found. - escape = true; // The object is ordered by fromQuantity descending so we have to stop after the condition is true + break; // The object is ordered by fromQuantity descending so we have to stop after the condition is true } } return res;