Author: jacopoc
Date: Fri Feb 5 12:08:47 2010
New Revision: 906911
URL: http://svn.apache.org/viewvc?rev=906911&view=rev
Log:
Closed, completed and cancelled production runs should not considered by MRP
when selecting materials and products to produce.
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?rev=906911&r1=906910&r2=906911&view=diff
==============================================================================
---
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
(original)
+++
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
Fri Feb 5 12:08:47 2010
@@ -330,6 +330,11 @@
iteratorResult = resultList.iterator();
while (iteratorResult.hasNext()) {
genericResult = (GenericValue) iteratorResult.next();
+ if
("PRUN_CLOSED".equals(genericResult.getString("currentStatusId")) ||
+
"PRUN_COMPLETED".equals(genericResult.getString("currentStatusId")) ||
+
"PRUN_CANCELLED".equals(genericResult.getString("currentStatusId"))) {
+ continue;
+ }
String productId = genericResult.getString("productId");
BigDecimal eventQuantityTmp =
genericResult.getBigDecimal("estimatedQuantity").negate();
Timestamp estimatedShipDate =
genericResult.getTimestamp("estimatedStartDate");
@@ -362,7 +367,9 @@
iteratorResult = resultList.iterator();
while (iteratorResult.hasNext()) {
genericResult = (GenericValue) iteratorResult.next();
- if
("PRUN_CLOSED".equals(genericResult.getString("currentStatusId"))) {
+ if
("PRUN_CLOSED".equals(genericResult.getString("currentStatusId")) ||
+
"PRUN_COMPLETED".equals(genericResult.getString("currentStatusId")) ||
+
"PRUN_CANCELLED".equals(genericResult.getString("currentStatusId"))) {
continue;
}
BigDecimal qtyToProduce =
genericResult.getBigDecimal("quantityToProduce");