[ofbiz-framework] branch trunk updated: Fixed: Converted GString to String while setting success message in receiveInventoryProduct service to avoid the ClassCastException. Also corrected loop condition while creating inventory information during PO receiving to fix the issue where each product is getting received two times (doubled the qty) instead of single time.(OFBIZ-11909) (#218)

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

[ofbiz-framework] branch trunk updated: Fixed: Converted GString to String while setting success message in receiveInventoryProduct service to avoid the ClassCastException. Also corrected loop condition while creating inventory information during PO receiving to fix the issue where each product is getting received two times (doubled the qty) instead of single time.(OFBIZ-11909) (#218)

Pawan Verma-2
This is an automated email from the ASF dual-hosted git repository.

pawan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 356af00  Fixed: Converted GString to String while setting success message in receiveInventoryProduct service to avoid the ClassCastException. Also corrected loop condition while creating inventory information during PO receiving to fix the issue where each product is getting received two times (doubled the qty) instead of single time.(OFBIZ-11909) (#218)
356af00 is described below

commit 356af00b83e3b697b77f2c3867414e9818a6746a
Author: lodhiravi <[hidden email]>
AuthorDate: Sat Jul 25 12:04:03 2020 +0530

    Fixed: Converted GString to String while setting success message in receiveInventoryProduct service to avoid the ClassCastException. Also corrected loop condition while creating inventory information during PO receiving to fix the issue where each product is getting received two times (doubled the qty) instead of single time.(OFBIZ-11909) (#218)
---
 .../product/groovyScripts/shipment/ShipmentReceiptServices.groovy     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/applications/product/groovyScripts/shipment/ShipmentReceiptServices.groovy b/applications/product/groovyScripts/shipment/ShipmentReceiptServices.groovy
index b69e9cd..287f626 100644
--- a/applications/product/groovyScripts/shipment/ShipmentReceiptServices.groovy
+++ b/applications/product/groovyScripts/shipment/ShipmentReceiptServices.groovy
@@ -108,7 +108,7 @@ def receiveInventoryProduct () {
         }
     }
 
-    for (Double currentLoop = 0; currentLoop <= loops; currentLoop++) {
+    for (Double currentLoop = 0; currentLoop < loops; currentLoop++) {
         logInfo("receiveInventoryProduct Looping and creating inventory info - ${currentLoop}")
 
         // if there is an inventoryItemId, update it (this will happen when receiving serialized inventory already in the system, like for returns); if not create one
@@ -166,7 +166,7 @@ def receiveInventoryProduct () {
         serviceInMap.inventoryItemId = currentInventoryItemId
         run service:"balanceInventoryItems", with: serviceInMap
 
-        successMessageList << "Received ${parameters.quantityAccepted} of ${parameters.productId} in inventory item ${currentInventoryItemId}"
+        successMessageList << "Received ${parameters.quantityAccepted} of ${parameters.productId} in inventory item ${currentInventoryItemId}".toString()
     }
     // return the last inventory item received
     result.inventoryItemId = currentInventoryItemId