From 50de55d26a6011ece713a292d01c590aade326e6 Mon Sep 17 00:00:00 2001 From: Yashwant Dhakad Date: Tue, 10 Jun 2025 12:57:00 +0530 Subject: [PATCH] Fixed: ArithmeticException when producing inventory from a production run with general cost set on task level (OFBIZ-13254) --- .../ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java b/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java index 9f250741ee..07873c07a6 100644 --- a/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java +++ b/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java @@ -1869,7 +1869,7 @@ public static Map productionRunProduce(DispatchContext ctx, Map< } } if (totalCost != null) { - unitCost = totalCost.divide(quantity); + unitCost = totalCost.divide(quantity, DECIMALS, ROUNDING); } else { unitCost = BigDecimal.ZERO; }