Author: jacopoc
Date: Fri Aug 27 11:01:44 2010 New Revision: 990097 URL: http://svn.apache.org/viewvc?rev=990097&view=rev Log: Fixed an issue (NPE) that was preventing the cost and qoh calculation in the scalar explosion; slightly improved layout of scalar explosion; added weight information. Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/BomSimulation.ftl Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy?rev=990097&r1=990096&r2=990097&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy Fri Aug 27 11:01:44 2010 @@ -17,7 +17,7 @@ * under the License. */ -import java.util.Iterator; +import org.ofbiz.base.util.Debug; import org.ofbiz.manufacturing.bom.BOMNode; tree = request.getAttribute("tree"); @@ -34,7 +34,7 @@ if (tree) { context.tree = treeArray; Iterator treeQtyIt = treeQty.values().iterator(); productsData = []; - grandTotalCost = null; + grandTotalCost = 0.0; while (treeQtyIt) { BOMNode node = (BOMNode)treeQtyIt.next(); unitCost = null; @@ -58,7 +58,9 @@ if (tree) { userLogin : userLogin]); qoh = outMap.quantityOnHandTotal; } - } catch (Exception e) {} + } catch (Exception e) { + Debug.logError("Error retrieving bom simulation data: " + e.getMessage(), "BomSimulation"); + } productsData.add([node : node, unitCost : unitCost, totalCost : totalCost, qoh : qoh]); } context.productsData = productsData; Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/BomSimulation.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/BomSimulation.ftl?rev=990097&r1=990096&r2=990097&view=diff ============================================================================== --- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/BomSimulation.ftl (original) +++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/BomSimulation.ftl Fri Aug 27 11:01:44 2010 @@ -97,12 +97,13 @@ under the License. <br /> <table class="basic-table" cellspacing="0"> <tr class="header-row"> - <td width="18%">${uiLabelMap.ProductProductId}</td> + <td width="20%">${uiLabelMap.ProductProductId}</td> <td width="50%">${uiLabelMap.ProductProductName}</td> - <td width="8%" align="right">${uiLabelMap.CommonQuantity}</td> - <td width="8%" align="right">${uiLabelMap.ProductQoh}</td> - <td width="8%" align="right">${uiLabelMap.FormFieldTitle_cost}</td> - <td width="8%" align="right">${uiLabelMap.CommonTotalCost}</td> + <td width="6%" align="right">${uiLabelMap.CommonQuantity}</td> + <td width="6%" align="right">${uiLabelMap.ProductQoh}</td> + <td width="6%" align="right">${uiLabelMap.ProductWeight}</td> + <td width="6%" align="right">${uiLabelMap.FormFieldTitle_cost}</td> + <td width="6%" align="right">${uiLabelMap.CommonTotalCost}</td> </tr> <#if productsData?has_content> <#assign alt_row = false> @@ -113,10 +114,11 @@ under the License. <td>${node.product.internalName?default(" ")}</td> <td align="right">${node.quantity}</td> <td align="right">${productData.qoh?if_exists}</td> + <td align="right">${node.product.productWeight?if_exists}</td> <#if productData.unitCost?exists && (productData.unitCost > 0)> <td align="right">${productData.unitCost?if_exists}</td> <#else> - <td align="center"><a href="/catalog/control/EditProductCosts?productId=${node.product.productId}&externalLoginKey=${externalLoginKey}" class="buttontext">NA</a></td> + <td align="right"><a href="/catalog/control/EditProductCosts?productId=${node.product.productId}&externalLoginKey=${externalLoginKey}" class="buttontext">NA</a></td> </#if> <td align="right">${productData.totalCost?if_exists}</td> </tr> |
Free forum by Nabble | Edit this page |