Skip to content
Snippets Groups Projects
Commit 112569ed authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

Fix error in ProductPriceLists when no END-Date was given

parent 6c772727
No related branches found
No related tags found
No related merge requests found
......@@ -187,8 +187,11 @@ ProductUtils.getProductDetails = function(pid, priceListFilter, additionalProduc
+ db.translateCondition(SqlCondition.begin()
.and("validPP.PRODUCT_ID = PRODUCTID")
.andPrepare(["PRODUCTPRICE", "CURRENCY", "validPP"], priceListFilter.currency)
.andPrepare(["PRODUCTPRICE", "VALID_FROM", "validPP"], datetime.date().toString(), "# <= ?")
.andPrepare(["PRODUCTPRICE", "VALID_TO", "validPP"], datetime.date().toString(), "# >= ?")
.andPrepare(["PRODUCTPRICE", "VALID_FROM", "validPP"], datetime.date().toString(), "# <= ?")
.andSqlCondition(SqlCondition.begin()
.andPrepare(["PRODUCTPRICE", "VALID_TO", "validPP"], datetime.date().toString(), "# >= ?")
.or("validPP.VALID_TO is null")
)
.andPrepare(["PRODUCTPRICE", "FROMQUANTITY", "validPP"], priceListFilter.quantity, "# <= ?")
.andSqlCondition(SqlCondition.begin()
.orPrepare(["PRODUCTPRICE", "CONTACT_ID", "validPP"], priceListFilter.relationId)
......@@ -251,7 +254,6 @@ ProductUtils.getProductDetails = function(pid, priceListFilter, additionalProduc
if (validPriceLists)
ProductDetails.PriceListToUse = _getPriceListToUse(ProductDetails.CurrentValidPriceLists, priceListFilter);
return ProductDetails;
function _getPriceListObject() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment