From 9a822a32857f086fbf8891a521a1bc61c7bcc223 Mon Sep 17 00:00:00 2001 From: vpj-cd Date: Thu, 22 Jan 2009 18:16:14 +0000 Subject: [PATCH] Implementation MRP Notice Action http://sourceforge.net/tracker/?func=detail&atid=879335&aid=2529050&group_id=176962 --- base/src/org/eevolution/model/MPPMRP.java | 8 +- base/src/org/eevolution/process/MRP.java | 382 +++++++++++++---- .../402_FR2529059_FR2529050_ActionNotice.sql | 385 ++++++++++++++++++ .../402_FR2529059_FR2529050_ActionNotice.sql | 385 ++++++++++++++++++ 4 files changed, 1082 insertions(+), 78 deletions(-) create mode 100644 migration/353a-trunk/oracle/402_FR2529059_FR2529050_ActionNotice.sql create mode 100644 migration/353a-trunk/postgresql/402_FR2529059_FR2529050_ActionNotice.sql diff --git a/base/src/org/eevolution/model/MPPMRP.java b/base/src/org/eevolution/model/MPPMRP.java index d1968d006e..12d00532ba 100644 --- a/base/src/org/eevolution/model/MPPMRP.java +++ b/base/src/org/eevolution/model/MPPMRP.java @@ -788,8 +788,7 @@ public class MPPMRP extends X_PP_MRP { return getQtyOrdered(ctx, M_Warehouse_ID, M_Product_ID, new Timestamp (System.currentTimeMillis()), trxName); } - - + /** * Maximum Low Level Code * @param ctx @@ -881,5 +880,10 @@ public class MPPMRP extends X_PP_MRP return (time2.getTime() - time1.getTime()) / (60 * 60 * 1000); } + public static String getDocumentNo(int PP_MRP_ID) + { + return DB.getSQLValueStringEx(null, "SELECT documentNo(PP_MRP_ID) AS DocumentNo FROM PP_MRP WHERE PP_MRP_ID = ?", PP_MRP_ID); + } + } // MPPMRP diff --git a/base/src/org/eevolution/process/MRP.java b/base/src/org/eevolution/process/MRP.java index 6aac0c4d15..4b93c66dab 100644 --- a/base/src/org/eevolution/process/MRP.java +++ b/base/src/org/eevolution/process/MRP.java @@ -24,7 +24,9 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import java.util.ArrayList; +import java.util.Collection; import java.util.List; +import java.util.Properties; import java.util.logging.Level; import org.adempiere.exceptions.AdempiereException; @@ -40,6 +42,7 @@ import org.compiere.model.MProductPO; import org.compiere.model.MRequisition; import org.compiere.model.MRequisitionLine; import org.compiere.model.MResource; +import org.compiere.model.MStorage; import org.compiere.model.MWarehouse; import org.compiere.model.PO; import org.compiere.model.POResultSet; @@ -82,13 +85,12 @@ public class MRP extends SvrProcess private MPPProductPlanning m_product_planning = null; private int Planner_ID = 0; private BigDecimal QtyProjectOnHand = Env.ZERO; - private BigDecimal QtyNetReqs = Env.ZERO; - private BigDecimal QtyPlanned = Env.ZERO; private BigDecimal QtyGrossReqs = Env.ZERO; private BigDecimal QtyScheduledReceipts = Env.ZERO; private Timestamp DatePromisedFrom = null; private Timestamp DatePromisedTo = null; private Timestamp Today = new Timestamp (System.currentTimeMillis()); + private Timestamp TimeFence = null; private Timestamp Planning_Horizon = null; private int count_MO = 0; private int count_MR = 0; @@ -361,6 +363,22 @@ public class MRP extends SvrProcess String OrderType = rs.getString(MPPMRP.COLUMNNAME_OrderType); Timestamp DatePromised = rs.getTimestamp(MPPMRP.COLUMNNAME_DatePromised); Timestamp DateStartSchedule = rs.getTimestamp(MPPMRP.COLUMNNAME_DateStartSchedule); + + //MRP-150 + //Past Due Demand + //Indicates that a demand order is past due. + if(DatePromised.compareTo(Today) < 0) + { + String comment = Msg.translate(getCtx(), MPPOrder.COLUMNNAME_DatePromised) + + ": " + DatePromised; + createMRPNote( + "MRP-150", + AD_Org_ID, + rs.getInt(MPPMRP.COLUMNNAME_PP_MRP_ID), + product, MPPMRP.getDocumentNo(rs.getInt(MPPMRP.COLUMNNAME_PP_MRP_ID)), + rs.getBigDecimal(MPPMRP.COLUMNNAME_Qty), comment + ); + } // if demand is a forecast and this is minor today then is ignore this QtyGrossReq if (MPPMRP.TYPEMRP_Demand.equals(TypeMRP) @@ -382,11 +400,11 @@ public class MRP extends SvrProcess if (MPPProductPlanning.ORDER_POLICY_PeriodOrderQuantity.equals(m_product_planning.getOrder_Policy()) && POQDateStartSchedule.compareTo(Planning_Horizon) < 0) { BeforeDateStartSchedule = POQDateStartSchedule; - calculatePlan(AD_Org_ID,BeforePP_MRP_ID , product, QtyGrossReqs ,BeforeDateStartSchedule); + calculatePlan(AD_Client_ID, AD_Org_ID,M_Warehouse_ID ,BeforePP_MRP_ID , product ,BeforeDateStartSchedule); } else if (MPPProductPlanning.ORDER_POLICY_LoteForLote.equals(m_product_planning.getOrder_Policy()) && BeforeDateStartSchedule.compareTo(Planning_Horizon) <= 0 ) { - calculatePlan(AD_Org_ID,BeforePP_MRP_ID , product, QtyGrossReqs ,BeforeDateStartSchedule ); + calculatePlan(AD_Client_ID, AD_Org_ID,M_Warehouse_ID ,BeforePP_MRP_ID , product ,BeforeDateStartSchedule ); } QtyGrossReqs = Env.ZERO; } @@ -416,12 +434,6 @@ public class MRP extends SvrProcess BeforePP_MRP_ID = rs.getInt(MPPMRP.COLUMNNAME_PP_MRP_ID); - // Create Notice for Demand due - if(DatePromised.compareTo(Today) < 0) - { - createMRPNote("MRP-040", AD_Org_ID, rs.getInt(MPPMRP.COLUMNNAME_PP_MRP_ID), product); - } - if (MPPProductPlanning.ORDER_POLICY_PeriodOrderQuantity.equals(m_product_planning.getOrder_Policy())) { // Verify if is DatePromised < DatePromisedTo then Accumulation QtyGrossReqs @@ -436,7 +448,7 @@ public class MRP extends SvrProcess else { // if not then create new range for next period BeforeDateStartSchedule = POQDateStartSchedule; - calculatePlan(AD_Org_ID,rs.getInt(MPPMRP.COLUMNNAME_PP_MRP_ID),product, QtyGrossReqs ,BeforeDateStartSchedule); + calculatePlan(AD_Client_ID,AD_Org_ID,M_Warehouse_ID,rs.getInt(MPPMRP.COLUMNNAME_PP_MRP_ID),product ,BeforeDateStartSchedule); QtyGrossReqs = rs.getBigDecimal(MPPMRP.COLUMNNAME_Qty); DatePromisedFrom = DatePromised; DatePromisedTo = TimeUtil.addDays(DatePromised, m_product_planning.getOrder_Period().intValue()); @@ -449,7 +461,7 @@ public class MRP extends SvrProcess { QtyGrossReqs = rs.getBigDecimal(MPPMRP.COLUMNNAME_Qty); BeforeDateStartSchedule = rs.getTimestamp(MPPMRP.COLUMNNAME_DatePromised); - calculatePlan(AD_Org_ID,rs.getInt(MPPMRP.COLUMNNAME_PP_MRP_ID),product,QtyGrossReqs,BeforeDateStartSchedule); + calculatePlan(AD_Client_ID, AD_Org_ID,M_Warehouse_ID,rs.getInt(MPPMRP.COLUMNNAME_PP_MRP_ID),product,BeforeDateStartSchedule); continue; } } // end while @@ -461,15 +473,25 @@ public class MRP extends SvrProcess && POQDateStartSchedule.compareTo(Planning_Horizon) < 0) { BeforeDateStartSchedule = POQDateStartSchedule; - calculatePlan(AD_Org_ID,BeforePP_MRP_ID , product, QtyGrossReqs ,BeforeDateStartSchedule); + calculatePlan(AD_Client_ID,AD_Org_ID,M_Warehouse_ID,BeforePP_MRP_ID , product ,BeforeDateStartSchedule); } else if (MPPProductPlanning.ORDER_POLICY_LoteForLote.equals(m_product_planning.getOrder_Policy()) && BeforeDateStartSchedule.compareTo(Planning_Horizon) <= 0 ) { - calculatePlan(AD_Org_ID,BeforePP_MRP_ID , product, QtyGrossReqs ,BeforeDateStartSchedule ); + calculatePlan(AD_Client_ID,AD_Org_ID,M_Warehouse_ID,BeforePP_MRP_ID , product ,BeforeDateStartSchedule ); } } + else + { + //Create Action Notice if exist supply + getNetRequierements( + AD_Client_ID, + AD_Org_ID, + M_Warehouse_ID, + product, + null); + } DB.close(rs, pstmt); } // end for @@ -500,7 +522,7 @@ public class MRP extends SvrProcess DatePromisedTo = null; DatePromisedFrom = null; if (pp != null) - { + { m_product_planning = new MPPProductPlanning(getCtx(), 0 , null); MPPProductPlanning.copyValues(pp, m_product_planning); //Find the BOM to this Product @@ -533,7 +555,7 @@ public class MRP extends SvrProcess else { m_product_planning = null; - createMRPNote("MRP-120", AD_Org_ID, 0, product); + createMRPNote("MRP-120", AD_Org_ID, 0, product, null, null , null); return; } @@ -557,7 +579,7 @@ public class MRP extends SvrProcess } if(C_BPartner_ID <= 0) { - createMRPNote("MRP-130", AD_Org_ID, 0, product); + createMRPNote("MRP-130", AD_Org_ID, 0, product, null, null , null); m_product_planning.setIsCreatePlan(false); } } @@ -567,34 +589,38 @@ public class MRP extends SvrProcess log.info("Error: Do not exist workflow ("+product.getValue()+")"); } } + + if(pp.getTimeFence().signum() > 0) + TimeFence = TimeUtil.addDays(Today, pp.getTimeFence().intValue()); QtyProjectOnHand = MPPMRP.getQtyOnHand(getCtx(), m_product_planning.getM_Warehouse_ID() , m_product_planning.getM_Product_ID(), get_TrxName()); + + if(QtyProjectOnHand.signum() < 0) + { + String comment = Msg.translate(getCtx(), MStorage.COLUMNNAME_QtyOnHand) + + ": " + QtyProjectOnHand; + //MRP-140 + //Beginning Quantity Less Than Zero + //Indicates that the quantity on hand is negative. + createMRPNote("MRP-140", AD_Org_ID, 0, product , null , QtyProjectOnHand , comment); + } + + // Quantity Project On hand 100 + // Safety Stock 150 + // 150 > 100 The Quantity Project On hand is now 50 if(m_product_planning.getSafetyStock().signum() > 0 && m_product_planning.getSafetyStock().compareTo(QtyProjectOnHand) > 0) { + String comment = Msg.translate(getCtx(), MStorage.COLUMNNAME_QtyOnHand) + + ": " + QtyProjectOnHand + + " " + Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_SafetyStock) + + ": " + m_product_planning.getSafetyStock(); + createMRPNote("MRP-001", AD_Org_ID, 0, product , null , QtyProjectOnHand , comment); QtyProjectOnHand = QtyProjectOnHand.subtract(m_product_planning.getSafetyStock()); + } log.info("QtyOnHand :" + QtyProjectOnHand); - - - final String whereClause = "DocStatus = ? AND IsAvailable = ? AND TypeMRP = ?" - + " AND M_Product_ID = ?" - + " AND AD_Client_ID = ? AND AD_Org_ID = ?" - + " AND M_Warehouse_ID = ?"; - Object[] params = new Object[]{ - DocAction.STATUS_Completed, - "Y", // Available - MPPMRP.TYPEMRP_Supply, - m_product_planning.getM_Product_ID(), - AD_Client_ID, AD_Org_ID, - m_product_planning.getM_Warehouse_ID() - }; - QtyScheduledReceipts = DB.getSQLValueBDEx(null, "SELECT COALESCE(SUM(Qty),0) FROM PP_MRP WHERE "+whereClause, params); - DB.executeUpdateEx("UPDATE PP_MRP SET IsAvailable = 'N' WHERE "+whereClause, params, get_TrxName()); - log.info("QtyScheduledReceipts :" + QtyScheduledReceipts); - - //QtyProjectOnHand = QtyProjectOnHand.add(QtyScheduledReceipts); - //QtyScheduledReceipts = Env.ZERO; + } /************************************************************************** @@ -605,10 +631,8 @@ public class MRP extends SvrProcess * @param Qty Qty * @param DemandDateStartSchedule Demand Date Start Schedule */ - private void calculatePlan(int AD_Org_ID, int PP_MPR_ID , MProduct product , BigDecimal Qty, Timestamp DemandDateStartSchedule) + private void calculatePlan(int AD_Client_ID,int AD_Org_ID,int M_Warehouse_ID, int PP_MPR_ID , MProduct M_Product , Timestamp DemandDateStartSchedule) { - if (m_product_planning.isCreatePlan() == false) - return; //Set Yield o QtyGrossReqs // Note : the variables DemandDateStartSchedule , DemandDateFinishSchedule are same DatePromised to Demands Sales Order Type @@ -618,11 +642,18 @@ public class MRP extends SvrProcess BigDecimal DecimalYield = new BigDecimal(m_product_planning.getYield()/100); if (DecimalYield.signum() != 0) QtyGrossReqs = QtyGrossReqs.divide(DecimalYield, 4, BigDecimal.ROUND_HALF_UP); - - QtyNetReqs = ((QtyScheduledReceipts).add(QtyProjectOnHand)).subtract(QtyGrossReqs); + + BigDecimal QtyNetReqs = getNetRequierements( + AD_Client_ID, + AD_Org_ID, + M_Warehouse_ID, + M_Product, + DemandDateStartSchedule); + + BigDecimal QtyPlanned = Env.ZERO; m_product_planning.dump(); - log.info(" Product:" + product.getName()); + log.info(" Product:" + M_Product.getName()); log.info(" Demand Date Start Schedule:" + DemandDateStartSchedule); log.info(" DatePromisedFrom:" + DatePromisedFrom + " DatePromisedTo:" + DatePromisedTo); log.info(" Qty Planned:" + QtyPlanned); @@ -648,20 +679,25 @@ public class MRP extends SvrProcess QtyScheduledReceipts = Env.ZERO; } + // ***** Order Modifier ******** // Check Order Min if(QtyPlanned.signum() > 0 && m_product_planning.getOrder_Min().signum() > 0) { QtyPlanned = QtyPlanned.max(m_product_planning.getOrder_Min()); if (m_product_planning.getOrder_Min().compareTo(QtyPlanned) > 0) { - createMRPNote("MRP-080", AD_Org_ID, PP_MPR_ID, product); + String comment = Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Order_Min) + + ":" + m_product_planning.getOrder_Min(); + createMRPNote("MRP-080", AD_Org_ID, PP_MPR_ID, M_Product , null, QtyPlanned, comment ); } } // Check Order Max if(QtyPlanned.compareTo(m_product_planning.getOrder_Max()) > 0 && m_product_planning.getOrder_Max().signum() > 0) - { - createMRPNote("MRP-090", AD_Org_ID, PP_MPR_ID, product); + { + String comment = Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Order_Max) + + ":" + m_product_planning.getOrder_Max(); + createMRPNote("MRP-090", AD_Org_ID, PP_MPR_ID, M_Product , null , QtyPlanned , comment); } // Check Order Pack if (m_product_planning.getOrder_Pack().signum() > 0 && QtyPlanned.signum() > 0) @@ -673,8 +709,30 @@ public class MRP extends SvrProcess log.info("QtyNetReqs:" + QtyNetReqs); log.info("QtyPlanned:" + QtyPlanned); - log.info("QtyProjectOnHand:" + QtyProjectOnHand); - + log.info("QtyProjectOnHand:" + QtyProjectOnHand); + + //MRP-100 Time Fence Conflict Action Notice + //Indicates that there is an unsatisfied material requirement inside the planning time fence for this product. + //You should either manually schedule and expedite orders to fill this demand or delay fulfillment of the requirement that created the demand. + if(TimeFence != null & DemandDateStartSchedule.compareTo(TimeFence) < 0) + { + String comment = Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_TimeFence) + + ":" + m_product_planning.getTimeFence() + + "-" + + Msg.getMsg(getCtx(), "Date") + + ":" + TimeFence + " " + + Msg.translate(getCtx(), MPPOrder.COLUMNNAME_DatePromised) + + ":" + DemandDateStartSchedule; + createMRPNote("MRP-100", AD_Org_ID, PP_MPR_ID, M_Product , null , QtyPlanned , comment); + + } + + if (m_product_planning.isCreatePlan() == false && QtyPlanned.signum() > 0) + { + createMRPNote("MRP-020", AD_Org_ID, PP_MPR_ID, M_Product , null , QtyPlanned , null); + return; + } + if (QtyPlanned.signum() > 0) { int loops = 1; @@ -687,22 +745,22 @@ public class MRP extends SvrProcess for (int ofq = 1 ; ofq <= loops ; ofq ++ ) { - log.info("Is Purchased: "+ product.isPurchased()+ " Is BOM: " + product.isBOM()); + log.info("Is Purchased: "+ M_Product.isPurchased()+ " Is BOM: " + M_Product.isBOM()); // Distribution Order if(p_IsRequiredDRP && m_product_planning.getDD_NetworkDistribution_ID() > 0) { - createDDOrder(AD_Org_ID, PP_MPR_ID, product, DemandDateStartSchedule); + createDDOrder(AD_Org_ID, PP_MPR_ID, M_Product, QtyPlanned, DemandDateStartSchedule); } // Requisition - else if (product.isPurchased()) // then create M_Requisition + else if (M_Product.isPurchased()) // then create M_Requisition { - createRequisition(AD_Org_ID,PP_MPR_ID, product, DemandDateStartSchedule); + createRequisition(AD_Org_ID,PP_MPR_ID, M_Product, QtyPlanned ,DemandDateStartSchedule); } // Manufacturing Order - else if (product.isBOM()) + else if (M_Product.isBOM()) { - createPPOrder(AD_Org_ID,PP_MPR_ID, product, DemandDateStartSchedule); + createPPOrder(AD_Org_ID,PP_MPR_ID, M_Product,QtyPlanned, DemandDateStartSchedule); } else { @@ -716,8 +774,21 @@ public class MRP extends SvrProcess } } - private void createDDOrder(int AD_Org_ID, int PP_MRP_ID, MProduct product, Timestamp DemandDateStartSchedule) + private void createDDOrder(int AD_Org_ID, int PP_MRP_ID, MProduct product,BigDecimal QtyPlanned ,Timestamp DemandDateStartSchedule) { + //TODO vpj-cd I need to create logic for DRP-040 Shipment Due Action Notice + //Indicates that a shipment for a Order Distribution is due. + // Action should be taken at the source warehouse to ensure that the order is received on time. + + //TODO vpj-cd I need to create logic for DRP-050 Shipment Pas Due Action Notice + //Indicates that a shipment for a Order Distribution is past due. You should either delay the orders created the requirement for the product + //or expedite them when the product does arrive. + + if(m_product_planning.getDD_NetworkDistribution_ID() == 0) + { + //Indicates that the Product Planning Data for this product does not specify a valid network distribution. + createMRPNote("DRP-060", AD_Org_ID, PP_MRP_ID, product , null , null , null); + } MDDNetworkDistribution network = MDDNetworkDistribution.get(getCtx(),m_product_planning.getDD_NetworkDistribution_ID()); MDDNetworkDistributionLine[] network_lines = network.getLines(m_product_planning.getM_Warehouse_ID()); int M_Shipper_ID = 0; @@ -742,21 +813,28 @@ public class MRP extends SvrProcess if (locator == null || locator_to == null) { - createMRPNote("DRP-001", AD_Org_ID, PP_MRP_ID, product); + String comment = Msg.translate(getCtx(), MDDNetworkDistributionLine.COLUMNNAME_M_WarehouseSource_ID) + + ":" + source.getName(); + createMRPNote("DRP-001", AD_Org_ID, PP_MRP_ID, product , null , null , comment); continue; } //get the warehouse in transit MWarehouse[] wsts = MWarehouse.getInTransitForOrg(getCtx(), source.getAD_Org_ID()); if (wsts == null) - { - createMRPNote("DRP-010", AD_Org_ID, PP_MRP_ID, product); + { + + String comment = Msg.translate(getCtx(), MOrg.COLUMNNAME_Name) + + ":" + MOrg.get(getCtx(), AD_Org_ID).getName(); + createMRPNote("DRP-010", AD_Org_ID, PP_MRP_ID, product , null , null , comment); continue; } if(network_line.getM_Shipper_ID()==0) { - createMRPNote("DRP-030", AD_Org_ID, PP_MRP_ID, product); + String comment = Msg.translate(getCtx(), MDDNetworkDistribution.COLUMNNAME_Name) + + ":" + network.getName(); + createMRPNote("DRP-030", AD_Org_ID, PP_MRP_ID, product , null , null , comment); continue; } @@ -768,7 +846,9 @@ public class MRP extends SvrProcess int C_BPartner_ID = org.getLinkedC_BPartner_ID(get_TrxName()); if (C_BPartner_ID == 0) { - createMRPNote("DRP-020", AD_Org_ID, PP_MRP_ID, product); + String comment = Msg.translate(getCtx(), MOrg.COLUMNNAME_Name) + + ":" + MOrg.get(getCtx(), AD_Org_ID).getName(); + createMRPNote("DRP-020", AD_Org_ID, PP_MRP_ID, product, null , null , comment); continue; } @@ -837,7 +917,7 @@ public class MRP extends SvrProcess commit(); } - private void createRequisition(int AD_Org_ID , int PP_MRP_ID, MProduct product, Timestamp DemandDateStartSchedule) + private void createRequisition(int AD_Org_ID , int PP_MRP_ID, MProduct product,BigDecimal QtyPlanned, Timestamp DemandDateStartSchedule) { log.info("Create Requisition"); @@ -886,7 +966,7 @@ public class MRP extends SvrProcess count_MR += 1; } - private void createPPOrder(int AD_Org_ID, int PP_MRP_ID, MProduct product, Timestamp DemandDateStartSchedule) + private void createPPOrder(int AD_Org_ID, int PP_MRP_ID, MProduct product,BigDecimal QtyPlanned,Timestamp DemandDateStartSchedule) { log.info("PP_Product_BOM_ID" + m_product_planning.getPP_Product_BOM_ID() + "AD_Workflow_ID" + m_product_planning.getAD_Workflow_ID()); if (m_product_planning.getPP_Product_BOM_ID() == 0 || m_product_planning.getAD_Workflow_ID() == 0) @@ -953,27 +1033,38 @@ public class MRP extends SvrProcess commit(); } - private void createMRPNote(String code, int AD_Org_ID, int PP_MRP_ID, MProduct product) + private void createMRPNote(String code, int AD_Org_ID, int PP_MRP_ID, MProduct product,String documentNo,BigDecimal qty ,String comment) { + documentNo = documentNo != null ? documentNo : ""; + comment = comment != null ? comment : ""; + qty = qty != null ? qty : Env.ZERO; + MMessage msg = MMessage.get(getCtx(), code); int user_id = 0; if (PP_MRP_ID == 0 && m_product_planning != null) { user_id = m_product_planning.getPlanner_ID(); - } + String message = Msg.getMsg(getCtx(), msg.getValue()); + if (documentNo.length() > 0) + message += " " + Msg.translate(getCtx(), MPPOrder.COLUMNNAME_DocumentNo) +":" + documentNo; + if (qty != null) + message += " " + Msg.translate(getCtx(), "QtyPlan") + ":" + qty; + if (comment.length() > 0) + message += " " + comment; - MNote note = new MNote(getCtx(), - msg.getAD_Message_ID(), - user_id, - MPPMRP.Table_ID, PP_MRP_ID, - product.getValue() + " " + product.getName(), - Msg.getMsg(getCtx(), msg.getValue()), - get_TrxName()); - note.setAD_Org_ID(AD_Org_ID); - note.saveEx(); - commit(); - log.info(code+": "+note.getTextMsg()); - count_Msg += 1; + MNote note = new MNote(getCtx(), + msg.getAD_Message_ID(), + user_id, + MPPMRP.Table_ID, PP_MRP_ID, + product.getValue() + " " + product.getName(), + message, + get_TrxName()); + note.setAD_Org_ID(AD_Org_ID); + note.saveEx(); + commit(); + log.info(code+": "+note.getTextMsg()); + count_Msg += 1; + } } private int getDDOrder_ID(int AD_Org_ID,int M_Warehouse_ID, int M_Shipper_ID,int C_BPartner_ID, Timestamp DatePromised) @@ -1006,5 +1097,144 @@ public class MRP extends SvrProcess } return partner; } + + /** + * return ScheduledReceipts to cover the ProjectQtyOnhand + * @param AD_Client_ID + * @param AD_Org_ID + * @param M_Warehouse_ID + * @param M_Product + * @param ProjectQtyOnhand + * @param DemandDateStartSchedule + * @return + */ + private BigDecimal getNetRequierements( + int AD_Client_ID, + int AD_Org_ID, + int M_Warehouse_ID , + MProduct M_Product, + Timestamp DemandDateStartSchedule) + { + BigDecimal QtyNetReqs = QtyProjectOnHand.subtract(QtyGrossReqs); + String whereClause = " AD_Client_ID = ? AND AD_Org_ID = ?" + + " AND M_Product_ID = ?" + + " AND M_Warehouse_ID = ?" + + " AND DocStatus IN (?,?) AND IsAvailable = ? AND TypeMRP = ?"; + + ArrayList parameters= new ArrayList(); + parameters.add(AD_Client_ID); + parameters.add(AD_Org_ID); + parameters.add(M_Product.get_ID()); + parameters.add(M_Warehouse_ID); + parameters.add(DocAction.STATUS_Completed); + parameters.add(DocAction.STATUS_InProgress); + parameters.add("Y"); + parameters.add(MPPMRP.TYPEMRP_Supply); + + Collection mrps = new Query(getCtx(), MPPMRP.Table_Name, whereClause, get_TrxName()) + .setParameters(parameters) + .list(); + + for (MPPMRP mrp : mrps) + { + QtyScheduledReceipts = QtyScheduledReceipts.add(mrp.getQty()); + //MRP-030 De-Expedite Action Notice + //Indicates that a schedule supply order is due before it is needed and should be delayed, + //or demand rescheduled to an earlier date. + if(QtyNetReqs.negate().signum() > 0 && mrp.getDateStartSchedule().compareTo(DemandDateStartSchedule) < 0 ) + { + String comment = Msg.translate(getCtx(), MPPMRP.COLUMNNAME_DateStartSchedule) + + ":" + mrp.getDateStartSchedule() + + " " + Msg.translate(getCtx(), MPPMRP.COLUMNNAME_DatePromised) + + ":" + DemandDateStartSchedule; + + createMRPNote( + "MRP-030", + AD_Org_ID, + mrp.get_ID(), + M_Product, MPPMRP.getDocumentNo(mrp.get_ID()), + mrp.getQty(), comment + ); + } + + //MRP-040 Expedite Action Notice + //Indicates that a scheduled supply order is due after is needed and should be rescheduled to an earlier date + //or demand rescheduled to a later date. + if(QtyNetReqs.negate().signum() < 0 && mrp.getDateStartSchedule().compareTo(DemandDateStartSchedule) > 0 ) + { + String comment = Msg.translate(getCtx(), MPPMRP.COLUMNNAME_DateStartSchedule) + + ":" + mrp.getDateStartSchedule() + + " " + Msg.translate(getCtx(), MPPMRP.COLUMNNAME_DatePromised) + + ":" + DemandDateStartSchedule; + + createMRPNote( + "MRP-040", + AD_Org_ID, + mrp.get_ID(), + M_Product, MPPMRP.getDocumentNo(mrp.get_ID()), + mrp.getQty(), comment + ); + } + + //TODO vpj-cd I need to create logic for MRP-060 Release Due For Action Notice in time + //Indicate that a supply order should be released. if it is a draft order , it must also be approved. + // if(date release > today && date release + after floating) + + //TODO vpj-cd I need to create logic for MRP-070 Release Past Due For Action Notice overdue + //Indicates that a supply order was not released when it was due, and should be either released + //or expedited now, or the demand rescheduled for a later date. + //if (date release < today && date erelese + before floating) + + + //MRP-110 Past Due Action Notice + //Indicates that a schedule supply order receipt is past due. + if(mrp.getDatePromised().compareTo(Today) < 0 ) + { + String comment = Msg.translate(getCtx(), MPPMRP.COLUMNNAME_DatePromised) + + ":" + mrp.getDatePromised(); + + createMRPNote( + "MRP-110", + AD_Org_ID, + mrp.get_ID(), + M_Product, + MPPMRP.getDocumentNo(mrp.get_ID()), + mrp.getQty(), comment + ); + } + + if(DemandDateStartSchedule != null) + { + if (QtyNetReqs.signum() == 0 ) + { + return QtyNetReqs; + } + } + else + { + //MRP-050 Cancel Action Notice + //Indicate that a scheduled supply order is no longer needed and should be deleted. + if(QtyScheduledReceipts.signum() > 0) + { + String comment = Msg.translate(getCtx(), MPPMRP.COLUMNNAME_DatePromised) + + ":" + mrp.getDatePromised(); + + createMRPNote( + "MRP-050", + AD_Org_ID, + mrp.get_ID(), + M_Product, + MPPMRP.getDocumentNo(mrp.get_ID()), + mrp.getQty(), comment + ); + } + } + mrp.setIsAvailable(false); + mrp.saveEx(); + } + + + return QtyNetReqs; + } } diff --git a/migration/353a-trunk/oracle/402_FR2529059_FR2529050_ActionNotice.sql b/migration/353a-trunk/oracle/402_FR2529059_FR2529050_ActionNotice.sql new file mode 100644 index 0000000000..80558d3e40 --- /dev/null +++ b/migration/353a-trunk/oracle/402_FR2529059_FR2529050_ActionNotice.sql @@ -0,0 +1,385 @@ +-- Jan 21, 2009 11:11:03 AM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that the quantity on hand is less that safety stock',Updated=TO_DATE('2009-01-21 11:11:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53022 +; + +-- Jan 21, 2009 11:11:03 AM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53022 +; + +-- Jan 21, 2009 11:19:44 AM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgText='Beginning Available Less Than Zero',Updated=TO_DATE('2009-01-21 11:19:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53022 +; + +-- Jan 21, 2009 11:19:44 AM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53022 +; + +-- Jan 21, 2009 11:26:29 AM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a supply order should be created to satisfy a negative projected on hand. This message is created if the flag ''Create Plan'' is No or if a new demand appears within the time fence.',Updated=TO_DATE('2009-01-21 11:26:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53011 +; + +-- Jan 21, 2009 11:26:29 AM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53011 +; + +-- Jan 21, 2009 11:26:30 AM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip=NULL,Updated=TO_DATE('2009-01-21 11:26:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53012 +; + +-- Jan 21, 2009 11:26:30 AM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53012 +; + +-- Jan 21, 2009 11:37:33 AM ECT +-- MRP Action Notice +UPDATE AD_Element SET Description='Indicates whether planned orders will be generated by MRP', Help='Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice', Name='Create Plan', PrintName='Create Plan',Updated=TO_DATE('2009-01-21 11:37:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=53258 +; + +-- Jan 21, 2009 11:37:33 AM ECT +-- MRP Action Notice +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53258 +; + +-- Jan 21, 2009 11:37:33 AM ECT +-- MRP Action Notice +UPDATE AD_Column SET ColumnName='IsCreatePlan', Name='Create Plan', Description='Indicates whether planned orders will be generated by MRP', Help='Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice' WHERE AD_Element_ID=53258 +; + +-- Jan 21, 2009 11:37:34 AM ECT +-- MRP Action Notice +UPDATE AD_Process_Para SET ColumnName='IsCreatePlan', Name='Create Plan', Description='Indicates whether planned orders will be generated by MRP', Help='Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice', AD_Element_ID=53258 WHERE UPPER(ColumnName)='ISCREATEPLAN' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Jan 21, 2009 11:37:34 AM ECT +-- MRP Action Notice +UPDATE AD_Process_Para SET ColumnName='IsCreatePlan', Name='Create Plan', Description='Indicates whether planned orders will be generated by MRP', Help='Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice' WHERE AD_Element_ID=53258 AND IsCentrallyMaintained='Y' +; + +-- Jan 21, 2009 11:37:34 AM ECT +-- MRP Action Notice +UPDATE AD_Field SET Name='Create Plan', Description='Indicates whether planned orders will be generated by MRP', Help='Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=53258) AND IsCentrallyMaintained='Y' +; + +-- Jan 21, 2009 11:37:34 AM ECT +-- MRP Action Notice +UPDATE AD_PrintFormatItem pi SET PrintName='Create Plan', Name='Create Plan' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=53258) +; + +-- Jan 21, 2009 12:06:51 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgText='No Data Planning', MsgTip='indicates that there is no data planning for this product',Updated=TO_DATE('2009-01-21 12:06:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53021 +; + +-- Jan 21, 2009 12:06:51 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53021 +; + +-- Jan 21, 2009 12:22:08 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a supply order was created for a quantity less than the minimum quantity set in Data Product Planning',Updated=TO_DATE('2009-01-21 12:22:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53017 +; + +-- Jan 21, 2009 12:22:08 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53017 +; + +-- Jan 21, 2009 12:24:27 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a supply order was created for a quantity less than the minimum quantity set in Product Planning Data',Updated=TO_DATE('2009-01-21 12:24:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53017 +; + +-- Jan 21, 2009 12:24:27 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53017 +; + +-- Jan 21, 2009 12:25:16 PM ECT +-- MRP Action Notice +UPDATE AD_Menu SET Description='Product Planning Data', Name='Product Planning Data',Updated=TO_DATE('2009-01-21 12:25:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53031 +; + +-- Jan 21, 2009 12:25:16 PM ECT +-- MRP Action Notice +UPDATE AD_Menu_Trl SET IsTranslated='N' WHERE AD_Menu_ID=53031 +; + +-- Jan 21, 2009 12:25:28 PM ECT +-- MRP Action Notice +UPDATE AD_Menu SET Description='Product Planning', Name='Product Planning',Updated=TO_DATE('2009-01-21 12:25:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53031 +; + +-- Jan 21, 2009 12:25:28 PM ECT +-- MRP Action Notice +UPDATE AD_Menu_Trl SET IsTranslated='N' WHERE AD_Menu_ID=53031 +; + +-- Jan 21, 2009 12:25:47 PM ECT +-- MRP Action Notice +UPDATE AD_Menu SET Description='Maintain Product Planning Data', Name='Product Planning Data',Updated=TO_DATE('2009-01-21 12:25:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53032 +; + +-- Jan 21, 2009 12:25:47 PM ECT +-- MRP Action Notice +UPDATE AD_Menu_Trl SET IsTranslated='N' WHERE AD_Menu_ID=53032 +; + +-- Jan 21, 2009 12:26:17 PM ECT +-- MRP Action Notice +UPDATE AD_Window SET Description='Maintain Product Planning Data', Help='in the Window Product Planning Data you enter the product information which will serve as a base to execute the algorithms of Material Requirement Planning, along with MPS, open orders and inventories', Name='Product Planning Data',Updated=TO_DATE('2009-01-21 12:26:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=53007 +; + +-- Jan 21, 2009 12:26:17 PM ECT +-- MRP Action Notice +UPDATE AD_Window_Trl SET IsTranslated='N' WHERE AD_Window_ID=53007 +; + +-- Jan 21, 2009 12:33:17 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a supply order was created for a quantity for a quantity greater than than maximum quantity set in the Product Planning Data',Updated=TO_DATE('2009-01-21 12:33:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53018 +; + +-- Jan 21, 2009 12:33:17 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53018 +; + +-- Jan 21, 2009 12:35:18 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgText='Do not exist default Locator for this Warehouse', MsgTip='Do not exist default Locator for this Warehouse',Updated=TO_DATE('2009-01-21 12:35:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53039 +; + +-- Jan 21, 2009 12:35:18 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53039 +; + +-- Jan 21, 2009 1:01:11 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a schedule supply order is due before it is needed and should be delayed, or demand rescheduled to an earlier date.',Updated=TO_DATE('2009-01-21 13:01:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53012 +; + +-- Jan 21, 2009 1:01:11 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53012 +; + +-- Jan 21, 2009 1:05:19 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a scheduled supply order is due after is needed and should be rescheduled to an earlier date, or demand rescheduled to a later date.',Updated=TO_DATE('2009-01-21 13:05:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53013 +; + +-- Jan 21, 2009 1:05:19 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53013 +; + +-- Jan 21, 2009 1:11:40 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a supply order was not released when it was due, and should be either released or expedited now, or the demand rescheduled for a later date.',Updated=TO_DATE('2009-01-21 13:11:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53016 +; + +-- Jan 21, 2009 1:11:40 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53016 +; + +-- Jan 21, 2009 1:12:51 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a supply order was not released when it was due, and should be either released or expedited now, or the demand rescheduled for a later date. ',Updated=TO_DATE('2009-01-21 13:12:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53016 +; + +-- Jan 21, 2009 1:12:51 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53016 +; + +-- Jan 21, 2009 1:13:57 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgText='Time Fence Conflict',Updated=TO_DATE('2009-01-21 13:13:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53019 +; + +-- Jan 21, 2009 1:13:57 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53019 +; + +-- Jan 21, 2009 1:15:03 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgText='Past Due', MsgTip='Indicates that a schedule supply order receipt is past due.',Updated=TO_DATE('2009-01-21 13:15:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53020 +; + +-- Jan 21, 2009 1:15:03 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53020 +; + +-- Jan 21, 2009 1:17:33 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that there is an unsatisfied material requirement inside the planning time fence for this product. You sould either manually schedule and expedite orders to fill this demand or delay fulfillment of the requirement that created the demand.',Updated=TO_DATE('2009-01-21 13:17:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53019 +; + +-- Jan 21, 2009 1:17:33 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53019 +; + +-- Jan 21, 2009 1:19:19 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that there is an unsatisfied material requirement inside the planning time fence for this product. You should either manually schedule and expedite orders to fill this demand or delay fulfillment of the requirement that created the demand.',Updated=TO_DATE('2009-01-21 13:19:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53019 +; + +-- Jan 21, 2009 1:19:19 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53019 +; + +-- Jan 21, 2009 1:26:17 PM ECT +-- MRP Action Notice +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53051,0,TO_DATE('2009-01-21 13:26:01','YYYY-MM-DD HH24:MI:SS'),100,'EE01','Y','Shipment Due','Indicates that a shiment for a Order Distribution is due. Action should be taken at the source warehouse to ensure that the orser is received on time.','I',TO_DATE('2009-01-21 13:26:01','YYYY-MM-DD HH24:MI:SS'),100,'DRP-040') +; + +-- Jan 21, 2009 1:26:17 PM ECT +-- MRP Action Notice +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53051 AND EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Message_ID!=t.AD_Message_ID) +; + +-- Jan 21, 2009 1:28:15 PM ECT +-- MRP Action Notice +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53052,0,TO_DATE('2009-01-21 13:28:14','YYYY-MM-DD HH24:MI:SS'),100,'EE01','Y','Shipment Past Due','Indicates that a shiment for a Order Distribution is past due. You should either dalay the orders created the requirement for the product or expedite them when the product does arrive.','I',TO_DATE('2009-01-21 13:28:14','YYYY-MM-DD HH24:MI:SS'),100,'DRP-050') +; + +-- Jan 21, 2009 1:28:15 PM ECT +-- MRP Action Notice +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53052 AND EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Message_ID!=t.AD_Message_ID) +; + +-- Jan 21, 2009 1:30:26 PM ECT +-- MRP Action Notice +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53053,0,TO_DATE('2009-01-21 13:30:22','YYYY-MM-DD HH24:MI:SS'),100,'EE01','Y','No source of supply','Indicates that the Product Planning Data for this product does not specify a valid network distribution.','I',TO_DATE('2009-01-21 13:30:22','YYYY-MM-DD HH24:MI:SS'),100,'DRP-060') +; + +-- Jan 21, 2009 1:30:26 PM ECT +-- MRP Action Notice +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53053 AND EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Message_ID!=t.AD_Message_ID) +; + +-- Jan 21, 2009 1:36:12 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a shiment for a Order Distribution is due. Action should be taken at the source warehouse to ensure that the order is received on time.',Updated=TO_DATE('2009-01-21 13:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53051 +; + +-- Jan 21, 2009 1:36:12 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53051 +; + +-- Jan 21, 2009 1:36:55 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a shipment for a Order Distribution is due.You should be taken at the source warehouse to ensure that the order is received on time.',Updated=TO_DATE('2009-01-21 13:36:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53051 +; + +-- Jan 21, 2009 1:36:55 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53051 +; + +-- Jan 21, 2009 1:37:58 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a shipment for a Order Distribution is past due. You should either delay the orders created the requirement for the product or expedite them when the product does arrive.',Updated=TO_DATE('2009-01-21 13:37:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53052 +; + +-- Jan 21, 2009 1:37:58 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53052 +; + +-- Jan 21, 2009 1:40:09 PM ECT +-- MRP Action Notice +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53054,0,TO_DATE('2009-01-21 13:40:08','YYYY-MM-DD HH24:MI:SS'),100,'EE01','Y','Beginning Quantity Less Than Zero','Indicates that the quantity on hand is negative.','I',TO_DATE('2009-01-21 13:40:08','YYYY-MM-DD HH24:MI:SS'),100,'MRP-140') +; + +-- Jan 21, 2009 1:40:09 PM ECT +-- MRP Action Notice +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53054 AND EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Message_ID!=t.AD_Message_ID) +; + +-- Jan 21, 2009 1:53:33 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a supply order should be created to satisfy a negative projected on hand. This message is created if the flag ''Create Plan'' is No.',Updated=TO_DATE('2009-01-21 13:53:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53011 +; + +-- Jan 21, 2009 1:53:34 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53011 +; + +-- Jan 21, 2009 2:04:25 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicate tha a supply order should be released.',Updated=TO_DATE('2009-01-21 14:04:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53015 +; + +-- Jan 21, 2009 2:04:25 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53015 +; + +-- Jan 21, 2009 2:05:30 PM ECT +-- MRP Action Notice +UPDATE AD_Message SET MsgTip='Indicate tha a supply order should be released. if it is a draft order , it must also be approved.',Updated=TO_DATE('2009-01-21 14:05:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53015 +; + +-- Jan 21, 2009 2:05:30 PM ECT +-- MRP Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53015 +; + +-- Jan 21, 2009 3:05:45 PM ECT +-- MRP Action Notice +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53055,0,TO_DATE('2009-01-21 15:05:43','YYYY-MM-DD HH24:MI:SS'),100,'EE01','Y','Past Due Demand','Indicates that a demand order is past due.','I',TO_DATE('2009-01-21 15:05:43','YYYY-MM-DD HH24:MI:SS'),100,'MRP-150') +; + +-- Jan 21, 2009 3:05:45 PM ECT +-- MRP Action Notice +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53055 AND EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Message_ID!=t.AD_Message_ID) +; + +-- Jan 21, 2009 7:40:57 PM ECT +-- MRP Info +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53760,0,'QtyGrossReq',TO_DATE('2009-01-21 19:40:48','YYYY-MM-DD HH24:MI:SS'),100,'EE01','Y','Gross Requirements Quantity','Gross Req. Qty',TO_DATE('2009-01-21 19:40:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Jan 21, 2009 7:40:57 PM ECT +-- MRP Info +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53760 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +-- Jan 21, 2009 7:43:10 PM ECT +-- MRP Info +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53761,0,'QtyScheduledReceipts',TO_DATE('2009-01-21 19:43:09','YYYY-MM-DD HH24:MI:SS'),100,'EE01','Y','Scheduled Receipts Quantity','Scheduled Receipts Qty',TO_DATE('2009-01-21 19:43:09','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Jan 21, 2009 7:43:10 PM ECT +-- MRP Info +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53761 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +-- Jan 21, 2009 7:47:08 PM ECT +-- MRP Info +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53762,0,'QtyOnHandProjected',TO_DATE('2009-01-21 19:47:08','YYYY-MM-DD HH24:MI:SS'),100,'On Hand Projected Quantity','EE01','The On Hand Projected Quantity indicates the quantity of a product that is on hand in time line.','Y','On Hand Projected Quantity','On Hand Projected Qty',TO_DATE('2009-01-21 19:47:08','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Jan 21, 2009 7:47:08 PM ECT +-- MRP Info +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53762 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + diff --git a/migration/353a-trunk/postgresql/402_FR2529059_FR2529050_ActionNotice.sql b/migration/353a-trunk/postgresql/402_FR2529059_FR2529050_ActionNotice.sql new file mode 100644 index 0000000000..1281599316 --- /dev/null +++ b/migration/353a-trunk/postgresql/402_FR2529059_FR2529050_ActionNotice.sql @@ -0,0 +1,385 @@ +-- Jan 21, 2009 11:11:03 AM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that the quantity on hand is less that safety stock',Updated=TO_TIMESTAMP('2009-01-21 11:11:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53022 +; + +-- Jan 21, 2009 11:11:03 AM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53022 +; + +-- Jan 21, 2009 11:19:44 AM ECT +-- Action Notice +UPDATE AD_Message SET MsgText='Beginning Available Less Than Zero',Updated=TO_TIMESTAMP('2009-01-21 11:19:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53022 +; + +-- Jan 21, 2009 11:19:44 AM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53022 +; + +-- Jan 21, 2009 11:26:29 AM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a supply order should be created to satisfy a negative projected on hand. This message is created if the flag ''Create Plan'' is No or if a new demand appears within the time fence.',Updated=TO_TIMESTAMP('2009-01-21 11:26:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53011 +; + +-- Jan 21, 2009 11:26:29 AM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53011 +; + +-- Jan 21, 2009 11:26:30 AM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip=NULL,Updated=TO_TIMESTAMP('2009-01-21 11:26:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53012 +; + +-- Jan 21, 2009 11:26:30 AM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53012 +; + +-- Jan 21, 2009 11:37:33 AM ECT +-- Action Notice +UPDATE AD_Element SET Description='Indicates whether planned orders will be generated by MRP', Help='Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice', Name='Create Plan', PrintName='Create Plan',Updated=TO_TIMESTAMP('2009-01-21 11:37:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=53258 +; + +-- Jan 21, 2009 11:37:33 AM ECT +-- Action Notice +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53258 +; + +-- Jan 21, 2009 11:37:33 AM ECT +-- Action Notice +UPDATE AD_Column SET ColumnName='IsCreatePlan', Name='Create Plan', Description='Indicates whether planned orders will be generated by MRP', Help='Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice' WHERE AD_Element_ID=53258 +; + +-- Jan 21, 2009 11:37:34 AM ECT +-- Action Notice +UPDATE AD_Process_Para SET ColumnName='IsCreatePlan', Name='Create Plan', Description='Indicates whether planned orders will be generated by MRP', Help='Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice', AD_Element_ID=53258 WHERE UPPER(ColumnName)='ISCREATEPLAN' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Jan 21, 2009 11:37:34 AM ECT +-- Action Notice +UPDATE AD_Process_Para SET ColumnName='IsCreatePlan', Name='Create Plan', Description='Indicates whether planned orders will be generated by MRP', Help='Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice' WHERE AD_Element_ID=53258 AND IsCentrallyMaintained='Y' +; + +-- Jan 21, 2009 11:37:34 AM ECT +-- Action Notice +UPDATE AD_Field SET Name='Create Plan', Description='Indicates whether planned orders will be generated by MRP', Help='Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=53258) AND IsCentrallyMaintained='Y' +; + +-- Jan 21, 2009 11:37:34 AM ECT +-- Action Notice +UPDATE AD_PrintFormatItem SET PrintName='Create Plan', Name='Create Plan' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=53258) +; + +-- Jan 21, 2009 12:06:51 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgText='No Data Planning', MsgTip='indicates that there is no data planning for this product',Updated=TO_TIMESTAMP('2009-01-21 12:06:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53021 +; + +-- Jan 21, 2009 12:06:51 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53021 +; + +-- Jan 21, 2009 12:22:08 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a supply order was created for a quantity less than the minimum quantity set in Data Product Planning',Updated=TO_TIMESTAMP('2009-01-21 12:22:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53017 +; + +-- Jan 21, 2009 12:22:08 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53017 +; + +-- Jan 21, 2009 12:24:27 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a supply order was created for a quantity less than the minimum quantity set in Product Planning Data',Updated=TO_TIMESTAMP('2009-01-21 12:24:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53017 +; + +-- Jan 21, 2009 12:24:27 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53017 +; + +-- Jan 21, 2009 12:25:16 PM ECT +-- Action Notice +UPDATE AD_Menu SET Description='Product Planning Data', Name='Product Planning Data',Updated=TO_TIMESTAMP('2009-01-21 12:25:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53031 +; + +-- Jan 21, 2009 12:25:16 PM ECT +-- Action Notice +UPDATE AD_Menu_Trl SET IsTranslated='N' WHERE AD_Menu_ID=53031 +; + +-- Jan 21, 2009 12:25:28 PM ECT +-- Action Notice +UPDATE AD_Menu SET Description='Product Planning', Name='Product Planning',Updated=TO_TIMESTAMP('2009-01-21 12:25:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53031 +; + +-- Jan 21, 2009 12:25:28 PM ECT +-- Action Notice +UPDATE AD_Menu_Trl SET IsTranslated='N' WHERE AD_Menu_ID=53031 +; + +-- Jan 21, 2009 12:25:47 PM ECT +-- Action Notice +UPDATE AD_Menu SET Description='Maintain Product Planning Data', Name='Product Planning Data',Updated=TO_TIMESTAMP('2009-01-21 12:25:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=53032 +; + +-- Jan 21, 2009 12:25:47 PM ECT +-- Action Notice +UPDATE AD_Menu_Trl SET IsTranslated='N' WHERE AD_Menu_ID=53032 +; + +-- Jan 21, 2009 12:26:17 PM ECT +-- Action Notice +UPDATE AD_Window SET Description='Maintain Product Planning Data', Help='in the Window Product Planning Data you enter the product information which will serve as a base to execute the algorithms of Material Requirement Planning, along with MPS, open orders and inventories', Name='Product Planning Data',Updated=TO_TIMESTAMP('2009-01-21 12:26:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=53007 +; + +-- Jan 21, 2009 12:26:17 PM ECT +-- Action Notice +UPDATE AD_Window_Trl SET IsTranslated='N' WHERE AD_Window_ID=53007 +; + +-- Jan 21, 2009 12:33:17 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a supply order was created for a quantity for a quantity greater than than maximum quantity set in the Product Planning Data',Updated=TO_TIMESTAMP('2009-01-21 12:33:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53018 +; + +-- Jan 21, 2009 12:33:17 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53018 +; + +-- Jan 21, 2009 12:35:18 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgText='Do not exist default Locator for this Warehouse', MsgTip='Do not exist default Locator for this Warehouse',Updated=TO_TIMESTAMP('2009-01-21 12:35:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53039 +; + +-- Jan 21, 2009 12:35:18 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53039 +; + +-- Jan 21, 2009 1:01:11 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a schedule supply order is due before it is needed and should be delayed, or demand rescheduled to an earlier date.',Updated=TO_TIMESTAMP('2009-01-21 13:01:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53012 +; + +-- Jan 21, 2009 1:01:11 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53012 +; + +-- Jan 21, 2009 1:05:19 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a scheduled supply order is due after is needed and should be rescheduled to an earlier date, or demand rescheduled to a later date.',Updated=TO_TIMESTAMP('2009-01-21 13:05:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53013 +; + +-- Jan 21, 2009 1:05:19 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53013 +; + +-- Jan 21, 2009 1:11:40 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a supply order was not released when it was due, and should be either released or expedited now, or the demand rescheduled for a later date.',Updated=TO_TIMESTAMP('2009-01-21 13:11:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53016 +; + +-- Jan 21, 2009 1:11:40 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53016 +; + +-- Jan 21, 2009 1:12:51 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a supply order was not released when it was due, and should be either released or expedited now, or the demand rescheduled for a later date. ',Updated=TO_TIMESTAMP('2009-01-21 13:12:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53016 +; + +-- Jan 21, 2009 1:12:51 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53016 +; + +-- Jan 21, 2009 1:13:57 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgText='Time Fence Conflict',Updated=TO_TIMESTAMP('2009-01-21 13:13:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53019 +; + +-- Jan 21, 2009 1:13:57 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53019 +; + +-- Jan 21, 2009 1:15:03 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgText='Past Due', MsgTip='Indicates that a schedule supply order receipt is past due.',Updated=TO_TIMESTAMP('2009-01-21 13:15:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53020 +; + +-- Jan 21, 2009 1:15:03 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53020 +; + +-- Jan 21, 2009 1:17:33 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that there is an unsatisfied material requirement inside the planning time fence for this product. You sould either manually schedule and expedite orders to fill this demand or delay fulfillment of the requirement that created the demand.',Updated=TO_TIMESTAMP('2009-01-21 13:17:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53019 +; + +-- Jan 21, 2009 1:17:33 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53019 +; + +-- Jan 21, 2009 1:19:19 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that there is an unsatisfied material requirement inside the planning time fence for this product. You should either manually schedule and expedite orders to fill this demand or delay fulfillment of the requirement that created the demand.',Updated=TO_TIMESTAMP('2009-01-21 13:19:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53019 +; + +-- Jan 21, 2009 1:19:19 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53019 +; + +-- Jan 21, 2009 1:26:17 PM ECT +-- Action Notice +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53051,0,TO_TIMESTAMP('2009-01-21 13:26:01','YYYY-MM-DD HH24:MI:SS'),100,'EE01','Y','Shipment Due','Indicates that a shiment for a Order Distribution is due. Action should be taken at the source warehouse to ensure that the orser is received on time.','I',TO_TIMESTAMP('2009-01-21 13:26:01','YYYY-MM-DD HH24:MI:SS'),100,'DRP-040') +; + +-- Jan 21, 2009 1:26:17 PM ECT +-- Action Notice +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53051 AND EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Message_ID!=t.AD_Message_ID) +; + +-- Jan 21, 2009 1:28:15 PM ECT +-- Action Notice +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53052,0,TO_TIMESTAMP('2009-01-21 13:28:14','YYYY-MM-DD HH24:MI:SS'),100,'EE01','Y','Shipment Past Due','Indicates that a shiment for a Order Distribution is past due. You should either dalay the orders created the requirement for the product or expedite them when the product does arrive.','I',TO_TIMESTAMP('2009-01-21 13:28:14','YYYY-MM-DD HH24:MI:SS'),100,'DRP-050') +; + +-- Jan 21, 2009 1:28:15 PM ECT +-- Action Notice +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53052 AND EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Message_ID!=t.AD_Message_ID) +; + +-- Jan 21, 2009 1:30:26 PM ECT +-- Action Notice +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53053,0,TO_TIMESTAMP('2009-01-21 13:30:22','YYYY-MM-DD HH24:MI:SS'),100,'EE01','Y','No source of supply','Indicates that the Product Planning Data for this product does not specify a valid network distribution.','I',TO_TIMESTAMP('2009-01-21 13:30:22','YYYY-MM-DD HH24:MI:SS'),100,'DRP-060') +; + +-- Jan 21, 2009 1:30:26 PM ECT +-- Action Notice +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53053 AND EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Message_ID!=t.AD_Message_ID) +; + +-- Jan 21, 2009 1:36:12 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a shiment for a Order Distribution is due. Action should be taken at the source warehouse to ensure that the order is received on time.',Updated=TO_TIMESTAMP('2009-01-21 13:36:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53051 +; + +-- Jan 21, 2009 1:36:12 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53051 +; + +-- Jan 21, 2009 1:36:55 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a shipment for a Order Distribution is due.You should be taken at the source warehouse to ensure that the order is received on time.',Updated=TO_TIMESTAMP('2009-01-21 13:36:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53051 +; + +-- Jan 21, 2009 1:36:55 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53051 +; + +-- Jan 21, 2009 1:37:58 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a shipment for a Order Distribution is past due. You should either delay the orders created the requirement for the product or expedite them when the product does arrive.',Updated=TO_TIMESTAMP('2009-01-21 13:37:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53052 +; + +-- Jan 21, 2009 1:37:58 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53052 +; + +-- Jan 21, 2009 1:40:09 PM ECT +-- Action Notice +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53054,0,TO_TIMESTAMP('2009-01-21 13:40:08','YYYY-MM-DD HH24:MI:SS'),100,'EE01','Y','Beginning Quantity Less Than Zero','Indicates that the quantity on hand is negative.','I',TO_TIMESTAMP('2009-01-21 13:40:08','YYYY-MM-DD HH24:MI:SS'),100,'MRP-140') +; + +-- Jan 21, 2009 1:40:09 PM ECT +-- Action Notice +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53054 AND EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Message_ID!=t.AD_Message_ID) +; + +-- Jan 21, 2009 1:53:34 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicates that a supply order should be created to satisfy a negative projected on hand. This message is created if the flag ''Create Plan'' is No.',Updated=TO_TIMESTAMP('2009-01-21 13:53:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53011 +; + +-- Jan 21, 2009 1:53:34 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53011 +; + +-- Jan 21, 2009 2:04:25 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicate tha a supply order should be released.',Updated=TO_TIMESTAMP('2009-01-21 14:04:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53015 +; + +-- Jan 21, 2009 2:04:25 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53015 +; + +-- Jan 21, 2009 2:05:30 PM ECT +-- Action Notice +UPDATE AD_Message SET MsgTip='Indicate tha a supply order should be released. if it is a draft order , it must also be approved.',Updated=TO_TIMESTAMP('2009-01-21 14:05:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53015 +; + +-- Jan 21, 2009 2:05:30 PM ECT +-- Action Notice +UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=53015 +; + +-- Jan 21, 2009 3:05:45 PM ECT +-- Action Notice +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53055,0,TO_TIMESTAMP('2009-01-21 15:05:43','YYYY-MM-DD HH24:MI:SS'),100,'EE01','Y','Past Due Demand','Indicates that a demand order is past due.','I',TO_TIMESTAMP('2009-01-21 15:05:43','YYYY-MM-DD HH24:MI:SS'),100,'MRP-150') +; + +-- Jan 21, 2009 3:05:45 PM ECT +-- Action Notice +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53055 AND EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Message_ID!=t.AD_Message_ID) +; + +-- Jan 21, 2009 7:40:57 PM ECT +-- MRP Info +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53760,0,'QtyGrossReq',TO_TIMESTAMP('2009-01-21 19:40:48','YYYY-MM-DD HH24:MI:SS'),100,'EE01','Y','Gross Requirements Quantity','Gross Req. Qty',TO_TIMESTAMP('2009-01-21 19:40:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Jan 21, 2009 7:40:57 PM ECT +-- MRP Info +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53760 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +-- Jan 21, 2009 7:43:10 PM ECT +-- MRP Info +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53761,0,'QtyScheduledReceipts',TO_TIMESTAMP('2009-01-21 19:43:09','YYYY-MM-DD HH24:MI:SS'),100,'EE01','Y','Scheduled Receipts Quantity','Scheduled Receipts Qty',TO_TIMESTAMP('2009-01-21 19:43:09','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Jan 21, 2009 7:43:10 PM ECT +-- MRP Info +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53761 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +-- Jan 21, 2009 7:47:08 PM ECT +-- MRP Info +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53762,0,'QtyOnHandProjected',TO_TIMESTAMP('2009-01-21 19:47:08','YYYY-MM-DD HH24:MI:SS'),100,'On Hand Projected Quantity','EE01','The On Hand Projected Quantity indicates the quantity of a product that is on hand in time line.','Y','On Hand Projected Quantity','On Hand Projected Qty',TO_TIMESTAMP('2009-01-21 19:47:08','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Jan 21, 2009 7:47:08 PM ECT +-- MRP Info +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53762 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; +