[ 2038848 ] Product Planning window - can't save if Fixed Order Qty

http://sourceforge.net/tracker/?func=detail&atid=879332&aid=2038848&group_id=176962
This commit is contained in:
vpj-cd 2008-08-05 15:58:30 +00:00
parent f08c12093b
commit d8dfc605e6
3 changed files with 59 additions and 59 deletions

View File

@ -242,15 +242,6 @@ public interface I_PP_Product_Planning
/** Get Order Qty */
public BigDecimal getOrder_Qty();
/** Column name Planner_ID */
public static final String COLUMNNAME_Planner_ID = "Planner_ID";
/** Set Planner */
public void setPlanner_ID (int Planner_ID);
/** Get Planner */
public int getPlanner_ID();
/** Column name PP_Product_BOM_ID */
public static final String COLUMNNAME_PP_Product_BOM_ID = "PP_Product_BOM_ID";
@ -275,18 +266,14 @@ public interface I_PP_Product_Planning
/** Get PP_Product_Planning_ID */
public int getPP_Product_Planning_ID();
/** Column name SafetyStock */
public static final String COLUMNNAME_SafetyStock = "SafetyStock";
/** Column name Planner_ID */
public static final String COLUMNNAME_Planner_ID = "Planner_ID";
/** Set Safety Stock Qty.
* Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs
*/
public void setSafetyStock (BigDecimal SafetyStock);
/** Set Planner */
public void setPlanner_ID (int Planner_ID);
/** Get Safety Stock Qty.
* Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs
*/
public BigDecimal getSafetyStock();
/** Get Planner */
public int getPlanner_ID();
/** Column name S_Resource_ID */
public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID";
@ -303,6 +290,19 @@ public interface I_PP_Product_Planning
public I_S_Resource getS_Resource() throws Exception;
/** Column name SafetyStock */
public static final String COLUMNNAME_SafetyStock = "SafetyStock";
/** Set Safety Stock Qty.
* Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs
*/
public void setSafetyStock (BigDecimal SafetyStock);
/** Get Safety Stock Qty.
* Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs
*/
public BigDecimal getSafetyStock();
/** Column name TimeFence */
public static final String COLUMNNAME_TimeFence = "TimeFence";

View File

@ -458,8 +458,8 @@ public class X_PP_Product_Planning extends PO implements I_PP_Product_Planning,
/** Order_Policy AD_Reference_ID=53228 */
public static final int ORDER_POLICY_AD_Reference_ID=53228;
/** Order Fixed Quantity = FQ */
public static final String ORDER_POLICY_OrderFixedQuantity = "FQ";
/** Fixed Order Quantity = FOQ */
public static final String ORDER_POLICY_FixedOrderQuantity = "FOQ";
/** Lote For Lote = LFL */
public static final String ORDER_POLICY_LoteForLote = "LFL";
/** Period Order Quantity = POQ */
@ -469,7 +469,7 @@ public class X_PP_Product_Planning extends PO implements I_PP_Product_Planning,
public void setOrder_Policy (String Order_Policy)
{
if (Order_Policy == null || Order_Policy.equals("FQ") || Order_Policy.equals("LFL") || Order_Policy.equals("POQ")); else throw new IllegalArgumentException ("Order_Policy Invalid value - " + Order_Policy + " - Reference_ID=53228 - FQ - LFL - POQ"); set_Value (COLUMNNAME_Order_Policy, Order_Policy);
if (Order_Policy == null || Order_Policy.equals("FOQ") || Order_Policy.equals("LFL") || Order_Policy.equals("POQ")); else throw new IllegalArgumentException ("Order_Policy Invalid value - " + Order_Policy + " - Reference_ID=53228 - FOQ - LFL - POQ"); set_Value (COLUMNNAME_Order_Policy, Order_Policy);
}
/** Get Order Policy.
@ -496,28 +496,6 @@ public class X_PP_Product_Planning extends PO implements I_PP_Product_Planning,
return bd;
}
/** Planner_ID AD_Reference_ID=110 */
public static final int PLANNER_ID_AD_Reference_ID=110;
/** Set Planner.
@param Planner_ID Planner */
public void setPlanner_ID (int Planner_ID)
{
if (Planner_ID < 1)
set_Value (COLUMNNAME_Planner_ID, null);
else
set_Value (COLUMNNAME_Planner_ID, Integer.valueOf(Planner_ID));
}
/** Get Planner.
@return Planner */
public int getPlanner_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Planner_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws Exception
{
Class<?> clazz = MTable.getClass(org.eevolution.model.I_PP_Product_BOM.Table_Name);
@ -576,24 +554,26 @@ public class X_PP_Product_Planning extends PO implements I_PP_Product_Planning,
return ii.intValue();
}
/** Set Safety Stock Qty.
@param SafetyStock
Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs
*/
public void setSafetyStock (BigDecimal SafetyStock)
/** Planner_ID AD_Reference_ID=110 */
public static final int PLANNER_ID_AD_Reference_ID=110;
/** Set Planner.
@param Planner_ID Planner */
public void setPlanner_ID (int Planner_ID)
{
set_Value (COLUMNNAME_SafetyStock, SafetyStock);
if (Planner_ID < 1)
set_Value (COLUMNNAME_Planner_ID, null);
else
set_Value (COLUMNNAME_Planner_ID, Integer.valueOf(Planner_ID));
}
/** Get Safety Stock Qty.
@return Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs
*/
public BigDecimal getSafetyStock ()
/** Get Planner.
@return Planner */
public int getPlanner_ID ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_SafetyStock);
if (bd == null)
return Env.ZERO;
return bd;
Integer ii = (Integer)get_Value(COLUMNNAME_Planner_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_S_Resource getS_Resource() throws Exception
@ -635,6 +615,26 @@ public class X_PP_Product_Planning extends PO implements I_PP_Product_Planning,
return ii.intValue();
}
/** Set Safety Stock Qty.
@param SafetyStock
Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs
*/
public void setSafetyStock (BigDecimal SafetyStock)
{
set_Value (COLUMNNAME_SafetyStock, SafetyStock);
}
/** Get Safety Stock Qty.
@return Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs
*/
public BigDecimal getSafetyStock ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_SafetyStock);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Time Fence.
@param TimeFence Time Fence */
public void setTimeFence (BigDecimal TimeFence)

View File

@ -694,7 +694,7 @@ public class MRP extends SvrProcess
int loops = 1;
if (m_product_planning.getOrder_Policy().equals(MPPProductPlanning.ORDER_POLICY_OrderFixedQuantity))
if (m_product_planning.getOrder_Policy().equals(MPPProductPlanning.ORDER_POLICY_FixedOrderQuantity))
{
if (m_product_planning.getOrder_Qty().compareTo(Env.ZERO) != 0)
loops = (QtyPlanned.divide(m_product_planning.getOrder_Qty() , 0 , BigDecimal.ROUND_UP)).intValue();