Fixed: Error while running MRP
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
@@ -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(
