svn commit: r1857605 - /ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java

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

svn commit: r1857605 - /ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java

nmalin
Author: nmalin
Date: Mon Apr 15 22:14:12 2019
New Revision: 1857605

URL: http://svn.apache.org/viewvc?rev=1857605&view=rev
Log:
Fixed: Update an order linked to an other order lost relation applications/order/
(OFBIZ-10926)
When you edit an order linked to an other order like drop shipment process, shopping cart lost the connexion.
The problem came from ShoppingCart.makeAllOrderItemAssociations() function that prepared all generic value OrderItemAssoc without toOrderId.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1857605&r1=1857604&r2=1857605&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCart.java Mon Apr 15 22:14:12 2019
@@ -4122,6 +4122,7 @@ public class ShoppingCart implements Ite
                             orderItemAssociation.set("orderId", commitment.getString("orderId"));
                             orderItemAssociation.set("orderItemSeqId", commitment.getString("orderItemSeqId"));
                             orderItemAssociation.set("shipGroupSeqId", "_NA_");
+                            orderItemAssociation.set("toOrderId", this.getOrderId());
                             orderItemAssociation.set("toOrderItemSeqId", item.getOrderItemSeqId());
                             orderItemAssociation.set("toShipGroupSeqId", "_NA_");
                             orderItemAssociation.set("orderItemAssocTypeId", "PURCHASE_ORDER");
@@ -4136,6 +4137,7 @@ public class ShoppingCart implements Ite
                     orderItemAssociation.set("orderId", item.getAssociatedOrderId());
                     orderItemAssociation.set("orderItemSeqId", item.getAssociatedOrderItemSeqId());
                     orderItemAssociation.set("shipGroupSeqId", csi.getAssociatedShipGroupSeqId() != null ? csi.getAssociatedShipGroupSeqId() : "_NA_");
+                    orderItemAssociation.set("toOrderId", this.getOrderId());
                     orderItemAssociation.set("toOrderItemSeqId", item.getOrderItemSeqId());
                     orderItemAssociation.set("toShipGroupSeqId", csi.getShipGroupSeqId() != null ? csi.getShipGroupSeqId() : "_NA_");
                     orderItemAssociation.set("orderItemAssocTypeId", item.getOrderItemAssocTypeId());