You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ar...@apache.org on 2016/06/21 15:04:49 UTC

svn commit: r1749552 - /ofbiz/trunk/specialpurpose/birt/webapp/ordermgr/reports/Last3MonthsSalesReport.rptdesign

Author: arunpatidar
Date: Tue Jun 21 15:04:49 2016
New Revision: 1749552

URL: http://svn.apache.org/viewvc?rev=1749552&view=rev
Log:
 Applied patch from ticket OFBIZ-7314:'Last 3 Months Sales Report is not working'. Thanks Rohit Koushal for your contribution.

Modified:
    ofbiz/trunk/specialpurpose/birt/webapp/ordermgr/reports/Last3MonthsSalesReport.rptdesign

Modified: ofbiz/trunk/specialpurpose/birt/webapp/ordermgr/reports/Last3MonthsSalesReport.rptdesign
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/birt/webapp/ordermgr/reports/Last3MonthsSalesReport.rptdesign?rev=1749552&r1=1749551&r2=1749552&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/birt/webapp/ordermgr/reports/Last3MonthsSalesReport.rptdesign (original)
+++ ofbiz/trunk/specialpurpose/birt/webapp/ordermgr/reports/Last3MonthsSalesReport.rptdesign Tue Jun 21 15:04:49 2016
@@ -215,7 +215,7 @@ module = "Last3MonthsSalesReport.rptdesi
             <method name="open"><![CDATA[salesOrderItemStarSchemas = null;
 userLogin = null;
 try {
-    userLogin = delegator.findByPrimaryKey("UserLogin",UtilMisc.toMap("userLoginId","admin"));
+    userLogin = delegator.findOne("UserLogin",UtilMisc.toMap("userLoginId","admin"), false);
     months = new LinkedList();
     thisMonth = 0;
     thisMonth = UtilDateTime.getMonth(UtilDateTime.nowTimestamp(), TimeZone.getDefault(), Locale.getDefault())+1;
@@ -278,7 +278,7 @@ if (salesOrderItemStarSchemas) {
     totalRow = salesOrderItemStarSchemas.size();
 }
 ]]></method>
-            <method name="fetch"><![CDATA[if (countOfRow == totalRow - 1) return false;
+            <method name="fetch"><![CDATA[if (countOfRow >= totalRow) return false;
 salesOrderItemStarSchema = salesOrderItemStarSchemas.get(countOfRow);
 input =  new HashMap();
 input.put("productId", salesOrderItemStarSchema.getString("productProductId"));
@@ -297,7 +297,7 @@ price = 0;
 internalName = "None";
 input =  new HashMap();
 try {
-    product = delegator.findByPrimaryKey("Product",UtilMisc.toMap("productId", salesOrderItemStarSchema.getString("productProductId")));
+    product = delegator.findOne("Product",UtilMisc.toMap("productId", salesOrderItemStarSchema.getString("productProductId")), false);
     if(product!=null){
         input.put("product", product);
         input.put("userLogin", userLogin);