svn commit: r1231450 - in /ofbiz/branches/release11.04: ./ applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java

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

svn commit: r1231450 - in /ofbiz/branches/release11.04: ./ applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java

jleroux@apache.org
Author: jleroux
Date: Sat Jan 14 07:43:58 2012
New Revision: 1231450

URL: http://svn.apache.org/viewvc?rev=1231450&view=rev
Log:
"Applied fix from trunk for revision: 1231445"
------------------------------------------------------------------------
r1231445 | jleroux | 2012-01-14 08:33:13 +0100 (sam., 14 janv. 2012) | 3 lines

A patch from Ankit Jain https://issues.apache.org/jira/browse/OFBIZ-OFBIZ-4629 "The Status of PicklistItem never changes from PICKITEM_PENDING to PICKITEM_COMPLETED."

Whenever a order is verified picked the status of Picklistitem never changes to "PICKITEM_COMPLETED", even if the order is completed the status always remain as "PICKITEM_PENDING". I think when a PiclistItem is verified the status should change to "PICKITEM_COMPLETED".
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release11.04/   (props changed)
    ofbiz/branches/release11.04/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java

Propchange: ofbiz/branches/release11.04/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jan 14 07:43:58 2012
@@ -2,4 +2,4 @@
 /ofbiz/branches/dojo1.4:951708-952957
 /ofbiz/branches/jquery:952958-1044489
 /ofbiz/branches/multitenant20100310:921280-927264
-/ofbiz/trunk:1100197,1100880,1104423,1131144,1131396,1132496,1132749,1133353,1134990,1135199,1135686,1135929,1137201,1137433,1137435,1138463,1138485,1139346,1139385,1139504,1139521,1140358,1140362,1140375,1140469,1144537,1144791,1153073,1153768,1158124,1158126,1158608,1159080,1163036,1163093,1163533,1165130,1166591,1167116,1167314,1167480,1167501,1167510,1167517,1167606,1172213,1172243,1174964,1175130,1175135,1175143,1177128,1178175,1178199,1180398,1181878,1182259,1182310,1182731,1182858,1183651,1184906,1184996,1184999,1185179,1187515,1187528,1187933,1187944,1188042,1188564,1189592,1189601,1190134,1194958,1196778,1199276,1199450,1200207,1201110,1201125,1201941,1203350,1203776,1206507,1206690,1208335,1209250,1209362,1210193,1210211,1212147,1214124,1220298,1221889,1221913,1222105,1222478,1226055,1226065,1226223,1226231,1227965,1229304,1229952,1231444
+/ofbiz/trunk:1100197,1100880,1104423,1131144,1131396,1132496,1132749,1133353,1134990,1135199,1135686,1135929,1137201,1137433,1137435,1138463,1138485,1139346,1139385,1139504,1139521,1140358,1140362,1140375,1140469,1144537,1144791,1153073,1153768,1158124,1158126,1158608,1159080,1163036,1163093,1163533,1165130,1166591,1167116,1167314,1167480,1167501,1167510,1167517,1167606,1172213,1172243,1174964,1175130,1175135,1175143,1177128,1178175,1178199,1180398,1181878,1182259,1182310,1182731,1182858,1183651,1184906,1184996,1184999,1185179,1187515,1187528,1187933,1187944,1188042,1188564,1189592,1189601,1190134,1194958,1196778,1199276,1199450,1200207,1201110,1201125,1201941,1203350,1203776,1206507,1206690,1208335,1209250,1209362,1210193,1210211,1212147,1214124,1220298,1221889,1221913,1222105,1222478,1226055,1226065,1226223,1226231,1227965,1229304,1229952,1231444-1231445

Modified: ofbiz/branches/release11.04/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java?rev=1231450&r1=1231449&r2=1231450&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java (original)
+++ ofbiz/branches/release11.04/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java Sat Jan 14 07:43:58 2012
@@ -307,6 +307,21 @@ public class VerifyPickSession implement
         this.issueItemsToShipment(shipmentId, locale);
         this.updateProduct();
 
+        // Set PicklistItem to Complete
+        List<GenericValue> picklistItems = this.getDelegator().findByAnd("PicklistItem", UtilMisc.toMap("orderId", orderId));
+        for (GenericValue item : picklistItems) {
+            Map<String, Object> setPicklistItemToCompleteCtx = FastMap.newInstance();
+            setPicklistItemToCompleteCtx.put("picklistBinId", item.get("picklistBinId"));
+            setPicklistItemToCompleteCtx.put("orderId", orderId);
+            setPicklistItemToCompleteCtx.put("orderItemSeqId", item.get("orderItemSeqId"));
+            setPicklistItemToCompleteCtx.put("shipGroupSeqId", item.get("shipGroupSeqId"));
+            setPicklistItemToCompleteCtx.put("inventoryItemId", item.get("inventoryItemId"));
+            setPicklistItemToCompleteCtx.put("quantity", item.get("quantity"));
+            setPicklistItemToCompleteCtx.put("itemStatusId", "PICKITEM_COMPLETED");
+            setPicklistItemToCompleteCtx.put("userLogin", this.getUserLogin());
+            this.getDispatcher().runSync("setPicklistItemToComplete", setPicklistItemToCompleteCtx);
+        }
+
         // Update the shipment status to Picked, this will trigger createInvoicesFromShipment and finally a invoice will be created
         Map<String, Object> updateShipmentCtx = FastMap.newInstance();
         updateShipmentCtx.put("shipmentId", shipmentId);