Author: sichen
Date: Fri Sep 7 18:36:21 2007
New Revision: 573769
URL:
http://svn.apache.org/viewvc?rev=573769&view=revLog:
comments
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java?rev=573769&r1=573768&r2=573769&view=diff==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java Fri Sep 7 18:36:21 2007
@@ -627,6 +627,11 @@
return isWarehouseManaged;
}
+ /**
+ * A part is considered manufactured if it has child nodes AND unless ignoreSupplierProducts is set, if it also has no unexpired SupplierProducts defined
+ * @param ignoreSupplierProducts
+ * @return
+ */
public boolean isManufactured(boolean ignoreSupplierProducts) {
List supplierProducts = null;
try {
@@ -637,6 +642,11 @@
supplierProducts = EntityUtil.filterByDate(supplierProducts, UtilDateTime.nowTimestamp(), "availableFromDate", "availableThruDate", true);
return childrenNodes.size() > 0 && (ignoreSupplierProducts || UtilValidate.isEmpty(supplierProducts));
}
+
+ /**
+ * By default, a part is manufactured if it has child nodes and it has NO SupplierProducts defined
+ * @return
+ */
public boolean isManufactured() {
return isManufactured(false);
}