Author: jacopoc
Date: Thu Apr 19 02:32:34 2007
New Revision: 530348
URL:
http://svn.apache.org/viewvc?view=rev&rev=530348Log:
Better handling, in the MRP, of the years offset for orders without a date. Now it adds the years from now.
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java?view=diff&rev=530348&r1=530347&r2=530348==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java Thu Apr 19 02:32:34 2007
@@ -20,6 +20,7 @@
package org.ofbiz.manufacturing.mrp;
import java.sql.Timestamp;
+import java.util.Calendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
@@ -149,7 +150,9 @@
if (UtilValidate.isEmpty(defaultYearsOffset)) {
notAssignedDate = now;
} else {
- notAssignedDate = UtilDateTime.getYearStart(now, 0, 0, defaultYearsOffset.intValue());
+ Calendar calendar = UtilDateTime.toCalendar(now);
+ calendar.add(Calendar.YEAR, defaultYearsOffset.intValue());
+ notAssignedDate = new Timestamp(calendar.getTimeInMillis());
}
resultList = null;
iteratorResult = null;