Author: deepak
Date: Fri Sep 2 17:44:55 2016
New Revision: 1758997
URL:
http://svn.apache.org/viewvc?rev=1758997&view=revLog:
(OFBIZ-7390) Applied slightly patch from jira issue:
================================
Print PDF functionality throws exception on Inventory Average Cost screen
================================
Thanks Avnindra Sharma for your contribution.
Modified:
ofbiz/trunk/applications/product/groovyScripts/facility/inventory/InventoryAverageCosts.groovy
ofbiz/trunk/applications/product/groovyScripts/facility/inventory/InventoryItemTotals.groovy
Modified: ofbiz/trunk/applications/product/groovyScripts/facility/inventory/InventoryAverageCosts.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/facility/inventory/InventoryAverageCosts.groovy?rev=1758997&r1=1758996&r2=1758997&view=diff==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/facility/inventory/InventoryAverageCosts.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/facility/inventory/InventoryAverageCosts.groovy Fri Sep 2 17:44:55 2016
@@ -25,6 +25,7 @@ import org.apache.ofbiz.entity.condition
import org.apache.ofbiz.entity.util.EntityUtil;
facilityId = context.get("facilityId");
+searchParameterString = "action=Y&facilityId=" + facilityId;
EntityCondition whereConditions = EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId);
inventoryItems = select("productId").from("InventoryItem").where("facilityId", facilityId).orderBy("productId").queryList();
@@ -47,4 +48,5 @@ inventoryItemProducts.each { productId -
}
}
+context.searchParameterString = searchParameterString;
context.inventoryAverageCosts = inventoryAverageCosts;
Modified: ofbiz/trunk/applications/product/groovyScripts/facility/inventory/InventoryItemTotals.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/groovyScripts/facility/inventory/InventoryItemTotals.groovy?rev=1758997&r1=1758996&r2=1758997&view=diff==============================================================================
--- ofbiz/trunk/applications/product/groovyScripts/facility/inventory/InventoryItemTotals.groovy (original)
+++ ofbiz/trunk/applications/product/groovyScripts/facility/inventory/InventoryItemTotals.groovy Fri Sep 2 17:44:55 2016
@@ -31,6 +31,7 @@ retailPriceGrandTotal = 0.0;
totalCostPriceGrandTotal = 0.0;
totalRetailPriceGrandTotal = 0.0;
boolean beganTransaction = false;
+searchParameterString = "action=Y&facilityId=" + facilityId;
if (action) {
conditions = [EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "INV_DELIVERED")];
conditions.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, null));
@@ -106,5 +107,6 @@ inventoryItemGrandTotals = [];
inventoryItemGrandTotals.add([qohGrandTotal : qohGrandTotal, atpGrandTotal : atpGrandTotal,
totalCostPriceGrandTotal : totalCostPriceGrandTotal, totalRetailPriceGrandTotal : totalRetailPriceGrandTotal]);
+context.searchParameterString = searchParameterString;
context.inventoryItemTotals = inventoryItemTotals;
context.inventoryItemGrandTotals = inventoryItemGrandTotals;