This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release24.09 by this push:
new 31082f08c7 Fixed: addOrderShipmentToShipment/getQuantityForShipment
broken since the minilang-to-Groovy conversion (OFBIZ-13521)
31082f08c7 is described below
commit 31082f08c7a27ef1baff318dd08e9930870d3d1e
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 7d7ca12f8f..c321f5e2e9 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
@@ -1341,7 +1341,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
}
@@ -1373,7 +1373,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
}