svn commit: r706870 - in /ofbiz/branches/typecheckcleanup200810/applications: accounting/src/org/ofbiz/accounting/payment/ content/src/org/ofbiz/content/ order/entitydef/ order/servicedef/ order/src/org/ofbiz/order/shoppingcart/ product/entitydef/ prod...

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

svn commit: r706870 - in /ofbiz/branches/typecheckcleanup200810/applications: accounting/src/org/ofbiz/accounting/payment/ content/src/org/ofbiz/content/ order/entitydef/ order/servicedef/ order/src/org/ofbiz/order/shoppingcart/ product/entitydef/ prod...

jonesde
Author: jonesde
Date: Tue Oct 21 23:55:57 2008
New Revision: 706870

URL: http://svn.apache.org/viewvc?rev=706870&view=rev
Log:
A number of cleanups and changes to get product browsing and purchasing in ecommerce working, through the quick checkout process; could be issues in other checkout processes or in the order manager

Modified:
    ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
    ofbiz/branches/typecheckcleanup200810/applications/content/src/org/ofbiz/content/ContentManagementServices.java
    ofbiz/branches/typecheckcleanup200810/applications/order/entitydef/entitymodel.xml
    ofbiz/branches/typecheckcleanup200810/applications/order/servicedef/secas.xml
    ofbiz/branches/typecheckcleanup200810/applications/order/servicedef/services.xml
    ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java
    ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
    ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
    ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel.xml
    ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel_shipment.xml
    ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml
    ofbiz/branches/typecheckcleanup200810/applications/product/src/org/ofbiz/product/price/PriceServices.java
    ofbiz/branches/typecheckcleanup200810/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java

Modified: ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=706870&r1=706869&r2=706870&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Tue Oct 21 23:55:57 2008
@@ -30,6 +30,7 @@
 import org.ofbiz.accounting.invoice.InvoiceWorker;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
+import org.ofbiz.base.util.ObjectType;
 import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilMisc;
@@ -1733,7 +1734,8 @@
             response.set("gatewayScoreResult", context.get("scoreCode"));
 
             // set the auth info
-            response.set("amount", context.get("processAmount"));
+            Double processAmount = (Double) context.get("processAmount");
+            response.set("amount", processAmount == null ? null : new BigDecimal(processAmount));
             response.set("referenceNum", context.get("authRefNum"));
             response.set("altReference", context.get("authAltRefNum"));
             response.set("gatewayCode", context.get("authCode"));

Modified: ofbiz/branches/typecheckcleanup200810/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=706870&r1=706869&r2=706870&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/content/src/org/ofbiz/content/ContentManagementServices.java Tue Oct 21 23:55:57 2008
@@ -18,6 +18,7 @@
  *******************************************************************************/
 package org.ofbiz.content;
 
+import java.math.BigDecimal;
 import java.nio.ByteBuffer;
 import java.sql.Timestamp;
 import java.util.Calendar;
