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
This commit is contained in:
Jacques Le Roux
2021-02-23 12:59:46 +01:00
parent 67e4f61a66
commit 07054fdaf5
@@ -488,7 +488,7 @@ public class MrpServices {
continue;
}
eventQuantityTmp = eventQuantityTmp.negate();
parameters = UtilMisc.toMap("mrpId", mrpId, "productId", productId, "eventDate", customTimePeriod.getDate("fromDate"),
parameters = UtilMisc.toMap("mrpId", mrpId, "productId", productId, "eventDate", customTimePeriod.getTimestamp("fromDate"),
"mrpEventTypeId", "SALES_FORECAST");
try {
InventoryEventPlannedServices.createOrUpdateMrpEvent(parameters, eventQuantityTmp, null, sfd.getString(