itemQuantityMap = UtilGenerics.checkMap(context.get("itemQtyMap"));
+ if ((cancelQuantity == null) && UtilValidate.isNotEmpty(itemQuantityMap)) {
+ String key = orderItemSeqId+":"+shipGroupSeqId;
+ if (UtilValidate.isNotEmpty(itemQuantityMap.get(key))) {
+ cancelQuantity = new BigDecimal(itemQuantityMap.get(key));
+ }
+
+ }
// debugging message info
String itemMsgInfo = orderId + " / " + orderItemSeqId + " / " + shipGroupSeqId;
@@ -2157,12 +2164,15 @@ public class OrderServices {
"orderId", orderItem.getString("orderId"),
"orderItemSeqId", orderItem.getString("orderItemSeqId"),
"shipGroupSeqId", orderItemShipGroupAssoc.getString("shipGroupSeqId"));
- try {
- dispatcher.runSync("deleteOrderItemShipGroupAssoc", localCtx);
- } catch (GenericServiceException e) {
- Debug.logError(e, module);
- return ServiceUtil.returnError(e.getMessage());
+ if (availableQuantity.compareTo(thisCancelQty) == 0) {
+ try {
+ dispatcher.runSync("deleteOrderItemShipGroupAssoc", localCtx);
+ } catch (GenericServiceException e) {
+ Debug.logError(e, module);
+ return ServiceUtil.returnError(e.getMessage());
+ }
}
+
// create order item change record
if (!"Y".equals(orderItem.getString("isPromo"))) {
diff --git a/applications/order/template/order/EditOrderItems.ftl b/applications/order/template/order/EditOrderItems.ftl
index 9187f80b1d..6079c72e06 100644
--- a/applications/order/template/order/EditOrderItems.ftl
+++ b/applications/order/template/order/EditOrderItems.ftl
@@ -257,7 +257,7 @@ under the License.
|
<#if itemSelectable>
-
+
#if>
|
#if>