You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2007/04/17 08:49:52 UTC

svn commit: r529503 - in /ofbiz/trunk/applications/order: servicedef/services.xml src/org/ofbiz/order/order/OrderServices.java

Author: lektran
Date: Mon Apr 16 23:49:52 2007
New Revision: 529503

URL: http://svn.apache.org/viewvc?view=rev&rev=529503
Log:
Couple more changes from Double to BigDecimal
OFBIZ-880

Modified:
    ofbiz/trunk/applications/order/servicedef/services.xml
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Modified: ofbiz/trunk/applications/order/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services.xml?view=diff&rev=529503&r1=529502&r2=529503
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/services.xml Mon Apr 16 23:49:52 2007
@@ -302,7 +302,7 @@
         <attribute name="shipGroupSeqId" type="String" mode="IN" optional="false"/>
         <attribute name="productId" type="String" mode="IN" optional="false"/>
         <attribute name="prodCatalogId" type="String" mode="IN" optional="false"/>
-        <attribute name="basePrice" type="Double" mode="IN" optional="true"/>
+        <attribute name="basePrice" type="BigDecimal" mode="IN" optional="true"/>
         <attribute name="quantity" type="Double" mode="IN" optional="false"/>
         <attribute name="amount" type="Double" mode="IN" optional="true"/>
         <attribute name="overridePrice" type="String" mode="IN" optional="true"/>
@@ -386,7 +386,7 @@
         <attribute name="orderId" type="String" mode="IN"/>
         <attribute name="paymentMethodTypeId" type="String" mode="IN"/>
         <attribute name="paymentMethodId" type="String" mode="IN" optional="true"/>
-        <attribute name="maxAmount" type="Double" mode="IN" optional="true"/>
+        <attribute name="maxAmount" type="BigDecimal" mode="IN" optional="true"/>
         <attribute name="orderPaymentPreferenceId" type="String" mode="OUT"/>
     </service>
 
@@ -635,7 +635,7 @@
         <description>Add Payment Method to Order.From this servicewe will call the createOrderPaymentPreference service to create OrderPaymentPreference</description>
         <attribute type="String" mode="IN" name="orderId" optional="false"/>
         <attribute type="String" mode="IN" name="paymentMethodId" optional="false"/>
-        <attribute type="Double" mode="IN" name="maxAmount"/>
+        <attribute type="BigDecimal" mode="IN" name="maxAmount"/>
         <attribute type="String" mode="OUT" name="orderPaymentPreferenceId"/>
     </service>
     

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?view=diff&rev=529503&r1=529502&r2=529503
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Apr 16 23:49:52 2007
@@ -2904,7 +2904,7 @@
         String orderId = (String) context.get("orderId");
         String productId = (String) context.get("productId");
         String prodCatalogId = (String) context.get("prodCatalogId");
-        Double basePrice = (Double) context.get("basePrice");
+        BigDecimal basePrice = (BigDecimal) context.get("basePrice");
         Double quantity = (Double) context.get("quantity");
         Double amount = (Double) context.get("amount");
         String overridePrice = (String) context.get("overridePrice");
@@ -2939,7 +2939,7 @@
         // add in the new product
         try {
             ShoppingCartItem item = ShoppingCartItem.makeItem(null, productId, null, quantity.doubleValue(), null, null, null, null, null, null, null, null, prodCatalogId, null, null, null, dispatcher, cart, null, null, null, Boolean.FALSE, Boolean.FALSE);
-            if (basePrice != null&&overridePrice!=null) {
+            if (basePrice != null && overridePrice != null) {
                 item.setBasePrice(basePrice.doubleValue());
                 // special hack to make sure we re-calc the promos after a price change
                 item.setQuantity(quantity.doubleValue() + 1, dispatcher, cart, false);