Author: jacopoc
Date: Mon May 14 12:19:34 2007
New Revision: 537955
URL:
http://svn.apache.org/viewvc?view=rev&rev=537955Log:
Set a default date of now for the ship groups with a null requiredByDate in setEstimatedDeliveryDates service.
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?view=diff&rev=537955&r1=537954&r2=537955==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Mon May 14 12:19:34 2007
@@ -2614,12 +2614,15 @@
while (backordersIt.hasNext()) {
GenericValue genericResult = (GenericValue) backordersIt.next();
String productId = genericResult.getString("productId");
- Timestamp requiredByDate = genericResult.getTimestamp("shipBeforeDate");
+ GenericValue orderItemShipGroup = delegator.findByPrimaryKey("OrderItemShipGroup", UtilMisc.toMap("orderId", genericResult.get("orderId"),
+ "shipGroupSeqId", genericResult.get("shipGroupSeqId")));
+ Timestamp requiredByDate = orderItemShipGroup.getTimestamp("shipByDate");
+
Double quantityNotAvailable = genericResult.getDouble("quantityNotAvailable");
double quantityNotAvailableRem = quantityNotAvailable.doubleValue();
if (requiredByDate == null) {
- // TODO: what happens if requiredByDate is null?
- continue;
+ // If shipByDate is not set, 'now' is assumed.
+ requiredByDate = now;
}
if (!products.containsKey(productId)) {
continue;