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:11:40 UTC
svn commit: r1603732 - in /ofbiz/trunk/applications/product:
webapp/catalog/WEB-INF/actions/product/BestProducts.groovy
widget/catalog/ProductForms.xml
Author: jacopoc
Date: Thu Jun 19 07:11:40 2014
New Revision: 1603732
URL: http://svn.apache.org/r1603732
Log:
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/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy
ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy?rev=1603732&r1=1603731&r2=1603732&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy Thu Jun 19 07:11:40 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/trunk/applications/product/widget/catalog/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml?rev=1603732&r1=1603731&r2=1603732&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml Thu Jun 19 07:11:40 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>