You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/03/30 11:49:38 UTC

svn commit: r524013 - /ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java

Author: jacopoc
Date: Fri Mar 30 02:49:37 2007
New Revision: 524013

URL: http://svn.apache.org/viewvc?view=rev&rev=524013
Log:
Improved mrp log with start dates of generated requirements.

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?view=diff&rev=524013&r1=524012&r2=524013
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java Fri Mar 30 02:49:37 2007
@@ -712,12 +712,15 @@
                         if (UtilValidate.isEmpty(productFacility) && !isBuilt) {
                             logMrpError(productId, now, "No ProductFacility record for [" + facilityId + "]; no requirement created.", delegator);
                         }
-                        
+                        String eventName = null;
+                        if (UtilValidate.isNotEmpty(requirementId)) {
+                            eventName = "*" + requirementId + " (" + proposedOrder.getRequirementStartDate() + ")*";
+                        }
                         Map eventMap = UtilMisc.toMap("productId", product.getString("productId"),
                                                       "eventDate", eventDate,
                                                       "inventoryEventPlanTypeId", (isBuilt? "PROP_MANUF_O_RECP" : "PROP_PUR_O_RECP"));
                         try {
-                            InventoryEventPlannedServices.createOrUpdateInventoryEventPlanned(eventMap, new Double(proposedOrder.getQuantity()), null, (requirementId != null? "*" + requirementId + "*": null), (proposedOrder.getRequirementStartDate().compareTo(now) > 0), delegator);
+                            InventoryEventPlannedServices.createOrUpdateInventoryEventPlanned(eventMap, new Double(proposedOrder.getQuantity()), null, eventName, (proposedOrder.getRequirementStartDate().compareTo(now) > 0), delegator);
                         } catch (GenericEntityException e) {
                             return ServiceUtil.returnError("Problem running createOrUpdateInventoryEventPlanned");
                         }