svn commit: r651201 - /ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r651201 - /ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java

jacopoc
Author: jacopoc
Date: Thu Apr 24 02:08:38 2008
New Revision: 651201

URL: http://svn.apache.org/viewvc?rev=651201&view=rev
Log:
Improvements to my last commit.

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=651201&r1=651200&r2=651201&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 Thu Apr 24 02:08:38 2008
@@ -621,9 +621,7 @@
             } else {
                 pfs = getProduct().getRelatedCache("ProductFacility", UtilMisc.toMap("facilityId", facilityId), null);
             }
-            if (UtilValidate.isNotEmpty(pfs)) {
-                isWarehouseManaged = true;
-            } else {
+            if (UtilValidate.isEmpty(pfs)) {
                 if (getSubstitutedNode() != null && getSubstitutedNode().getProduct() != null) {
                     if (UtilValidate.isEmpty(facilityId)) {
                         pfs = getSubstitutedNode().getProduct().getRelatedCache("ProductFacility");
@@ -631,13 +629,13 @@
                         pfs = getSubstitutedNode().getProduct().getRelatedCache("ProductFacility", UtilMisc.toMap("facilityId", facilityId), null);
                     }
                 }
-                if (UtilValidate.isNotEmpty(pfs)) {
-                    for (int i = 0; i < pfs.size(); i++) {
-                        GenericValue pf = (GenericValue)pfs.get(i);
-                        if (UtilValidate.isNotEmpty(pf.get("minimumStock")) && UtilValidate.isNotEmpty(pf.get("reorderQuantity"))) {
-                            isWarehouseManaged = true;
-                            break;
-                        }
+            }
+            if (UtilValidate.isNotEmpty(pfs)) {
+                for (int i = 0; i < pfs.size(); i++) {
+                    GenericValue pf = (GenericValue)pfs.get(i);
+                    if (UtilValidate.isNotEmpty(pf.get("minimumStock")) && UtilValidate.isNotEmpty(pf.get("reorderQuantity"))) {
+                        isWarehouseManaged = true;
+                        break;
                     }
                 }
             }