This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 07054fd  Fixed: Error while running MRP (OFBIZ-12187)
07054fd is described below

commit 07054fdaf51fbabbf6e2003c5d0d44019669c7b8
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
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
---
 .../src/main/java/org/apache/ofbiz/manufacturing/mrp/MrpServices.java   | 2 +-
 1 file changed, 1 insertion(+), 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 58b064e..53234cd 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
@@ -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(

Reply via email to