|
Author: jleroux
Date: Tue Aug 31 12:34:56 2010 New Revision: 991176 URL: http://svn.apache.org/viewvc?rev=991176&view=rev Log: Merges the trunk at r991129 Added: ofbiz/branches/jquery/framework/entity/lib/jdbc/derbytools-10.6.1.0.jar - copied unchanged from r991169, ofbiz/trunk/framework/entity/lib/jdbc/derbytools-10.6.1.0.jar Modified: ofbiz/branches/jquery/ (props changed) ofbiz/branches/jquery/LICENSE ofbiz/branches/jquery/README ofbiz/branches/jquery/applications/accounting/servicedef/services_tax.xml ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java ofbiz/branches/jquery/applications/content/data/helpdata/HELP_ROOT_FR.xml ofbiz/branches/jquery/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy ofbiz/branches/jquery/applications/manufacturing/webapp/manufacturing/bom/BomSimulation.ftl ofbiz/branches/jquery/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml (props changed) ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java ofbiz/branches/jquery/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy (props changed) ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/test/InventoryTests.xml (props changed) ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java ofbiz/branches/jquery/framework/common/data/UnitData.xml ofbiz/branches/jquery/framework/common/widget/HelpScreens.xml (props changed) ofbiz/branches/jquery/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java ofbiz/branches/jquery/framework/example/webapp/birt/report/chart.rptdesign ofbiz/branches/jquery/framework/example/webapp/example/WEB-INF/controller.xml ofbiz/branches/jquery/framework/example/widget/example/CommonScreens.xml ofbiz/branches/jquery/framework/example/widget/example/FormWidgetExampleScreens.xml ofbiz/branches/jquery/framework/webapp/src/org/ofbiz/webapp/view/FopPdfViewHandler.java ofbiz/branches/jquery/framework/webtools/webapp/webtools/WEB-INF/actions/entity/XmlDsDump.groovy ofbiz/branches/jquery/ij.ofbiz ofbiz/branches/jquery/rc.ofbiz ofbiz/branches/jquery/rc.ofbiz.for.debian ofbiz/branches/jquery/specialpurpose/ebaystore/lib/ (props changed) ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/Facilities.groovy (props changed) ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductList.groovy (props changed) ofbiz/branches/jquery/specialpurpose/hhfacility/webapp/hhfacility/WEB-INF/actions/ProductStockTake.groovy (props changed) Propchange: ofbiz/branches/jquery/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Aug 31 12:34:56 2010 @@ -1,3 +1,3 @@ /ofbiz/branches/addbirt:831210-885099,885686-886087 /ofbiz/branches/multitenant20100310:921280-927264 -/ofbiz/trunk:951708-989830 +/ofbiz/trunk:951708-991169 Modified: ofbiz/branches/jquery/LICENSE URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/LICENSE?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/LICENSE (original) +++ ofbiz/branches/jquery/LICENSE Tue Aug 31 12:34:56 2010 @@ -81,6 +81,7 @@ ofbiz/trunk/framework/catalina/lib/tomca ofbiz/trunk/framework/catalina/lib/tomcat-6.0.29-tomcat-juli-adapters.jar ofbiz/trunk/framework/entity/lib/commons-dbcp-1.3-20091113-r835956.jar ofbiz/trunk/framework/entity/lib/jdbc/derby-10.6.1.0.jar +ofbiz/trunk/framework/entity/lib/jdbc/derbytools-10.6.1.0.jar ofbiz/trunk/framework/jetty/lib/ant-1.6.5.jar ofbiz/trunk/framework/jetty/lib/jasper-compiler-5.5.15.jar ofbiz/trunk/framework/jetty/lib/jasper-compiler-jdt-5.5.15.jar Modified: ofbiz/branches/jquery/README URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/README?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/README (original) +++ ofbiz/branches/jquery/README Tue Aug 31 12:34:56 2010 @@ -16,7 +16,7 @@ Once that is properly setup just run the that comes with OFBiz, which is ofbiz.jar. To do this on the command line you would run: -java -Xms128M -Xmx512M -jar ofbiz.jar +java -Xms128M -Xmx512M -XX:MaxPermSize=128m -jar ofbiz.jar Even better use the startup scripts for Windows and Unix-based operating systems, namely startofbiz.bat and startofbiz.sh. Modified: ofbiz/branches/jquery/applications/accounting/servicedef/services_tax.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/accounting/servicedef/services_tax.xml?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/accounting/servicedef/services_tax.xml (original) +++ ofbiz/branches/jquery/applications/accounting/servicedef/services_tax.xml Tue Aug 31 12:34:56 2010 @@ -28,6 +28,7 @@ under the License. <service name="calcTaxInterface" engine="interface" location="" invoke=""> <description>Tax Calc Service Interface</description> <attribute name="productStoreId" type="String" mode="IN" optional="true"><!-- this will be used to find the payToPartyId, if the payToPartyId parameter is not explicitly passed, and as one of the columns to constrain by on the lookup --></attribute> + <attribute name="facilityId" type="String" mode="IN" optional="true"><!-- if no shippingAddress is passed in this will be used to lookup an address for a face-to-face sale --></attribute> <attribute name="payToPartyId" type="String" mode="IN" optional="true"/> <attribute name="billToPartyId" type="String" mode="IN" optional="true"><!-- would like to have this not-optional, but in some circumstances may need a tax estimate without knowing who the customer is --></attribute> <attribute name="itemProductList" type="java.util.List" mode="IN" optional="false"><!-- List of GenericValues --></attribute> Modified: ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java (original) +++ ofbiz/branches/jquery/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java Tue Aug 31 12:34:56 2010 @@ -134,6 +134,7 @@ public class TaxAuthorityServices { public static Map rateProductTaxCalc(DispatchContext dctx, Map context) { Delegator delegator = dctx.getDelegator(); String productStoreId = (String) context.get("productStoreId"); + String facilityId = (String) context.get("facilityId"); String payToPartyId = (String) context.get("payToPartyId"); String billToPartyId = (String) context.get("billToPartyId"); List itemProductList = (List) context.get("itemProductList"); @@ -143,42 +144,55 @@ public class TaxAuthorityServices { BigDecimal orderShippingAmount = (BigDecimal) context.get("orderShippingAmount"); BigDecimal orderPromotionsAmount = (BigDecimal) context.get("orderPromotionsAmount"); GenericValue shippingAddress = (GenericValue) context.get("shippingAddress"); + + Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); - if (shippingAddress == null || (shippingAddress.get("countryGeoId") == null && shippingAddress.get("stateProvinceGeoId") == null && shippingAddress.get("postalCodeGeoId") == null)) { - return ServiceUtil.returnError("The address(es) used for tax calculation did not have State/Province or Country or other tax jurisdiction values set, so we cannot determine the taxes to charge."); - } - - // without knowing the TaxAuthority parties, just find all TaxAuthories for the set of IDs... - Set taxAuthoritySet = FastSet.newInstance(); GenericValue productStore = null; - // Check value productStore *** New - if (productStoreId!=null) { - try { - getTaxAuthorities(delegator, shippingAddress, taxAuthoritySet); - if (productStoreId != null) { - productStore = delegator.findByPrimaryKey("ProductStore", UtilMisc.toMap("productStoreId", productStoreId)); - } - - } catch (GenericEntityException e) { - String errMsg = "Data error getting tax settings: " + e.toString(); - Debug.logError(e, errMsg, module); - return ServiceUtil.returnError(errMsg); + GenericValue facility = null; + try { + if (productStoreId != null) { + productStore = delegator.findByPrimaryKey("ProductStore", UtilMisc.toMap("productStoreId", productStoreId)); } - - if (productStore == null && payToPartyId == null) { - throw new IllegalArgumentException("Could not find payToPartyId [" + payToPartyId + "] or ProductStore [" + productStoreId + "] for tax calculation"); + if (facilityId != null) { + facility = delegator.findByPrimaryKey("Facility", UtilMisc.toMap("facilityId", facilityId)); } + } catch (GenericEntityException e) { + String errMsg = "Data error getting tax settings: " + e.toString(); + Debug.logError(e, errMsg, module); + return ServiceUtil.returnError(errMsg); + } + + if (productStore == null && payToPartyId == null) { + throw new IllegalArgumentException("Could not find payToPartyId [" + payToPartyId + "] or ProductStore [" + productStoreId + "] for tax calculation"); } - else - { + + if (shippingAddress == null && facility != null) { + // if there is no shippingAddress and there is a facility it means it is a face-to-face sale so get facility's address try { - getTaxAuthorities(delegator, shippingAddress, taxAuthoritySet); + GenericValue facilityContactMech = ContactMechWorker.getFacilityContactMechByPurpose(delegator, facilityId, UtilMisc.toList("SHIP_ORIG_LOCATION", "PRIMARY_LOCATION")); + if (facilityContactMech != null) { + shippingAddress = delegator.findByPrimaryKey("PostalAddress", + UtilMisc.toMap("contactMechId", facilityContactMech.getString("contactMechId"))); + } } catch (GenericEntityException e) { String errMsg = "Data error getting tax settings: " + e.toString(); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); } } + if (shippingAddress == null || (shippingAddress.get("countryGeoId") == null && shippingAddress.get("stateProvinceGeoId") == null && shippingAddress.get("postalCodeGeoId") == null)) { + return ServiceUtil.returnError("The address(es) used for tax calculation did not have State/Province or Country or other tax jurisdiction values set, so we cannot determine the taxes to charge."); + } + + // without knowing the TaxAuthority parties, just find all TaxAuthories for the set of IDs... + Set taxAuthoritySet = FastSet.newInstance(); + try { + getTaxAuthorities(delegator, shippingAddress, taxAuthoritySet); + } catch (GenericEntityException e) { + String errMsg = "Data error getting tax settings: " + e.toString(); + Debug.logError(e, errMsg, module); + return ServiceUtil.returnError(errMsg); + } // Setup the return lists. List orderAdjustments = FastList.newInstance(); Modified: ofbiz/branches/jquery/applications/content/data/helpdata/HELP_ROOT_FR.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/content/data/helpdata/HELP_ROOT_FR.xml?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/content/data/helpdata/HELP_ROOT_FR.xml (original) +++ ofbiz/branches/jquery/applications/content/data/helpdata/HELP_ROOT_FR.xml Tue Aug 31 12:34:56 2010 @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="iso-8859-1"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -23,13 +23,13 @@ xmlns="http://docbook.org/ns/docbook"> <title>Bienvenue dans l'aide Apache OFBiz</title> <section> - <para>Si vous êtes arrivés sur cette page sans sélectionner la page d'index, - c'est qu'il n'y a pas de page d'aide spécifique pour cette catégorie. + <para>Si vous êtes arrivés sur cette page sans sélectionner la page d'index, + c'est qu'il n'y a pas de page d'aide spécifique pour cette catégorie. </para> </section> <section> <para> - Cette fenêtre permet d'avoir une aide sur les différents composants de l'application Apache OFBiz. + Cette fenêtre permet d'avoir une aide sur les différents composants de l'application Apache OFBiz. </para> <para> L'aide est en cours de traduction. Toutes les contributions sont les bienvenues ! Modified: ofbiz/branches/jquery/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy (original) +++ ofbiz/branches/jquery/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy Tue Aug 31 12:34:56 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/branches/jquery/applications/manufacturing/webapp/manufacturing/bom/BomSimulation.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/manufacturing/webapp/manufacturing/bom/BomSimulation.ftl?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/manufacturing/webapp/manufacturing/bom/BomSimulation.ftl (original) +++ ofbiz/branches/jquery/applications/manufacturing/webapp/manufacturing/bom/BomSimulation.ftl Tue Aug 31 12:34:56 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> Modified: ofbiz/branches/jquery/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl (original) +++ ofbiz/branches/jquery/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRun.fo.ftl Tue Aug 31 12:34:56 2010 @@ -18,83 +18,77 @@ under the License. --> <#escape x as x?xml> <#if productionRunId?has_content> - <fo:block>${uiLabelMap.ManufacturingProductionRunId}: ${productionRunData.workEffortId?if_exists}<#if productionRunData.productionRunName?exists> / ${productionRunData.productionRunName}</#if></fo:block> - <fo:block space-after.optimum="0.2cm">${uiLabelMap.ProductProductId}: ${productionRunData.productId?if_exists}<#if productionRunData.product.productName?exists> / ${productionRunData.product.productName}</#if></fo:block> - <#assign dimColor = "#D4D0C8"> + <fo:list-block provisional-distance-between-starts="40mm"> + <fo:list-item> + <fo:list-item-label><fo:block font-size="12">${uiLabelMap.ManufacturingProductionRunId}</fo:block></fo:list-item-label> + <fo:list-item-body start-indent="body-start()"><fo:block><fo:inline font-size="14" font-weight="bold" space-end="5mm">${productionRunData.workEffortId?if_exists}</fo:inline><#if productionRunData.productionRunName?exists> ${productionRunData.productionRunName}</#if></fo:block></fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label><fo:block font-size="12">${uiLabelMap.ProductProductId}</fo:block></fo:list-item-label> + <fo:list-item-body start-indent="body-start()"><fo:block><fo:inline font-size="14" font-weight="bold" space-end="5mm">${productionRunData.productId?if_exists}</fo:inline><#if productionRunData.product.productName?exists> ${productionRunData.product.productName}</#if></fo:block></fo:list-item-body> + </fo:list-item> + </fo:list-block> + <fo:block><fo:leader leader-length="100%" leader-pattern="rule" rule-style="solid" rule-thickness="0.1mm" color="black"/></fo:block> <fo:table> - <fo:table-column column-width="4.0cm"/> - <fo:table-column column-width="5.5cm"/> - <fo:table-column column-width="4.0cm"/> - <fo:table-column column-width="5.0cm"/> + <fo:table-column column-width="9cm"/> + <fo:table-column column-width="9cm"/> <fo:table-body> <fo:table-row> <fo:table-cell padding="2pt"> - <fo:block>${uiLabelMap.ManufacturingEstimatedStartDate}:</fo:block> - </fo:table-cell> - <fo:table-cell padding="2pt"> - <fo:block><#if productionRunData.estimatedStartDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.estimatedStartDate, "dd/MM/yyyy")}</#if></fo:block> - </fo:table-cell> - <fo:table-cell padding="2pt"> - <fo:block>${uiLabelMap.CommonStartDate}:</fo:block> - </fo:table-cell> - <fo:table-cell padding="2pt"> - <fo:block><#if productionRunData.actualStartDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.actualStartDate, "dd/MM/yyyy")}</#if></fo:block> - </fo:table-cell> - </fo:table-row> - <fo:table-row> - <fo:table-cell padding="2pt"> - <fo:block>${uiLabelMap.ManufacturingEstimatedCompletionDate}:</fo:block> - </fo:table-cell> - <fo:table-cell padding="2pt"> - <fo:block><#if productionRunData.estimatedCompletionDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.estimatedCompletionDate, "dd/MM/yyyy")}</#if></fo:block> - </fo:table-cell> - <fo:table-cell padding="2pt"> - <fo:block>${uiLabelMap.ManufacturingActualCompletionDate}:</fo:block> - </fo:table-cell> - <fo:table-cell padding="2pt"> - <fo:block><#if productionRunData.actualCompletionDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.actualCompletionDate, "dd/MM/yyyy")}</#if></fo:block> - </fo:table-cell> - </fo:table-row> - <fo:table-row> - <fo:table-cell padding="2pt"> - <fo:block>${uiLabelMap.ManufacturingQuantityToProduce}:</fo:block> - </fo:table-cell> - <fo:table-cell padding="2pt"> - <fo:block>${productionRunData.quantityToProduce?if_exists}</fo:block> - </fo:table-cell> - <fo:table-cell padding="2pt"> - <fo:block>${uiLabelMap.ManufacturingQuantityProduced}:</fo:block> - </fo:table-cell> - <fo:table-cell padding="2pt"> - <fo:block>${productionRunData.quantityProduced?if_exists}</fo:block> - </fo:table-cell> - </fo:table-row> - <fo:table-row> - <fo:table-cell padding="2pt"> - <fo:block>${uiLabelMap.ManufacturingQuantityRemaining}:</fo:block> - </fo:table-cell> - <fo:table-cell padding="2pt"> - <fo:block>${productionRunData.quantityRemaining}</fo:block> - </fo:table-cell> - <fo:table-cell padding="2pt"> - <fo:block>${uiLabelMap.ManufacturingQuantityRejected}:</fo:block> - </fo:table-cell> - <fo:table-cell padding="2pt"> - <fo:block>${quantityRejected?if_exists}</fo:block> + <fo:list-block provisional-distance-between-starts="50mm"> + <fo:list-item> + <fo:list-item-label><fo:block>${uiLabelMap.ManufacturingQuantityToProduce}</fo:block></fo:list-item-label> + <fo:list-item-body start-indent="body-start()"><fo:block>${productionRunData.quantityToProduce?if_exists}</fo:block></fo:list-item-body> + </fo:list-item> + <fo:list-item space-after="5mm"> + <fo:list-item-label><fo:block>${uiLabelMap.ManufacturingQuantityRemaining}</fo:block></fo:list-item-label> + <fo:list-item-body start-indent="body-start()"><fo:block>${quantityRemaining?if_exists}</fo:block></fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label><fo:block>${uiLabelMap.ManufacturingEstimatedStartDate}</fo:block></fo:list-item-label> + <fo:list-item-body start-indent="body-start()"><fo:block><#if productionRunData.estimatedStartDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.estimatedStartDate, "dd/MM/yyyy")}</#if></fo:block></fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label><fo:block>${uiLabelMap.ManufacturingEstimatedCompletionDate}</fo:block></fo:list-item-label> + <fo:list-item-body start-indent="body-start()"><fo:block><#if productionRunData.estimatedCompletionDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.estimatedCompletionDate, "dd/MM/yyyy")}</#if></fo:block></fo:list-item-body> + </fo:list-item> + </fo:list-block> + </fo:table-cell> + <fo:table-cell padding="2pt"> + <fo:list-block provisional-distance-between-starts="50mm"> + <fo:list-item> + <fo:list-item-label><fo:block>${uiLabelMap.ManufacturingQuantityProduced}</fo:block></fo:list-item-label> + <fo:list-item-body start-indent="body-start()"><fo:block>${productionRunData.quantityProduced?if_exists}</fo:block></fo:list-item-body> + </fo:list-item> + <fo:list-item space-after="5mm"> + <fo:list-item-label><fo:block>${uiLabelMap.ManufacturingQuantityRejected}</fo:block></fo:list-item-label> + <fo:list-item-body start-indent="body-start()"><fo:block>${quantityRejected?if_exists}</fo:block></fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label><fo:block>${uiLabelMap.CommonStartDate}</fo:block></fo:list-item-label> + <fo:list-item-body start-indent="body-start()"><fo:block><#if productionRunData.actualStartDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.actualStartDate, "dd/MM/yyyy")}</#if></fo:block></fo:list-item-body> + </fo:list-item> + <fo:list-item> + <fo:list-item-label><fo:block>${uiLabelMap.ManufacturingActualCompletionDate}</fo:block></fo:list-item-label> + <fo:list-item-body start-indent="body-start()"><fo:block><#if productionRunData.actualCompletionDate?exists>${Static["org.ofbiz.base.util.UtilDateTime"].toDateString(productionRunData.actualCompletionDate, "dd/MM/yyyy")}</#if></fo:block></fo:list-item-body> + </fo:list-item> + </fo:list-block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> + <fo:block space-after.optimum="0.3cm"><fo:leader leader-length="100%" leader-pattern="rule" rule-style="solid" rule-thickness="0.1mm" color="black"/></fo:block> + <#-- Components --> - <fo:block space-after.optimum="0.3cm"></fo:block> - <fo:table> - <fo:table-column column-width="3.4cm"/> - <fo:table-column column-width="6.0cm"/> - <fo:table-column column-width="2.5cm"/> - <fo:table-column column-width="2.5cm"/> - <fo:table-column column-width="3.5cm"/> + <#if productionRunComponentsData?has_content> + <fo:table width="22cm"> + <fo:table-column column-width="20%"/> + <fo:table-column column-width="40%"/> + <fo:table-column column-width="10%"/> + <fo:table-column column-width="10%"/> + <fo:table-column column-width="10%"/> <fo:table-header> - <fo:table-row background-color="${dimColor}"> + <fo:table-row font-weight="bold"> <fo:table-cell><fo:block>${uiLabelMap.ProductProductId}</fo:block></fo:table-cell> <fo:table-cell><fo:block>${uiLabelMap.CommonDescription}</fo:block></fo:table-cell> <fo:table-cell><fo:block>${uiLabelMap.ManufacturingQuantity}</fo:block></fo:table-cell> @@ -103,42 +97,43 @@ under the License. </fo:table-row> </fo:table-header> <fo:table-body> - <#assign dimColor = "#D4D0C8"> - <#assign rowColor = "white"> <#list productionRunComponentsData as productionRunComponentData> <#assign resQuantityComp = productionRunComponentData.estimatedQuantity - productionRunComponentData.issuedQuantity> <fo:table-row> - <fo:table-cell padding="2pt"> + <fo:table-cell> <fo:block>${productionRunComponentData.productId?if_exists}</fo:block> </fo:table-cell> - <fo:table-cell padding="2pt"> + <fo:table-cell> <fo:block>${productionRunComponentData.internalName?if_exists}</fo:block> </fo:table-cell> - <fo:table-cell padding="2pt"> + <fo:table-cell> <fo:block>${productionRunComponentData.estimatedQuantity?if_exists}</fo:block> </fo:table-cell> - <fo:table-cell padding="2pt"> + <fo:table-cell> <fo:block>${productionRunComponentData.issuedQuantity?if_exists}</fo:block> </fo:table-cell> - <fo:table-cell padding="2pt"> + <fo:table-cell> <fo:block>${resQuantityComp?if_exists}</fo:block> </fo:table-cell> </fo:table-row> </#list> </fo:table-body> </fo:table> + </#if> + <fo:block space-after.optimum="0.3cm"><fo:leader leader-length="100%" leader-pattern="rule" rule-style="solid" rule-thickness="0.1mm" color="black"/></fo:block> + <#-- Tasks --> - <fo:block space-after.optimum="0.3cm"></fo:block> - <fo:table> - <fo:table-column column-width="3.5cm"/> - <fo:table-column column-width="3.5cm"/> - <fo:table-column column-width="5.0cm"/> - <fo:table-column column-width="3.0cm"/> - <fo:table-column column-width="3.0cm"/> + <#if productionRunRoutingTasks?has_content> + <fo:table width="100%"> + <fo:table-column column-width="20%"/> + <fo:table-column column-width="30%"/> + <fo:table-column column-width="30%"/> + <fo:table-column column-width="10%"/> + <fo:table-column column-width="10%"/> <fo:table-header> - <fo:table-row background-color="${dimColor}"> + <fo:table-row font-weight="bold"> <fo:table-cell><fo:block>${uiLabelMap.FixedAsset}</fo:block></fo:table-cell> <fo:table-cell><fo:block>${uiLabelMap.ManufacturingRoutingTask}</fo:block></fo:table-cell> <fo:table-cell><fo:block>${uiLabelMap.CommonDescription}</fo:block></fo:table-cell> @@ -147,28 +142,29 @@ under the License. </fo:table-row> </fo:table-header> <fo:table-body> - <#assign rowColor = "white"> <#list productionRunRoutingTasks as productionRunRoutingTask> <fo:table-row> - <fo:table-cell padding="2pt"> + <fo:table-cell> <fo:block>${productionRunRoutingTask.fixedAssetId?if_exists}</fo:block> </fo:table-cell> - <fo:table-cell padding="2pt"> + <fo:table-cell> <fo:block>${productionRunRoutingTask.workEffortName?if_exists}</fo:block> </fo:table-cell> - <fo:table-cell padding="2pt"> + <fo:table-cell> <fo:block>${productionRunRoutingTask.description?if_exists}</fo:block> </fo:table-cell> - <fo:table-cell padding="2pt"> + <fo:table-cell> <fo:block>${productionRunRoutingTask.estimatedSetupMillis?if_exists}</fo:block> </fo:table-cell> - <fo:table-cell padding="2pt"> + <fo:table-cell> <fo:block>${productionRunRoutingTask.estimatedMilliSeconds?if_exists}</fo:block> </fo:table-cell> </fo:table-row> </#list> </fo:table-body> </fo:table> + </#if> + <fo:block space-after.optimum="0.3cm"><fo:leader leader-length="100%" leader-pattern="rule" rule-style="solid" rule-thickness="0.1mm" color="black"/></fo:block> <#if productionRunContents?has_content> <fo:block space-after.optimum="0.3cm"></fo:block> @@ -176,13 +172,12 @@ under the License. <fo:table-column column-width="9cm"/> <fo:table-column column-width="9cm"/> <fo:table-header> - <fo:table-row background-color="${dimColor}"> + <fo:table-row font-weight="bold"> <fo:table-cell><fo:block>Documents</fo:block></fo:table-cell> <fo:table-cell><fo:block>Link</fo:block></fo:table-cell> </fo:table-row> </fo:table-header> <fo:table-body> - <#assign rowColor = "white"> <#list productionRunContents as productionRunContent> <fo:table-row> <fo:table-cell padding="2pt"> Propchange: ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Aug 31 12:34:56 2010 @@ -1,3 +1,3 @@ /ofbiz/branches/addbirt/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml:831210-885099,885686-886087 /ofbiz/branches/multitenant20100310/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:921280-927264 -/ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:989031 +/ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:951708-991169 Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java Tue Aug 31 12:34:56 2010 @@ -1529,6 +1529,7 @@ public class OrderServices { // if shippingAddress is still null then don't calculate tax; it may be an situation where no tax is applicable, or the data is bad and we don't have a way to find an address to check tax for if (shippingAddress == null) { + Debug.logWarning("Not calculating tax for Order [" + orderId + "] because there is no shippingAddress, and no address on the origin facility [" + orderHeader.getString("originFacilityId") + "]", module); continue; } Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Tue Aug 31 12:34:56 2010 @@ -56,6 +56,7 @@ import org.ofbiz.order.shoppingcart.prod import org.ofbiz.order.shoppingcart.shipping.ShippingEvents; import org.ofbiz.order.thirdparty.paypal.ExpressCheckoutEvents; import org.ofbiz.party.contact.ContactHelper; +import org.ofbiz.party.contact.ContactMechWorker; import org.ofbiz.product.store.ProductStoreWorker; import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.LocalDispatcher; @@ -759,7 +760,7 @@ public class CheckOutHelper { int shipGroups = this.cart.getShipGroupSize(); for (int i = 0; i < shipGroups; i++) { Map<Integer, ShoppingCartItem> shoppingCartItemIndexMap = new HashMap<Integer, ShoppingCartItem>(); - Map<String, Object> serviceContext = this.makeTaxContext(i, shipAddress, shoppingCartItemIndexMap); + Map<String, Object> serviceContext = this.makeTaxContext(i, shipAddress, shoppingCartItemIndexMap, cart.getFacilityId()); List<List<? extends Object>> taxReturn = this.getTaxAdjustments(dispatcher, "calcTax", serviceContext); if (Debug.verboseOn()) Debug.logVerbose("ReturnList: " + taxReturn, module); @@ -786,7 +787,7 @@ public class CheckOutHelper { } } - private Map<String, Object> makeTaxContext(int shipGroup, GenericValue shipAddress, Map<Integer, ShoppingCartItem> shoppingCartItemIndexMap) { + private Map<String, Object> makeTaxContext(int shipGroup, GenericValue shipAddress, Map<Integer, ShoppingCartItem> shoppingCartItemIndexMap, String originFacilityId) { ShoppingCart.CartShipInfo csi = cart.getShipInfo(shipGroup); int totalItems = csi.shipItemInfo.size(); @@ -835,6 +836,26 @@ public class CheckOutHelper { } } + if (shipAddress == null) { + // face-to-face order; use the facility address + if (originFacilityId != null) { + GenericValue facilityContactMech = ContactMechWorker.getFacilityContactMechByPurpose(delegator, originFacilityId, UtilMisc.toList("SHIP_ORIG_LOCATION", "PRIMARY_LOCATION")); + if (facilityContactMech != null) { + try { + shipAddress = delegator.findByPrimaryKey("PostalAddress", + UtilMisc.toMap("contactMechId", facilityContactMech.getString("contactMechId"))); + } catch (GenericEntityException e) { + Debug.logError(e, module); + } + } + } + } + + // if shippingAddress is still null then don't calculate tax; it may be an situation where no tax is applicable, or the data is bad and we don't have a way to find an address to check tax for + if (shipAddress == null) { + Debug.logWarning("Not calculating tax for new order because there is no shipping address, no billing address, and no address on the origin facility [" + originFacilityId + "]", module); + } + Map<String, Object> serviceContext = UtilMisc.<String, Object>toMap("productStoreId", cart.getProductStoreId()); serviceContext.put("payToPartyId", cart.getBillFromVendorPartyId()); serviceContext.put("billToPartyId", cart.getBillToCustomerPartyId()); Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java (original) +++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java Tue Aug 31 12:34:56 2010 @@ -1878,6 +1878,7 @@ public class ShoppingCartItem implements Map itemInfo = FastMap.newInstance(); itemInfo.put("productId", this.getProductId()); itemInfo.put("weight", this.getWeight()); + itemInfo.put("weightUomId", this.getProduct().getString("weightUomId")); itemInfo.put("size", this.getSize()); itemInfo.put("piecesIncluded", Long.valueOf(this.getPiecesIncluded())); itemInfo.put("featureSet", this.getFeatureSet()); Modified: ofbiz/branches/jquery/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java (original) +++ ofbiz/branches/jquery/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java Tue Aug 31 12:34:56 2010 @@ -481,12 +481,13 @@ public class ContactMechWorker { List<EntityCondition> conditionList = FastList.newInstance(); conditionList.add(EntityCondition.makeCondition("facilityId", facilityId)); conditionList.add(EntityCondition.makeCondition("contactMechPurposeTypeId", purposeType)); - conditionList.add(EntityCondition.makeConditionDate("fromDate", "thruDate")); EntityCondition entityCondition = EntityCondition.makeCondition(conditionList); try { facilityContactMechPurposes = delegator.findList("FacilityContactMechPurpose", entityCondition, null, UtilMisc.toList("-fromDate"), null, true); + facilityContactMechPurposes = EntityUtil.filterByDate(facilityContactMechPurposes); } catch (GenericEntityException e) { Debug.logWarning(e, module); + continue; } for (GenericValue facilityContactMechPurpose: facilityContactMechPurposes) { String contactMechId = facilityContactMechPurpose.getString("contactMechId"); @@ -494,10 +495,10 @@ public class ContactMechWorker { conditionList = FastList.newInstance(); conditionList.add(EntityCondition.makeCondition("facilityId", facilityId)); conditionList.add(EntityCondition.makeCondition("contactMechId", contactMechId)); - conditionList.add(EntityCondition.makeConditionDate("fromDate", "thruDate")); entityCondition = EntityCondition.makeCondition(conditionList); try { facilityContactMechs = delegator.findList("FacilityContactMech", entityCondition, null, UtilMisc.toList("-fromDate"), null, true); + facilityContactMechs = EntityUtil.filterByDate(facilityContactMechs); } catch (GenericEntityException e) { Debug.logWarning(e, module); } Propchange: ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Aug 31 12:34:56 2010 @@ -1,3 +1,3 @@ /incubator/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:418499-490456 /ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:921280-927264 -/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:989031 +/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:951708-991169 Modified: ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml (original) +++ ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml Tue Aug 31 12:34:56 2010 @@ -47,6 +47,12 @@ under the License. <now-timestamp field="newValue.fromDate"/> <create-value value-field="newValue"/> + + <!-- now create the FacilityContactMechPurpose record --> + <make-value value-field="facilityContactMechPurpose" entity-name="FacilityContactMechPurpose"/> + <set-pk-fields map="newValue" value-field="facilityContactMechPurpose"/> + <set field="facilityContactMechPurpose.contactMechPurposeTypeId" from-field="parameters.contactMechPurposeTypeId"/> + <create-value value-field="facilityContactMechPurpose"/> </simple-method> <simple-method method-name="updateFacilityContactMech" short-description="Update a FacilityContactMech"> Propchange: ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/test/InventoryTests.xml ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Aug 31 12:34:56 2010 @@ -1,3 +1,3 @@ /ofbiz/branches/addbirt/applications/product/script/org/ofbiz/shipment/test/FacilityTests.xml:831210-885099,885686-886087 /ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:921280-927264 -/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:989031 +/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:951708-991169 Modified: ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original) +++ ofbiz/branches/jquery/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Tue Aug 31 12:34:56 2010 @@ -115,7 +115,7 @@ public class ProductConfigWrapper implem basePrice = price; } questions = FastList.newInstance(); - if (product.getString("productTypeId") != null && product.getString("productTypeId").equals("AGGREGATED")) { + if ("AGGREGATED".equals(product.getString("productTypeId"))) { List<GenericValue> questionsValues = delegator.findByAnd("ProductConfig", UtilMisc.toMap("productId", productId), UtilMisc.toList("sequenceNum")); questionsValues = EntityUtil.filterByDate(questionsValues); Set<String> itemIds = FastSet.newInstance(); Modified: ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java (original) +++ ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java Tue Aug 31 12:34:56 2010 @@ -19,12 +19,23 @@ package org.ofbiz.shipment.shipment; import java.math.BigDecimal; +import java.math.MathContext; import java.util.List; +import java.util.Map; + +import javolution.util.FastList; +import javolution.util.FastMap; import org.ofbiz.base.util.Debug; +import org.ofbiz.base.util.UtilMisc; +import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; +import org.ofbiz.service.DispatchContext; +import org.ofbiz.service.GenericServiceException; +import org.ofbiz.service.LocalDispatcher; +import org.ofbiz.service.ModelService; /** * ShipmentWorker - Worker methods for Shipment and related entities @@ -32,7 +43,7 @@ import org.ofbiz.entity.GenericValue; public class ShipmentWorker { public static final String module = ShipmentWorker.class.getName(); - + public static final MathContext generalRounding = new MathContext(10); /* * Returns the value of a given ShipmentPackageContent record. Calculated by working out the total value (from the OrderItems) of all ItemIssuances * for the ShipmentItem then dividing that by the total quantity issued for the same to get an average item value then multiplying that by the package @@ -91,5 +102,111 @@ public class ShipmentWorker { value = totalValue.divide(totalIssued, 10, BigDecimal.ROUND_HALF_EVEN).multiply(quantity); return value; } -} + public static List<Map<String, BigDecimal>> getPackageSplit(DispatchContext dctx, List<Map<String, Object>> shippableItemInfo, BigDecimal maxWeight) { + // create the package list w/ the first package + List<Map<String, BigDecimal>> packages = FastList.newInstance(); + + if (UtilValidate.isNotEmpty(shippableItemInfo)) { + for (Map<String, Object> itemInfo: shippableItemInfo) { + long pieces = ((Long) itemInfo.get("piecesIncluded")).longValue(); + BigDecimal totalQuantity = (BigDecimal) itemInfo.get("quantity"); + BigDecimal totalWeight = (BigDecimal) itemInfo.get("weight"); + String productId = (String) itemInfo.get("productId"); + + // sanity check + if (pieces < 1) { + pieces = 1; // can NEVER be less than one + } + BigDecimal weight = totalWeight.divide(BigDecimal.valueOf(pieces), generalRounding); + for (int z = 1; z <= totalQuantity.intValue(); z++) { + BigDecimal partialQty = pieces > 1 ? BigDecimal.ONE.divide(BigDecimal.valueOf(pieces), generalRounding) : BigDecimal.ONE; + for (long x = 0; x < pieces; x++) { + if (weight.compareTo(maxWeight) >= 0) { + Map<String, BigDecimal> newPackage = FastMap.newInstance(); + newPackage.put(productId, partialQty); + packages.add(newPackage); + } else if (totalWeight.compareTo(BigDecimal.ZERO) > 0) { + // create the first package + if (packages.size() == 0) { + packages.add(FastMap.<String, BigDecimal>newInstance()); + } + + // package loop + boolean addedToPackage = false; + for (Map<String, BigDecimal> packageMap: packages) { + if (!addedToPackage) { + BigDecimal packageWeight = calcPackageWeight(dctx, packageMap, shippableItemInfo, weight); + if (packageWeight.compareTo(maxWeight) <= 0) { + BigDecimal qty = (BigDecimal) packageMap.get(productId); + qty = UtilValidate.isEmpty(qty) ? BigDecimal.ZERO : qty; + packageMap.put(productId, qty.add(partialQty)); + addedToPackage = true; + } + } + } + if (!addedToPackage) { + Map<String, BigDecimal> packageMap = FastMap.newInstance(); + packageMap.put(productId, partialQty); + packages.add(packageMap); + } + } + } + } + } + } + return packages; + } + + public static BigDecimal calcPackageWeight(DispatchContext dctx, Map<String, BigDecimal> packageMap, List<Map<String, Object>> shippableItemInfo, BigDecimal additionalWeight) { + + LocalDispatcher dispatcher = dctx.getDispatcher(); + BigDecimal totalWeight = BigDecimal.ZERO; + String defaultWeightUomId = UtilProperties.getPropertyValue("shipment.properties", "shipment.default.weight.uom"); + + for (Map.Entry<String, BigDecimal> entry: packageMap.entrySet()) { + String productId = entry.getKey(); + Map<String, Object> productInfo = getProductItemInfo(shippableItemInfo, productId); + BigDecimal productWeight = (BigDecimal) productInfo.get("weight"); + BigDecimal quantity = (BigDecimal) packageMap.get(productId); + + String weightUomId = (String) productInfo.get("weightUomId"); + + Debug.logInfo("Product Id : " + productId.toString() + " Product Weight : " + String.valueOf(productWeight) + " Product UomId : " + weightUomId + " assuming " + defaultWeightUomId + " if null. Quantity : " + String.valueOf(quantity), module); + + if (UtilValidate.isEmpty(weightUomId)) { + weightUomId = defaultWeightUomId; + } + if (!"WT_lb".equals(weightUomId)) { + // attempt a conversion to pounds + Map<String, Object> result = FastMap.newInstance(); + try { + result = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", weightUomId, "uomIdTo", "WT_lb", "originalValue", productWeight)); + } catch (GenericServiceException ex) { + Debug.logError(ex, module); + } + if (result.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_SUCCESS) && UtilValidate.isNotEmpty(result.get("convertedValue"))) { + productWeight = (BigDecimal) result.get("convertedValue"); + } else { + Debug.logError("Unsupported weightUom [" + weightUomId + "] for calcPackageWeight running productId " + productId + ", could not find a conversion factor to WT_lb",module); + } + } + + totalWeight = totalWeight.add(productWeight.multiply(quantity)); + } + Debug.logInfo("Package Weight : " + String.valueOf(totalWeight) + " lbs.", module); + return totalWeight.add(additionalWeight); + } + + public static Map<String, Object> getProductItemInfo(List<Map<String, Object>> shippableItemInfo, String productId) { + if (UtilValidate.isNotEmpty(shippableItemInfo)) { + for (Map<String, Object> itemInfoMap: shippableItemInfo) { + String compareProductId = (String) itemInfoMap.get("productId"); + if (productId.equals(compareProductId)) { + return itemInfoMap; + } + } + } + return null; + } +} Modified: ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java (original) +++ ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java Tue Aug 31 12:34:56 2010 @@ -62,6 +62,7 @@ import org.ofbiz.service.GenericServiceE import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ModelService; import org.ofbiz.service.ServiceUtil; +import org.ofbiz.shipment.shipment.ShipmentWorker; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.SAXException; @@ -1658,11 +1659,11 @@ public class UpsServices { } } - private static void splitEstimatePackages(Document requestDoc, Element shipmentElement, List<Map<String, Object>> shippableItemInfo, BigDecimal maxWeight, BigDecimal minWeight) { - List<Map<String, BigDecimal>> packages = getPackageSplit(shippableItemInfo, maxWeight); + private static void splitEstimatePackages(DispatchContext dctx, Document requestDoc, Element shipmentElement, List<Map<String, Object>> shippableItemInfo, BigDecimal maxWeight, BigDecimal minWeight) { + List<Map<String, BigDecimal>> packages = ShipmentWorker.getPackageSplit(dctx, shippableItemInfo, maxWeight); if (UtilValidate.isNotEmpty(packages)) { for (Map<String, BigDecimal> packageMap: packages) { - addPackageElement(requestDoc, shipmentElement, shippableItemInfo, packageMap, minWeight); + addPackageElement(dctx, requestDoc, shipmentElement, shippableItemInfo, packageMap, minWeight); } } else { @@ -1682,8 +1683,8 @@ public class UpsServices { } } - private static void addPackageElement(Document requestDoc, Element shipmentElement, List<Map<String, Object>> shippableItemInfo, Map<String, BigDecimal> packageMap, BigDecimal minWeight) { - BigDecimal packageWeight = checkForDefaultPackageWeight(calcPackageWeight(packageMap, shippableItemInfo, BigDecimal.ZERO), minWeight); + private static void addPackageElement(DispatchContext dctx, Document requestDoc, Element shipmentElement, List<Map<String, Object>> shippableItemInfo, Map<String, BigDecimal> packageMap, BigDecimal minWeight) { + BigDecimal packageWeight = checkForDefaultPackageWeight(ShipmentWorker.calcPackageWeight(dctx,packageMap, shippableItemInfo, BigDecimal.ZERO), minWeight); Element packageElement = UtilXml.addChildElement(shipmentElement, "Package", requestDoc); Element packagingTypeElement = UtilXml.addChildElement(packageElement, "PackagingType", requestDoc); UtilXml.addChildElementValue(packagingTypeElement, "Code", "00", requestDoc); @@ -1695,7 +1696,7 @@ public class UpsServices { if (packageMap.size() ==1) { Iterator<String> i = packageMap.keySet().iterator(); String productId = i.next(); - Map<String, Object> productInfo = getProductItemInfo(shippableItemInfo, productId); + Map<String, Object> productInfo = ShipmentWorker.getProductItemInfo(shippableItemInfo, productId); if (productInfo.get("inShippingBox") != null && ((String) productInfo.get("inShippingBox")).equalsIgnoreCase("Y") && productInfo.get("shippingDepth") !=null && productInfo.get("shippingWidth") !=null && productInfo.get("shippingHeight") !=null) { Element dimensionsElement = UtilXml.addChildElement(packageElement, "Dimensions", requestDoc); @@ -1722,91 +1723,6 @@ public class UpsServices { return (weight.compareTo(BigDecimal.ZERO) > 0 && weight.compareTo(minWeight) > 0 ? weight : minWeight); } - private static List<Map<String, BigDecimal>> getPackageSplit(List<Map<String, Object>> shippableItemInfo, BigDecimal maxWeight) { - // create the package list w/ the first package - List<Map<String, BigDecimal>> packages = FastList.newInstance(); - - if (shippableItemInfo != null) { - for (Map<String, Object> itemInfo: shippableItemInfo) { - long pieces = ((Long) itemInfo.get("piecesIncluded")).longValue(); - BigDecimal totalQuantity = (BigDecimal) itemInfo.get("quantity"); - BigDecimal totalWeight = (BigDecimal) itemInfo.get("weight"); - String productId = (String) itemInfo.get("productId"); - - // sanity check - if (pieces < 1) { - pieces = 1; // can NEVER be less than one - } - BigDecimal weight = totalWeight.divide(BigDecimal.valueOf(pieces), generalRounding); - - for (int z = 1; z <= totalQuantity.intValue(); z++) { - BigDecimal partialQty = pieces > 1 ? BigDecimal.ONE.divide(BigDecimal.valueOf(pieces), generalRounding) : BigDecimal.ONE; - for (long x = 0; x < pieces; x++) { - if (itemInfo.get("inShippingBox") != null && ((String) itemInfo.get("inShippingBox")).equalsIgnoreCase("Y")) { - Map<String, BigDecimal> newPackage = FastMap.newInstance(); - newPackage.put(productId, partialQty); - packages.add(newPackage); - } else if (weight.compareTo(maxWeight) >= 0) { - Map<String, BigDecimal> newPackage = FastMap.newInstance(); - newPackage.put(productId, partialQty); - packages.add(newPackage); - } else if (totalWeight.compareTo(BigDecimal.ZERO) > 0) { - // create the first package - if (packages.size() == 0) { - packages.add(FastMap.<String, BigDecimal>newInstance()); - } - - // package loop - //int packageSize = packages.size(); - boolean addedToPackage = false; - for (Map<String, BigDecimal> packageMap: packages) { - if (!addedToPackage) { - BigDecimal packageWeight = calcPackageWeight(packageMap, shippableItemInfo, weight); - if (packageWeight.compareTo(maxWeight) <= 0) { - BigDecimal qty = packageMap.get(productId); - qty = qty == null ? BigDecimal.ZERO : qty; - packageMap.put(productId, qty.add(partialQty)); - addedToPackage = true; - } - } - } - if (!addedToPackage) { - Map<String, BigDecimal> packageMap = FastMap.newInstance(); - packageMap.put(productId, partialQty); - packages.add(packageMap); - } - } - } - } - } - } - return packages; - } - - private static BigDecimal calcPackageWeight(Map<String, BigDecimal> packageMap, List<Map<String, Object>> shippableItemInfo, BigDecimal additionalWeight) { - BigDecimal totalWeight = BigDecimal.ZERO; - for (Map.Entry<String, BigDecimal> entry: packageMap.entrySet()) { - String productId = entry.getKey(); - Map<String, Object> productInfo = getProductItemInfo(shippableItemInfo, productId); - BigDecimal productWeight = (BigDecimal) productInfo.get("weight"); - BigDecimal quantity = (BigDecimal) packageMap.get(productId); - totalWeight = totalWeight.add(productWeight.multiply(quantity)); - } - return totalWeight.add(additionalWeight); - } - - private static Map<String, Object> getProductItemInfo(List<Map<String, Object>> shippableItemInfo, String productId) { - if (shippableItemInfo != null) { - for (Map<String, Object> testMap: shippableItemInfo) { - String id = (String) testMap.get("productId"); - if (productId.equals(id)) { - return testMap; - } - } - } - return null; - } - public static Map<String, Object> handleUpsRateInquireResponse(Document rateResponseDocument) { // process TrackResponse, update data as needed Element rateResponseElement = rateResponseDocument.getDocumentElement(); @@ -2138,7 +2054,7 @@ public class UpsServices { // Passing in a list of package weights overrides the calculation of same via shippableItemInfo if (UtilValidate.isEmpty(packageWeights)) { - splitEstimatePackages(rateRequestDoc, shipmentElement, shippableItemInfo, maxWeight, minWeight); + splitEstimatePackages(dctx, rateRequestDoc, shipmentElement, shippableItemInfo, maxWeight, minWeight); } else { for (BigDecimal packageWeight: packageWeights) { addPackageElement(rateRequestDoc, shipmentElement, packageWeight); Modified: ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java (original) +++ ofbiz/branches/jquery/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java Tue Aug 31 12:34:56 2010 @@ -77,8 +77,6 @@ public class UspsServices { public final static String module = UspsServices.class.getName(); public final static String errorResource = "ProductErrorUiLabels"; - public static final MathContext generalRounding = new MathContext(10); - private static List<String> domesticCountries = FastList.newInstance(); // Countries treated as domestic for rate enquiries static { @@ -171,13 +169,13 @@ public class UspsServices { } List<Map<String, Object>> shippableItemInfo = UtilGenerics.checkList(context.get("shippableItemInfo")); - List<Map<String, BigDecimal>> packages = getPackageSplit(dctx, shippableItemInfo, maxWeight); + List<Map<String, BigDecimal>> packages = ShipmentWorker.getPackageSplit(dctx, shippableItemInfo, maxWeight); boolean isOnePackage = packages.size() == 1; // use shippableWeight if there's only one package // TODO: Up to 25 packages can be included per request - handle more than 25 for (ListIterator<Map<String, BigDecimal>> li = packages.listIterator(); li.hasNext();) { Map<String, BigDecimal> packageMap = li.next(); - BigDecimal packageWeight = isOnePackage ? shippableWeight : calcPackageWeight(dctx, packageMap, shippableItemInfo, BigDecimal.ZERO); + BigDecimal packageWeight = isOnePackage ? shippableWeight : ShipmentWorker.calcPackageWeight(dctx, packageMap, shippableItemInfo, BigDecimal.ZERO); if (packageWeight.compareTo(BigDecimal.ZERO) == 0) { continue; } @@ -327,7 +325,7 @@ public class UspsServices { } List<Map<String, Object>> shippableItemInfo = UtilGenerics.checkList(context.get("shippableItemInfo")); - List<Map<String, BigDecimal>> packages = getPackageSplit(dctx, shippableItemInfo, maxWeight); + List<Map<String, BigDecimal>> packages = ShipmentWorker.getPackageSplit(dctx, shippableItemInfo, maxWeight); boolean isOnePackage = packages.size() == 1; // use shippableWeight if there's only one package // create the request document @@ -340,7 +338,7 @@ public class UspsServices { Element packageElement = UtilXml.addChildElement(requestDocument.getDocumentElement(), "Package", requestDocument); packageElement.setAttribute("ID", String.valueOf(li.nextIndex() - 1)); // use zero-based index (see examples) - BigDecimal packageWeight = isOnePackage ? shippableWeight : calcPackageWeight(dctx, packageMap, shippableItemInfo, BigDecimal.ZERO); + BigDecimal packageWeight = isOnePackage ? shippableWeight : ShipmentWorker.calcPackageWeight(dctx, packageMap, shippableItemInfo, BigDecimal.ZERO); if (packageWeight.compareTo(BigDecimal.ZERO) == 0) { continue; } @@ -408,123 +406,7 @@ public class UspsServices { return result; } - private static List<Map<String, BigDecimal>> getPackageSplit(DispatchContext dctx, List<Map<String, Object>> shippableItemInfo, BigDecimal maxWeight) { - // create the package list w/ the first package - List<Map<String, BigDecimal>> packages = FastList.newInstance(); - - if (shippableItemInfo != null) { - for (Map<String, Object> itemInfo: shippableItemInfo) { - long pieces = ((Long) itemInfo.get("piecesIncluded")).longValue(); - BigDecimal totalQuantity = (BigDecimal) itemInfo.get("quantity"); - BigDecimal totalWeight = (BigDecimal) itemInfo.get("weight"); - String productId = (String) itemInfo.get("productId"); - - // sanity check - if (pieces < 1) { - pieces = 1; // can NEVER be less than one - } - BigDecimal weight = totalWeight.divide(BigDecimal.valueOf(pieces), generalRounding); - - for (int z = 1; z <= totalQuantity.intValue(); z++) { - BigDecimal partialQty = pieces > 1 ? BigDecimal.ONE.divide(BigDecimal.valueOf(pieces), generalRounding) : BigDecimal.ONE; - for (long x = 0; x < pieces; x++) { - if (weight.compareTo(maxWeight) >= 0) { - Map<String, BigDecimal> newPackage = FastMap.newInstance(); - newPackage.put(productId, partialQty); - packages.add(newPackage); - } else if (totalWeight.compareTo(BigDecimal.ZERO) > 0) { - // create the first package - if (packages.size() == 0) { - packages.add(FastMap.<String, BigDecimal>newInstance()); - } - - // package loop - boolean addedToPackage = false; - for (Map<String, BigDecimal> packageMap: packages) { - if (!addedToPackage) { - BigDecimal packageWeight = calcPackageWeight(dctx, packageMap, shippableItemInfo, weight); - if (packageWeight.compareTo(maxWeight) <= 0) { - BigDecimal qty = (BigDecimal) packageMap.get(productId); - qty = qty == null ? BigDecimal.ZERO : qty; - packageMap.put(productId, qty.add(partialQty)); - addedToPackage = true; - } - } - } - if (!addedToPackage) { - Map<String, BigDecimal> packageMap = FastMap.newInstance(); - packageMap.put(productId, partialQty); - packages.add(packageMap); - } - } - } - } - } - } - return packages; - } - - private static BigDecimal calcPackageWeight(DispatchContext dctx, Map<String, BigDecimal> packageMap, List<Map<String, Object>> shippableItemInfo, BigDecimal additionalWeight) { - - LocalDispatcher dispatcher = dctx.getDispatcher(); - BigDecimal totalWeight = BigDecimal.ZERO; - String defaultWeightUomId = UtilProperties.getPropertyValue("shipment.properties", "shipment.default.weight.uom"); - if (UtilValidate.isEmpty(defaultWeightUomId)) { - Debug.logWarning("No shipment.default.weight.uom set in shipment.properties, setting it to WT_oz for USPS", module); - defaultWeightUomId = "WT_oz"; - } - - for (Map.Entry<String, BigDecimal> entry: packageMap.entrySet()) { - String productId = entry.getKey(); - Map<String, Object> productInfo = getProductItemInfo(shippableItemInfo, productId); - BigDecimal productWeight = (BigDecimal) productInfo.get("weight"); - BigDecimal quantity = (BigDecimal) packageMap.get(productId); - - // DLK - I'm not sure if this line is working. shipment_package seems to leave this value null so??? - String weightUomId = (String) productInfo.get("weight_uom_id"); - - Debug.logInfo("Product Id : " + productId.toString() + " Product Weight : " + String.valueOf(productWeight) + " Product UomId : " + weightUomId + " assuming " + defaultWeightUomId + " if null. Quantity : " + String.valueOf(quantity), module); - - if (UtilValidate.isEmpty(weightUomId)) { - weightUomId = defaultWeightUomId; - // Most shipping modules assume pounds while ProductEvents.java assumes WT_oz. - Line 720 for example. - } - if (!"WT_lb".equals(weightUomId)) { - // attempt a conversion to pounds - Map<String, Object> result = FastMap.newInstance(); - try { - result = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", weightUomId, "uomIdTo", "WT_lb", "originalValue", productWeight)); - } catch (GenericServiceException ex) { - Debug.logError(ex, module); - } - - if (result.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_SUCCESS) && result.get("convertedValue") != null) { - productWeight = (BigDecimal) result.get("convertedValue"); - } else { - Debug.logError("Unsupported weightUom [" + weightUomId + "] for calcPackageWeight running productId " + productId + ", could not find a conversion factor to WT_lb",module); - } - - } - - totalWeight = totalWeight.add(productWeight.multiply(quantity)); - } - Debug.logInfo("Package Weight : " + String.valueOf(totalWeight) + " lbs.", module); - return totalWeight.add(additionalWeight); - } - // lifted from UpsServices with no changes - 2004.09.06 JFE - private static Map<String, Object> getProductItemInfo(List<Map<String, Object>> shippableItemInfo, String productId) { - if (shippableItemInfo != null) { - for (Map<String, Object> testMap: shippableItemInfo) { - String id = (String) testMap.get("productId"); - if (productId.equals(id)) { - return testMap; - } - } - } - return null; - } - /* Track/Confirm Samples: (API=TrackV2) Modified: ofbiz/branches/jquery/framework/common/data/UnitData.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/data/UnitData.xml?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/common/data/UnitData.xml (original) +++ ofbiz/branches/jquery/framework/common/data/UnitData.xml Tue Aug 31 12:34:56 2010 @@ -265,6 +265,7 @@ under the License. <UomConversion uomId="WT_gr" uomIdTo="WT_g" conversionFactor="0.0648"/> <UomConversion uomId="WT_kg" uomIdTo="WT_g" conversionFactor="1000"/> <UomConversion uomId="WT_kg" uomIdTo="WT_lb" conversionFactor="2.2"/> + <UomConversion uomId="WT_g" uomIdTo="WT_kg" conversionFactor="0.001"/> <UomConversion uomId="WT_g" uomIdTo="WT_mg" conversionFactor="1000"/> <UomConversion uomId="WT_g" uomIdTo="WT_oz" conversionFactor="0.03527"/> <UomConversion uomId="WT_g" uomIdTo="WT_lb" conversionFactor="0.00220462247604"/> Propchange: ofbiz/branches/jquery/framework/common/widget/HelpScreens.xml ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Aug 31 12:34:56 2010 @@ -1,3 +1,3 @@ /ofbiz/branches/addbirt/applications/commonext/widget/HelpScreens.xml:831210-885099,885686-886087 /ofbiz/branches/multitenant20100310/framework/common/widget/HelpScreens.xml:921280-927264 -/ofbiz/trunk/framework/common/widget/HelpScreens.xml:989031 +/ofbiz/trunk/framework/common/widget/HelpScreens.xml:951708-991169 Modified: ofbiz/branches/jquery/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java (original) +++ ofbiz/branches/jquery/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java Tue Aug 31 12:34:56 2010 @@ -312,10 +312,10 @@ public class EntityFinderUtil { protected FlexibleMapAccessor<Object> fieldNameAcsr; public ConditionObject(Element conditionExprElement) { - this.fieldNameAcsr = FlexibleMapAccessor.getInstance(conditionExprElement.getAttribute("field-name")); + this.fieldNameAcsr = FlexibleMapAccessor.getInstance(conditionExprElement.getAttribute("field")); if (this.fieldNameAcsr.isEmpty()) { - // no "field-name"? try "name" - this.fieldNameAcsr = FlexibleMapAccessor.getInstance(conditionExprElement.getAttribute("name")); + // no "field"? try "field-name" + this.fieldNameAcsr = FlexibleMapAccessor.getInstance(conditionExprElement.getAttribute("field-name")); } } Modified: ofbiz/branches/jquery/framework/example/webapp/birt/report/chart.rptdesign URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/example/webapp/birt/report/chart.rptdesign?rev=991176&r1=991175&r2=991176&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/example/webapp/birt/report/chart.rptdesign (original) +++ ofbiz/branches/jquery/framework/example/webapp/birt/report/chart.rptdesign Tue Aug 31 12:34:56 2010 @@ -58,7 +58,7 @@ try { totalRow = 0; countOfRow = 0; if (examples) { - totalRow = examples.size(); + totalRow = examples.size() + 1; }]]></method> <method name="fetch"><