You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mr...@apache.org on 2015/11/21 08:12:13 UTC

svn commit: r1715474 - /ofbiz/branches/release12.04/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy

Author: mridulpathak
Date: Sat Nov 21 07:12:13 2015
New Revision: 1715474

URL: http://svn.apache.org/viewvc?rev=1715474&view=rev
Log:
[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/release12.04/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy

Modified: ofbiz/branches/release12.04/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy?rev=1715474&r1=1715473&r2=1715474&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy (original)
+++ ofbiz/branches/release12.04/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy Sat Nov 21 07:12:13 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 ->