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 2007/09/24 16:11:42 UTC

svn commit: r578818 - in /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart: CheckOutEvents.java ShoppingCart.java

Author: jacopoc
Date: Mon Sep 24 07:11:41 2007
New Revision: 578818

URL: http://svn.apache.org/viewvc?rev=578818&view=rev
Log:
Ship to address is cleared if the ship to customer party is changed.

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java?rev=578818&r1=578817&r2=578818&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java Mon Sep 24 07:11:41 2007
@@ -261,6 +261,7 @@
         ShoppingCart cart = (ShoppingCart) request.getSession().getAttribute("shoppingCart");
         String shipToCustomerPartyId = request.getParameter("shipToCustomerPartyId");
         cart.setShipToCustomerPartyId(shipToCustomerPartyId);
+        cart.setShippingContactMechId(null);
         return "success";
     }
 

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=578818&r1=578817&r2=578818&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Mon Sep 24 07:11:41 2007
@@ -2083,7 +2083,7 @@
     /** Sets the shipping contact mech id. */
     public void setShippingContactMechId(int idx, String shippingContactMechId) {
         CartShipInfo csi = this.getShipInfo(idx);
-        if (isSalesOrder()) {
+        if (isSalesOrder() && UtilValidate.isNotEmpty(shippingContactMechId)) {
             // Verify if the new address is compatible with the ProductGeos rules of
             // the products already in the cart
             GenericValue shippingAddress = null;