Author: mridulpathak
Date: Sat Nov 21 07:08:54 2015
New Revision: 1715473
URL:
http://svn.apache.org/viewvc?rev=1715473&view=revLog:
[OFBIZ-6725] Best Selling Products section in main order page takes into account cancelled orders. Thanks Jacques for reporting the issue. Applying fix from trunk r1715471 with some minor changes.
Modified:
ofbiz/branches/release13.07/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy
Modified: ofbiz/branches/release13.07/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy?rev=1715473&r1=1715472&r2=1715473&view=diff==============================================================================
--- ofbiz/branches/release13.07/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy (original)
+++ ofbiz/branches/release13.07/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy Sat Nov 21 07:08:54 2015
@@ -27,6 +27,7 @@ exprList = [];
exprList.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, UtilDateTime.getDayStart(filterDate)));
exprList.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, UtilDateTime.getDayEnd(filterDate)));
exprList.add(EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER"));
+exprList.add(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"));
orderHeaderList = delegator.findList("OrderHeader", EntityCondition.makeCondition(exprList, EntityOperator.AND), null, null, null, false);
@@ -35,6 +36,7 @@ orderHeaderList.each { orderHeader ->
exprList.add(EntityCondition.makeCondition("orderId", EntityOperator.EQUALS, orderHeader.orderId));
exprList.add(EntityCondition.makeCondition("orderItemTypeId", EntityOperator.EQUALS, "PRODUCT_ORDER_ITEM"));
exprList.add(EntityCondition.makeCondition("isPromo", EntityOperator.EQUALS, "N"));
+ exprList.add(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"));
orderItemList = delegator.findList("OrderItem", EntityCondition.makeCondition(exprList, EntityOperator.AND), null, null, null, false);
orderItemList.each { orderItem ->