Author: mridulpathak
Date: Sat May 21 12:34:45 2016
New Revision: 1744928
URL:
http://svn.apache.org/viewvc?rev=1744928&view=revLog:
[OFBIZ-7097] RUN MRP is not working properly for multiple facilities. It deletes the 'Proposed' requirements for all facilities and creates only for selected facility. Thanks Ankit Joshi for reporting the issue and providing the patch. Applied fix from trunk r1744925.
Modified:
ofbiz/branches/release13.07/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
Modified: ofbiz/branches/release13.07/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java?rev=1744928&r1=1744927&r2=1744928&view=diff==============================================================================
--- ofbiz/branches/release13.07/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java (original)
+++ ofbiz/branches/release13.07/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java Sat May 21 12:34:45 2016
@@ -96,7 +96,7 @@ public class MrpServices {
listResult = null;
List<GenericValue> listResultRoles = FastList.newInstance();
try {
- listResult = delegator.findByAnd("Requirement", UtilMisc.toMap("requirementTypeId", "PRODUCT_REQUIREMENT", "statusId", "REQ_PROPOSED"), null, false);
+ listResult = delegator.findByAnd("Requirement", UtilMisc.toMap("requirementTypeId", "PRODUCT_REQUIREMENT", "statusId", "REQ_PROPOSED", "facilityId", facilityId), null, false);
} catch (GenericEntityException e) {
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventFindError", locale));
}
@@ -114,7 +114,7 @@ public class MrpServices {
}
listResult = null;
try {
- listResult = delegator.findByAnd("Requirement", UtilMisc.toMap("requirementTypeId", "INTERNAL_REQUIREMENT", "statusId", "REQ_PROPOSED"), null, false);
+ listResult = delegator.findByAnd("Requirement", UtilMisc.toMap("requirementTypeId", "INTERNAL_REQUIREMENT", "statusId", "REQ_PROPOSED", "facilityId", facilityId), null, false);
} catch (GenericEntityException e) {
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventFindError", locale));
}