This is an automated email from the ASF dual-hosted git repository.
mridulpathak 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 1384d7ff8c Fixed: addOrderShipmentToShipment/getQuantityForShipment
broken since the minilang-to-Groovy conversion (OFBIZ-13521)
1384d7ff8c is described below
commit 1384d7ff8c1542a6374ae271b921028fc1ebf3f4
Author: Mridul Pathak <[email protected]>
AuthorDate: Thu Sep 3 19:04:38 2026 +0530
Fixed: addOrderShipmentToShipment/getQuantityForShipment broken since the
minilang-to-Groovy conversion (OFBIZ-13521)
getQuantityForShipment computed the negative of the correct remaining
quantity, so addOrderShipmentToShipment rejected almost any real quantity as
"greater than the remaining quantity." Separately, a typo (shipemntItemSeqId)
meant the shipment item sequence ID was never carried into the
createOrderShipment call, so it always failed with a missing required
parameter. Both left createOrderShipmentPlan, and anything else calling
addOrderShipmentToShipment, unable to complete successfully.
---
.../groovy/org/apache/ofbiz/product/shipment/ShipmentServices.groovy | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/applications/product/src/main/groovy/org/apache/ofbiz/product/shipment/ShipmentServices.groovy
b/applications/product/src/main/groovy/org/apache/ofbiz/product/shipment/ShipmentServices.groovy
index e46d2c3565..6e57bf6cc5 100644
---
a/applications/product/src/main/groovy/org/apache/ofbiz/product/shipment/ShipmentServices.groovy
+++
b/applications/product/src/main/groovy/org/apache/ofbiz/product/shipment/ShipmentServices.groovy
@@ -1342,7 +1342,7 @@ Map addOrderShipmentToShipment() {
Map serviceResultCSI = run service: 'createShipmentItem', with:
[shipmentId: parameters.shipmentId,
productId: orderItem.productId,
quantity: parameters.quantity]
- parameters.shipmentItemSeqId = serviceResultCSI.shipemntItemSeqId
+ parameters.shipmentItemSeqId = serviceResultCSI.shipmentItemSeqId
result.shipmentItemSeqId = serviceResultCSI.shipmentItemSeqId
run service: 'createOrderShipment', with: parameters
}
@@ -1374,7 +1374,7 @@ Map getQuantityForShipment() {
BigDecimal totPlannedOrIssuedQuantity = issuedQuantity + plannedQuantity
BigDecimal orderCancelQuantity = orderItem.cancelQuantity ?:
BigDecimal.ZERO
- result.remainingQuantity = orderCancelQuantity +
totPlannedOrIssuedQuantity - orderItem.quantity
+ result.remainingQuantity = orderItem.quantity - orderCancelQuantity -
totPlannedOrIssuedQuantity
return result
}