@@ -1610,7 +1611,7 @@
                 ModelService subscriptionModel = dispatcher.getDispatchContext().getModelService("updateContentSubscriptionByProduct");
             while (orderItemIter.hasNext()) {
                 GenericValue orderItem = (GenericValue)orderItemIter.next();  
-                Double qty = (Double) orderItem.get("quantity");
+                BigDecimal qty = orderItem.getBigDecimal("quantity");
                 String productId = (String) orderItem.get("productId");
                 List productContentList = delegator.findByAnd("ProductContent", UtilMisc.toMap("productId", productId, "productContentTypeId", "ONLINE_ACCESS"));
                 List productContentListFiltered = EntityUtil.filterByDate(productContentList);

Modified: ofbiz/branches/typecheckcleanup200810/applications/order/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/order/entitydef/entitymodel.xml?rev=706870&r1=706869&r2=706870&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/order/entitydef/entitymodel.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/order/entitydef/entitymodel.xml Tue Oct 21 23:55:57 2008
@@ -68,7 +68,7 @@
       <field name="correspondingProductId" type="id"></field>
       <field name="taxAuthorityRateSeqId" type="id-ne"></field>
       <field name="sourceReferenceId" type="id-long"></field>
-      <field name="sourcePercentage" type="floating-point">
+      <field name="sourcePercentage" type="fixed-point">
           <description>for tax entries this is the tax percentage</description>          
       </field>
       <field name="customerReferenceId" type="id-long">
@@ -453,9 +453,9 @@
       <field name="shoppingListItemSeqId" type="id"></field>
       <field name="subscriptionId" type="id"></field>
       <field name="deploymentId" type="id"></field>
-      <field name="quantity" type="floating-point"></field>
-      <field name="cancelQuantity" type="floating-point"></field>
-      <field name="selectedAmount" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
+      <field name="cancelQuantity" type="fixed-point"></field>
+      <field name="selectedAmount" type="fixed-point"></field>
       <field name="unitPrice" type="currency-amount"></field>
       <field name="unitListPrice" type="currency-amount"></field>
       <field name="unitAverageCost" type="currency-amount"></field>
@@ -540,7 +540,7 @@
       <field name="toOrderItemSeqId" type="id-ne"></field>
       <field name="toShipGroupSeqId" type="id-ne"></field>
       <field name="orderItemAssocTypeId" type="id-ne"></field>
-      <field name="quantity" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
       <prim-key field="orderId"/>
       <prim-key field="orderItemSeqId"/>
       <prim-key field="shipGroupSeqId"/>
@@ -625,7 +625,7 @@
       <field name="invoiceItemSeqId" type="id-ne"></field>
       <field name="itemIssuanceId" type="id"></field>
       <field name="shipmentReceiptId" type="id"></field>
-      <field name="quantity" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
       <field name="amount" type="currency-amount"></field>
       <prim-key field="orderId"/>
       <prim-key field="orderItemSeqId"/>
@@ -662,8 +662,8 @@
       <field name="changeTypeEnumId" type="id"></field>      
       <field name="changeDatetime" type="date-time"></field>
       <field name="changeUserLogin" type="id-vlong"></field>
-      <field name="quantity" type="floating-point"></field>
-      <field name="cancelQuantity" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
+      <field name="cancelQuantity" type="fixed-point"></field>
       <field name="unitPrice" type="currency-amount"></field>
       <field name="itemDescription" type="description"></field>
       <field name="reasonEnumId" type="id"></field>
@@ -735,7 +735,7 @@
       <field name="orderItemSeqId" type="id-ne"></field>
       <field name="productPriceRuleId" type="id"></field>
       <field name="productPriceActionSeqId" type="id"></field>
-      <field name="modifyAmount" type="floating-point"></field>
+      <field name="modifyAmount" type="currency-precise"></field>
       <field name="description" type="description"></field>
       <field name="rateCode" type="short-varchar"></field>
       <prim-key field="orderItemPriceInfoId"/>
@@ -852,8 +852,8 @@
       <field name="orderId" type="id-ne"></field>
       <field name="orderItemSeqId" type="id-ne"></field>
       <field name="shipGroupSeqId" type="id-ne"></field>
-      <field name="quantity" type="floating-point"></field>
-      <field name="cancelQuantity" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
+      <field name="cancelQuantity" type="fixed-point"></field>
       <prim-key field="orderId"/>
       <prim-key field="orderItemSeqId"/>
       <prim-key field="shipGroupSeqId"/>
@@ -878,8 +878,8 @@
       <field name="orderItemSeqId" type="id-ne"></field>
       <field name="inventoryItemId" type="id-ne"></field>
       <field name="reserveOrderEnumId" type="id-ne"></field>
-      <field name="quantity" type="floating-point"></field>
-      <field name="quantityNotAvailable" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
+      <field name="quantityNotAvailable" type="fixed-point"></field>
       <field name="reservedDatetime" type="date-time"></field>
       <field name="createdDatetime" type="date-time"></field>
       <field name="promisedDatetime" type="date-time"></field>

Modified: ofbiz/branches/typecheckcleanup200810/applications/order/servicedef/secas.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/order/servicedef/secas.xml?rev=706870&r1=706869&r2=706870&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/order/servicedef/secas.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/order/servicedef/secas.xml Tue Oct 21 23:55:57 2008
@@ -287,15 +287,15 @@
 
     <!-- Requirement / stock level -->
     <eca service="createItemIssuance" event="invoke">
-        <condition field-name="quantity" value="0" operator="greater" type="Double"/>
+        <condition field-name="quantity" value="0" operator="greater" type="BigDecimal"/>
         <action service="checkCreateStockRequirementQoh" mode="sync" run-as-user="system"/>
     </eca>
     <eca service="updateItemIssuance" event="invoke">
-        <condition field-name="quantity" value="0" operator="greater" type="Double"/>
+        <condition field-name="quantity" value="0" operator="greater" type="BigDecimal"/>
         <action service="checkCreateStockRequirementQoh" mode="sync" run-as-user="system"/>
     </eca>
     <eca service="reserveOrderItemInventory" event="commit">
-        <condition field-name="quantity" value="0" operator="greater" type="Double"/>
+        <condition field-name="quantity" value="0" operator="greater" type="BigDecimal"/>
         <action service="checkCreateStockRequirementAtp" mode="sync" run-as-user="system"/>
     </eca>
     <!-- create the automatic and ATP requirements for sales orders but only if the status changes from created to approved -->

Modified: ofbiz/branches/typecheckcleanup200810/applications/order/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/order/servicedef/services.xml?rev=706870&r1=706869&r2=706870&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/order/servicedef/services.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/order/servicedef/services.xml Tue Oct 21 23:55:57 2008
@@ -118,11 +118,11 @@
         <attribute name="workEfforts" type="List" mode="IN" optional="true"/>
         <attribute name="orderAdjustments" type="List" mode="IN" optional="false"/>
         <attribute name="billingAccountId" type="String" mode="IN" optional="true"/>
-        <attribute name="shippingAmount" type="Double" mode="IN" optional="true"/>
+        <attribute name="shippingAmount" type="BigDecimal" mode="IN" optional="true"/>
         <attribute name="firstAttemptOrderId" type="String" mode="IN" optional="true"/>
         <attribute name="currencyUom" type="String" mode="IN" optional="false"/>
-        <attribute name="grandTotal" type="Double" mode="IN" optional="true"/>
-        <attribute name="taxAmount" type="Double" mode="IN" optional="true"/>
+        <attribute name="grandTotal" type="BigDecimal" mode="IN" optional="true"/>
+        <attribute name="taxAmount" type="BigDecimal" mode="IN" optional="true"/>
         <attribute name="orderDate" type="Timestamp" mode="IN" optional="true"/>
         <attribute name="orderItemShipGroupInfo" type="List" mode="IN" optional="true"/>
         <attribute name="orderItemAttributes" type="List" mode="IN" optional="true"/>
@@ -257,7 +257,7 @@
         <attribute name="orderStatusId" type="String" mode="OUT" optional="true"/>
         <attribute name="orderTypeId" type="String" mode="OUT" optional="true"/>
         <attribute name="needsInventoryIssuance" type="String" mode="OUT" optional="true"/>
-        <attribute name="grandTotal" type="Double" mode="OUT" optional="true"/>
+        <attribute name="grandTotal" type="BigDecimal" mode="OUT" optional="true"/>
         <attribute name="changeReason" type="String" mode="IN" optional="true"/>
     </service>
 

Modified: ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java?rev=706870&r1=706869&r2=706870&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java Tue Oct 21 23:55:57 2008
@@ -18,6 +18,7 @@
  *******************************************************************************/
 package org.ofbiz.order.shoppingcart;
 
+import java.math.BigDecimal;
 import java.util.Iterator;
 
 import javax.servlet.http.HttpSession;
@@ -89,13 +90,13 @@
                 cartAbandonedLine.set("reservStart", cartItem.getReservStart());
                 cartAbandonedLine.set("reservLength", new Double(cartItem.getReservLength()));
                 cartAbandonedLine.set("reservPersons", new Double(cartItem.getReservPersons()));
-                cartAbandonedLine.set("unitPrice", new Double(cartItem.getBasePrice()));
+                cartAbandonedLine.set("unitPrice", new BigDecimal(cartItem.getBasePrice()));
                 cartAbandonedLine.set("reserv2ndPPPerc", new Double(cartItem.getReserv2ndPPPerc()));
                 cartAbandonedLine.set("reservNthPPPerc", new Double(cartItem.getReservNthPPPerc()));
                 if (cartItem.getConfigWrapper() != null) {
                     cartAbandonedLine.set("configId", cartItem.getConfigWrapper().getConfigId());
                 }
-                cartAbandonedLine.set("totalWithAdjustments", new Double(cartItem.getItemSubTotal()));
+                cartAbandonedLine.set("totalWithAdjustments", new BigDecimal(cartItem.getItemSubTotal()));
                 //not doing pre-reservations now, so this is always N
                 cartAbandonedLine.set("wasReserved", "N");
                 cartAbandonedLine.create();

Modified: ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=706870&r1=706869&r2=706870&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Tue Oct 21 23:55:57 2008
@@ -568,14 +568,7 @@
         DecimalFormat formatter = new DecimalFormat(currencyFormat);
         double cartTotal = this.cart.getGrandTotal();
         String grandTotalString = formatter.format(cartTotal);
-        Double grandTotal = null;
-        try {
-            grandTotal = new Double(formatter.parse(grandTotalString).doubleValue());
-        } catch (ParseException e) {
-            Debug.logError(e, "Problem getting parsed currency amount from DecimalFormat", module);
-            String errMsg = UtilProperties.getMessage(resource,"checkhelper.could_not_create_order_parsing_totals", (cart != null ? cart.getLocale() : Locale.getDefault()));
-            return ServiceUtil.returnError(errMsg);
-        }
+        BigDecimal grandTotal = new BigDecimal(grandTotalString);
 
         // store the order - build the context
         Map context = this.cart.makeCartMap(this.dispatcher, areOrderItemsExploded);

Modified: ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=706870&r1=706869&r2=706870&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Tue Oct 21 23:55:57 2008
@@ -3410,10 +3410,10 @@
                 orderItem.set("productId", UtilValidate.isNotEmpty(aggregatedInstanceId) ? aggregatedInstanceId : item.getProductId());
                 orderItem.set("prodCatalogId", item.getProdCatalogId());
                 orderItem.set("productCategoryId", item.getProductCategoryId());
-                orderItem.set("quantity", new Double(item.getQuantity()));
-                orderItem.set("selectedAmount", new Double(item.getSelectedAmount()));
-                orderItem.set("unitPrice", new Double(item.getBasePrice()));
-                orderItem.set("unitListPrice", new Double(item.getListPrice()));
+                orderItem.set("quantity", new BigDecimal(item.getQuantity()));
+                orderItem.set("selectedAmount", new BigDecimal(item.getSelectedAmount()));
+                orderItem.set("unitPrice", new BigDecimal(item.getBasePrice()));
+                orderItem.set("unitListPrice", new BigDecimal(item.getListPrice()));
                 orderItem.set("isModifiedPrice",item.getIsModifiedPrice() ? "Y" : "N");
                 orderItem.set("isPromo", item.getIsPromo() ? "Y" : "N");
 
@@ -3679,8 +3679,8 @@
             productPromoUse.set("promoSequenceId", UtilFormatOut.formatPaddedNumber(sequenceValue, 5));
             productPromoUse.set("productPromoId", productPromoUseInfo.getProductPromoId());
             productPromoUse.set("productPromoCodeId", productPromoUseInfo.getProductPromoCodeId());
-            productPromoUse.set("totalDiscountAmount", new Double(productPromoUseInfo.getTotalDiscountAmount()));
-            productPromoUse.set("quantityLeftInActions", new Double(productPromoUseInfo.getQuantityLeftInActions()));
+            productPromoUse.set("totalDiscountAmount", new BigDecimal(productPromoUseInfo.getTotalDiscountAmount()));
+            productPromoUse.set("quantityLeftInActions", new BigDecimal(productPromoUseInfo.getQuantityLeftInActions()));
             productPromoUse.set("partyId", partyId);
             productPromoUses.add(productPromoUse);
             sequenceValue++;
@@ -4279,7 +4279,7 @@
             if (shipEstimate != 0) {
                 GenericValue shipAdj = delegator.makeValue("OrderAdjustment");
                 shipAdj.set("orderAdjustmentTypeId", "SHIPPING_CHARGES");
-                shipAdj.set("amount", new Double(shipEstimate));
+                shipAdj.set("amount", new BigDecimal(shipEstimate));
                 shipAdj.set("shipGroupSeqId", shipGroupSeqId);
                 values.add(shipAdj);
             }
@@ -4301,7 +4301,7 @@
                 GenericValue assoc = delegator.makeValue("OrderItemShipGroupAssoc");
                 assoc.set("orderItemSeqId", item.getOrderItemSeqId());
                 assoc.set("shipGroupSeqId", shipGroupSeqId);
-                assoc.set("quantity", new Double(itemInfo.quantity));
+                assoc.set("quantity", new BigDecimal(itemInfo.quantity));
                 values.add(assoc);
 
                 // create the item tax adjustment

Modified: ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel.xml?rev=706870&r1=706869&r2=706870&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel.xml Tue Oct 21 23:55:57 2008
@@ -3345,7 +3345,7 @@
       <field name="productPromoCodeId" type="id-ne"></field>
       <field name="partyId" type="id-ne"></field>
       <field name="totalDiscountAmount" type="currency-amount"></field>
-      <field name="quantityLeftInActions" type="floating-point"></field>
+      <field name="quantityLeftInActions" type="fixed-point"></field>
       <prim-key field="orderId"/>
       <prim-key field="promoSequenceId"/>
       <relation type="one" fk-name="PROD_PRUSE_PROMO" rel-entity-name="ProductPromo">

Modified: ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel_shipment.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel_shipment.xml?rev=706870&r1=706869&r2=706870&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel_shipment.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/product/entitydef/entitymodel_shipment.xml Tue Oct 21 23:55:57 2008
@@ -57,8 +57,8 @@
       <field name="maintHistSeqId" type="id"></field>
       <field name="issuedDateTime" type="date-time"></field>
       <field name="issuedByUserLoginId" type="id-vlong"></field>
-      <field name="quantity" type="floating-point"></field>
-      <field name="cancelQuantity" type="floating-point"></field>
+      <field name="quantity" type="fixed-point"></field>
+      <field name="cancelQuantity" type="fixed-point"></field>
       <prim-key field="itemIssuanceId"/>
       <relation type="one" fk-name="ITEM_ISS_INVITM" rel-entity-name="InventoryItem">
         <key-map field-name="inventoryItemId"/>

Modified: ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml?rev=706870&r1=706869&r2=706870&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml Tue Oct 21 23:55:57 2008
@@ -188,8 +188,8 @@
                             <set from-field="parameters.shipGroupSeqId" field="reserveOisgirMap.shipGroupSeqId"/>
                             <set from-field="lastNonSerInventoryItem.inventoryItemId" field="reserveOisgirMap.inventoryItemId"/>
                             <set from-field="parameters.reserveOrderEnumId" field="reserveOisgirMap.reserveOrderEnumId"/>
-                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantity"/>
-                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantityNotAvailable"/>
+                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantity" type="BigDecimal"/>
+                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantityNotAvailable" type="BigDecimal"/>
                             <set from-field="parameters.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/>
                             <set from-field="promisedDatetime" field="reserveOisgirMap.promisedDatetime"/>
                             <set from-field="parameters.sequenceId" field="reserveOisgirMap.sequenceId"/>
@@ -253,8 +253,8 @@
                             <set from-field="parameters.shipGroupSeqId" field="reserveOisgirMap.shipGroupSeqId"/>
                             <set from-field="newNonSerInventoryItem.inventoryItemId" field="reserveOisgirMap.inventoryItemId"/>
                             <set from-field="parameters.reserveOrderEnumId" field="reserveOisgirMap.reserveOrderEnumId"/>
-                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantity"/>
-                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantityNotAvailable"/>
+                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantity" type="BigDecimal"/>
+                            <set from-field="parameters.quantityNotReserved" field="reserveOisgirMap.quantityNotAvailable" type="BigDecimal"/>
                             <set from-field="parameters.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/>
                             <set from-field="promisedDatetime" field="reserveOisgirMap.promisedDatetime"/>
                             <set from-field="parameters.sequenceId" field="reserveOisgirMap.sequenceId"/>
@@ -357,7 +357,7 @@
         <set from-field="parameters.reserveOrderEnumId" field="reserveOisgirMap.reserveOrderEnumId"/>
         <set from-field="parameters.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/>
         <set from-field="promisedDatetime" field="reserveOisgirMap.promisedDatetime"/>
-        <set field="reserveOisgirMap.quantity" value="1" type="Double"/>
+        <set field="reserveOisgirMap.quantity" value="1" type="BigDecimal"/>
         <if-not-empty field="parameters.sequenceId">
             <set field="reserveOisgirMap.sequenceId" from-field="parameters.sequenceId"/>
         </if-not-empty>        
@@ -404,7 +404,7 @@
                     <set from-field="parameters.reserveOrderEnumId" field="reserveOisgirMap.reserveOrderEnumId"/>
                     <set from-field="parameters.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/>
                     <set from-field="promisedDatetime" field="reserveOisgirMap.promisedDatetime"/>
-                    <set field="reserveOisgirMap.quantity" value="1" type="Double"/>
+                    <set field="reserveOisgirMap.quantity" value="1" type="BigDecimal"/>
                     <if-not-empty field="parameters.sequenceId">
                         <set field="reserveOisgirMap.sequenceId" from-field="parameters.sequenceId"/>
                     </if-not-empty>
@@ -451,7 +451,7 @@
                         <set from-field="inventoryItem.inventoryItemId" field="reserveOisgirMap.inventoryItemId"/>
                         <set from-field="parameters.reserveOrderEnumId" field="reserveOisgirMap.reserveOrderEnumId"/>
                         <set from-field="parameters.reservedDatetime" field="reserveOisgirMap.reservedDatetime"/>
-                        <set from-field="parameters.deductAmount" field="reserveOisgirMap.quantity"/>
+                        <set from-field="parameters.deductAmount" field="reserveOisgirMap.quantity" type="BigDecimal"/>
                         <set from-field="promisedDatetime" field="reserveOisgirMap.promisedDatetime"/>
                         <if-not-empty field="parameters.sequenceId">
                             <set field="reserveOisgirMap.sequenceId" from-field="parameters.sequenceId"/>

Modified: ofbiz/branches/typecheckcleanup200810/applications/product/src/org/ofbiz/product/price/PriceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/product/src/org/ofbiz/product/price/PriceServices.java?rev=706870&r1=706869&r2=706870&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/product/src/org/ofbiz/product/price/PriceServices.java (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/product/src/org/ofbiz/product/price/PriceServices.java Tue Oct 21 23:55:57 2008
@@ -1082,7 +1082,7 @@
 
                     orderItemPriceInfo.set("productPriceRuleId", productPriceAction.get("productPriceRuleId"));
                     orderItemPriceInfo.set("productPriceActionSeqId", productPriceAction.get("productPriceActionSeqId"));
-                    orderItemPriceInfo.set("modifyAmount", new Double(modifyAmount));
+                    orderItemPriceInfo.set("modifyAmount", new BigDecimal(modifyAmount));
                     orderItemPriceInfo.set("rateCode", productPriceAction.get("rateCode"));
                     // make sure description is <= than 250 chars
                     String priceInfoDescriptionString = priceInfoDescription.toString();

Modified: ofbiz/branches/typecheckcleanup200810/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/typecheckcleanup200810/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java?rev=706870&r1=706869&r2=706870&view=diff
==============================================================================
--- ofbiz/branches/typecheckcleanup200810/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java (original)
+++ ofbiz/branches/typecheckcleanup200810/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java Tue Oct 21 23:55:57 2008
@@ -18,6 +18,7 @@
  *******************************************************************************/
 package org.ofbiz.product.subscription;
 
+import java.math.BigDecimal;
 import java.sql.Timestamp;
 import java.util.Calendar;
 import java.util.HashMap;
@@ -247,7 +248,7 @@
             Iterator orderItemIter = orderItemList.iterator();
             while (orderItemIter.hasNext()) {
                 GenericValue orderItem = (GenericValue)orderItemIter.next();  
-                Double qty = (Double) orderItem.get("quantity");
+                BigDecimal qty = orderItem.getBigDecimal("quantity");
                 String productId = (String) orderItem.get("productId");
                 if (UtilValidate.isEmpty(productId)) {
                     continue;