You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2014/06/19 09:13:54 UTC

svn commit: r1603734 - in /ofbiz/branches/release12.04: ./ applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy applications/product/widget/catalog/ProductForms.xml

Author: jacopoc
Date: Thu Jun 19 07:13:53 2014
New Revision: 1603734

URL: http://svn.apache.org/r1603734
Log:
Applied fix from trunk for revision: 1603732 
===

OFBIZ-5589: Display Currency Uom of Best Selling Product in order component was ignoring the currency of the orders; thanks to Lê Văn Thiêp for the report and to Deepak Dixit for the fix.



Modified:
    ofbiz/branches/release12.04/   (props changed)
    ofbiz/branches/release12.04/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy
    ofbiz/branches/release12.04/applications/product/widget/catalog/ProductForms.xml

Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1603732

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=1603734&r1=1603733&r2=1603734&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 Thu Jun 19 07:13:53 2014
@@ -49,7 +49,7 @@ orderHeaderList.each { orderHeader ->
         inListFlag = false
         
         bestSellingProducts.each { bestSellingProduct ->
-            if ((bestSellingProduct.productId).equals(orderItem.productId)) {
+            if ((bestSellingProduct.productId).equals(orderItem.productId) && (bestSellingProduct.currencyUom).equals(orderHeader.currencyUom)) {
                 inListFlag = true;
                 bestSellingProduct.amount += amount;
                 bestSellingProduct.qtyOrdered += qtyOrdered;
@@ -63,6 +63,7 @@ orderHeaderList.each { orderHeader ->
             orderItemDetail.productName = contentWrapper.get("PRODUCT_NAME");
             orderItemDetail.amount = amount;
             orderItemDetail.qtyOrdered = qtyOrdered;
+            orderItemDetail.currencyUom = orderHeader.currencyUom;
             bestSellingProducts.add(orderItemDetail);
         }
     }

Modified: ofbiz/branches/release12.04/applications/product/widget/catalog/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/product/widget/catalog/ProductForms.xml?rev=1603734&r1=1603733&r2=1603734&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/product/widget/catalog/ProductForms.xml (original)
+++ ofbiz/branches/release12.04/applications/product/widget/catalog/ProductForms.xml Thu Jun 19 07:13:53 2014
@@ -2104,7 +2104,7 @@ under the License.
     <form name="ListBestProduct" type="list" paginate="false" list-name="bestSellingProducts" view-size="5"
             header-row-style="header-row" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <field name="productName" title="${uiLabelMap.ProductName}"><display description="${productName}"/></field>
-        <field name="amount"><display type="currency"/></field>
+        <field name="amount"><display type="currency" currency="${currencyUom}"/></field>
         <field name="qtyOrdered" title="${uiLabelMap.OrderQtyOrdered}"><display/></field>
     </form>