Fix refactory

This commit is contained in:
vpj-cd 2008-08-07 17:48:00 +00:00
parent c19dc4cd23
commit e01ca930d2
2 changed files with 12 additions and 7 deletions

View File

@ -15,8 +15,10 @@
*****************************************************************************/
package org.eevolution.model;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.MOrgInfo;
import org.compiere.model.MResource;
@ -126,8 +128,8 @@ public class MPPProductPlanning extends X_PP_Product_Planning
* @param M_Product_ID Product ID
* @param trxName Transaction Name
* @return MPPProductPlanning Planning Data
*
public static MPPProductPlanning getFirst(Properties ctx ,int AD_Client_ID, int AD_Org_ID ,int M_Warehouse_ID, int S_Resource_ID, int M_Product_ID, String trxName)
**/
public static MPPProductPlanning find(Properties ctx ,int AD_Client_ID, int AD_Org_ID ,int M_Warehouse_ID, int S_Resource_ID, int M_Product_ID, String trxName)
{
MPPProductPlanning pp = null;
PreparedStatement pstmt = null;
@ -197,7 +199,7 @@ public class MPPProductPlanning extends X_PP_Product_Planning
}
return null;
}
*/
/**************************************************************************
* find planning data demand & supply to this warehouse

View File

@ -385,6 +385,10 @@ public class MRP extends SvrProcess
//Define m_product_planning
setProduct(AD_Client_ID,AD_Org_ID ,S_Resource_ID , M_Warehouse_ID, product);
if (m_product_planning==null)
continue;
//first DatePromised.compareTo for ORDER_POLICY_PeriodOrderQuantity
if (m_product_planning.getOrder_Policy().equals(MPPProductPlanning.ORDER_POLICY_PeriodOrderQuantity))
@ -482,7 +486,7 @@ public class MRP extends SvrProcess
{
//find data product planning demand
MPPProductPlanning pp = MPPProductPlanning.get(getCtx(), AD_Client_ID ,AD_Org_ID , M_Warehouse_ID, S_Resource_ID , product.getM_Product_ID(), get_TrxName());
MPPProductPlanning pp = MPPProductPlanning.find(getCtx(), AD_Client_ID ,AD_Org_ID , M_Warehouse_ID, S_Resource_ID , product.getM_Product_ID(), get_TrxName());
DatePromisedTo = null;
DatePromisedFrom = null;
if (pp != null)
@ -526,9 +530,8 @@ public class MRP extends SvrProcess
MMessage MRP=MMessage.get(getCtx(), "MRP-120");
MNote note = new MNote (getCtx(), MRP.getAD_Message_ID() , 0 , MPPMRP.Table_ID , 0 , product.getValue() + " " + product.getName() , Msg.getMsg(getCtx(), MRP.getValue()),get_TrxName());
note.save();
log.severe(Msg.getMsg(getCtx(), MRP.getValue()));
m_product_planning.setIsCreatePlan(false);
//log.severe(Msg.getMsg(getCtx(), MRP.getValue()));
return;
}