Hi David,

when you create a purchase order the modification below is preventing the 
OrderItemShipGroupAssoc records to be created (and they are now required by the 
new shipment screens I implemented a few weeks ago).
I guess that you did it because it was causing the ship groups to be destroyed 
when an order is edited, am I right?
What is the best way to fix it?
We could add the following code:
            cart.setItemShipGroupQty(newItem, quantity, 0);
right after the call newItem.setQuantity or we could modify the setQuantity 
method to always call cart.setItemShipGroupQty

Could you please help? I don't want to change something that will have an 
impact of what you fixed.

Thank you,

Jacopo

On Jan 7, 2010, at 1:01 PM, [email protected] wrote:

> Modified: 
> ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
> URL: 
> http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java?rev=896855&r1=896854&r2=896855&view=diff
> ==============================================================================
> --- 
> ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
>  (original)
> +++ 
> ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
>  Thu Jan  7 11:59:48 2010
> @@ -239,7 +239,7 @@
>         newItem.setCancelBackOrderDate(cancelBackOrderDate != null ? 
> cancelBackOrderDate : cart.getCancelBackOrderDate());
> 
>         try {
> -            newItem.setQuantity(quantity, dispatcher, cart, true);
> +            newItem.setQuantity(quantity, dispatcher, cart, true, false);
>         } catch (CartItemModifyException e) {
>             cart.removeCartItem(cart.getItemIndex(newItem), dispatcher);
>             cart.clearItemShipInfo(newItem);

Reply via email to