This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release18.12 by this push:
new 8a287a3 Fixed: Error while running MRP (OFBIZ-12187)
8a287a3 is described below
commit 8a287a306a933e00085f983b6248f7a670c2afac
Author: Jacques Le Roux <[email protected]>
AuthorDate: Tue Feb 23 12:59:46 2021 +0100
Fixed: Error while running MRP (OFBIZ-12187)
I tried running MRP for Sales Forecast option and it returned the following
error.
Error running the initMrpEvents service: Service [initMrpEvents] target
threw
an unexpected exception (java.sql.Timestamp cannot be cast to java.sql.Date)
Thanks: Nameet Jain
Conflict handled by hand
---
.../src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java
b/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java
index ec453f9..faf0d8e 100644
---
a/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java
+++
b/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java
@@ -472,7 +472,8 @@ public class MrpServices {
continue;
}
eventQuantityTmp = eventQuantityTmp.negate();
- parameters = UtilMisc.toMap("mrpId", mrpId,
"productId", productId, "eventDate", customTimePeriod.getDate("fromDate"),
"mrpEventTypeId", "SALES_FORECAST");
+ parameters = UtilMisc.toMap("mrpId", mrpId,
"productId", productId, "eventDate", customTimePeriod.getTimestamp("fromDate"),
+ "mrpEventTypeId", "SALES_FORECAST");
try {
InventoryEventPlannedServices.createOrUpdateMrpEvent(parameters,
eventQuantityTmp, null, sfd.getString("salesForecastDetailId"), false,
delegator);
} catch (GenericEntityException e) {