svn commit: r1241333 - in /ofbiz/trunk/applications/product: webapp/catalog/WEB-INF/actions/product/BestProducts.groovy widget/catalog/ProductForms.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1241333 - in /ofbiz/trunk/applications/product: webapp/catalog/WEB-INF/actions/product/BestProducts.groovy widget/catalog/ProductForms.xml

hansbak-2
Author: hansbak
Date: Tue Feb  7 02:41:38 2012
New Revision: 1241333

URL: http://svn.apache.org/viewvc?rev=1241333&view=rev
Log:
currency and scale corrected in order best seller list

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=1241333&r1=1241332&r2=1241333&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 Tue Feb  7 02:41:38 2012
@@ -86,6 +86,9 @@ while (itr <= 5) {
         }
     }
     if (!orderItemDetail.isEmpty()) {
+        if (orderItemDetail.amount) {
+            orderItemDetail.amount = orderItemDetail.amount.setScale(2, BigDecimal.ROUND_HALF_UP);
+        }
         topSellingProducts.add(orderItemDetail);
         bestSellingProducts.remove(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=1241333&r1=1241332&r2=1241333&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml Tue Feb  7 02:41:38 2012
@@ -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/></field>
+        <field name="amount"><display type="currency"/></field>
         <field name="qtyOrdered" title="${uiLabelMap.OrderQtyOrdered}"><display/></field>
     </form>