Refactory and Improve in write code
This commit is contained in:
parent
1d9d823ec0
commit
7172287be8
File diff suppressed because it is too large
Load Diff
|
@ -335,7 +335,7 @@ public class MRP extends SvrProcess
|
||||||
|
|
||||||
//String Order_Policy = MPPProductPlanning.ORDER_POLICY_LoteForLote;
|
//String Order_Policy = MPPProductPlanning.ORDER_POLICY_LoteForLote;
|
||||||
|
|
||||||
int lowlevel = MPPMRP.getMaxLowLevel(getCtx());
|
int lowlevel = MPPMRP.getMaxLowLevel(getCtx(), get_TrxName());
|
||||||
int Level = lowlevel;
|
int Level = lowlevel;
|
||||||
log.info("Low Level Is :"+lowlevel);
|
log.info("Low Level Is :"+lowlevel);
|
||||||
// Calculate MRP for all levels
|
// Calculate MRP for all levels
|
||||||
|
@ -569,7 +569,7 @@ public class MRP extends SvrProcess
|
||||||
|
|
||||||
|
|
||||||
//QtyOnHand = getOnHand(M_Product_ID);
|
//QtyOnHand = getOnHand(M_Product_ID);
|
||||||
QtyProjectOnHand = MPPMRP.getOnHand(AD_Client_ID , m_product_planning.getM_Warehouse_ID() , m_product_planning.getM_Product_ID());
|
QtyProjectOnHand = MPPMRP.getQtyOnHand(AD_Client_ID , m_product_planning.getM_Warehouse_ID() , m_product_planning.getM_Product_ID(), get_TrxName());
|
||||||
if(QtyProjectOnHand == null)
|
if(QtyProjectOnHand == null)
|
||||||
QtyProjectOnHand = Env.ZERO;
|
QtyProjectOnHand = Env.ZERO;
|
||||||
|
|
||||||
|
@ -933,7 +933,7 @@ public class MRP extends SvrProcess
|
||||||
order.setDatePromised(DemandDateStartSchedule);
|
order.setDatePromised(DemandDateStartSchedule);
|
||||||
|
|
||||||
if (m_product_planning.getDeliveryTime_Promised().compareTo(Env.ZERO) == 0)
|
if (m_product_planning.getDeliveryTime_Promised().compareTo(Env.ZERO) == 0)
|
||||||
order.setDateStartSchedule(TimeUtil.addDays(DemandDateStartSchedule, (MPPMRP.getDays(order.getS_Resource_ID(),order.getAD_Workflow_ID(), QtyPlanned).add(m_product_planning.getTransfertTime())).negate().intValue()));
|
order.setDateStartSchedule(TimeUtil.addDays(DemandDateStartSchedule, (MPPMRP.getDays(order.getCtx(),order.getS_Resource_ID(),order.getAD_Workflow_ID(), QtyPlanned,order.get_TrxName()).add(m_product_planning.getTransfertTime())).negate().intValue()));
|
||||||
else
|
else
|
||||||
order.setDateStartSchedule(TimeUtil.addDays(DemandDateStartSchedule, (m_product_planning.getDeliveryTime_Promised().add(m_product_planning.getTransfertTime())).negate().intValue()));
|
order.setDateStartSchedule(TimeUtil.addDays(DemandDateStartSchedule, (m_product_planning.getDeliveryTime_Promised().add(m_product_planning.getTransfertTime())).negate().intValue()));
|
||||||
order.setDateFinishSchedule(DemandDateStartSchedule);
|
order.setDateFinishSchedule(DemandDateStartSchedule);
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class RollupBillOfMaterial extends SvrProcess
|
||||||
protected String doIt() throws Exception
|
protected String doIt() throws Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
int lowlevel = MPPMRP.getMaxLowLevel(getCtx());
|
int lowlevel = MPPMRP.getMaxLowLevel(getCtx(), get_TrxName());
|
||||||
// Calculate Rollup for all levels
|
// Calculate Rollup for all levels
|
||||||
for (int index = lowlevel ; index >= 0 ; index--)
|
for (int index = lowlevel ; index >= 0 ; index--)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue