MPPMRP:
* getDays(...) always return 0 : casting issue * SQL query parametrization
This commit is contained in:
parent
8c3b57ab2c
commit
aab5cf0ec4
|
@ -262,13 +262,11 @@ public class MPPMRP extends X_PP_MRP
|
||||||
.first();
|
.first();
|
||||||
if (order == null)
|
if (order == null)
|
||||||
{
|
{
|
||||||
String where = MPPProductBOM.COLUMNNAME_BOMType + "='" +
|
String where = MPPProductBOM.COLUMNNAME_BOMType+"=?"
|
||||||
MPPProductBOM.BOMTYPE_Make_To_Order + "' AND "+
|
+" AND "+MPPProductBOM.COLUMNNAME_M_Product_ID+"=?";
|
||||||
MPPProductBOM.COLUMNNAME_M_Product_ID + "=?";
|
|
||||||
MPPProductBOM bom = new Query(ctx, MPPProductBOM.Table_Name, where, trxName)
|
MPPProductBOM bom = new Query(ctx, MPPProductBOM.Table_Name, where, trxName)
|
||||||
.setParameters(new Object[]{ol.getM_Product_ID()})
|
.setParameters(new Object[]{MPPProductBOM.BOMTYPE_Make_To_Order, ol.getM_Product_ID()})
|
||||||
.first();
|
.first();
|
||||||
|
|
||||||
if (bom != null)
|
if (bom != null)
|
||||||
{
|
{
|
||||||
MProduct product = MProduct.get(ctx,ol.getM_Product_ID());
|
MProduct product = MProduct.get(ctx,ol.getM_Product_ID());
|
||||||
|
@ -726,7 +724,7 @@ public class MPPMRP extends X_PP_MRP
|
||||||
+ wf.getWaitingTime()
|
+ wf.getWaitingTime()
|
||||||
+ wf.getMovingTime()
|
+ wf.getMovingTime()
|
||||||
)
|
)
|
||||||
* ( wf.getDurationBaseSec() / 60 / 60 ) // convert to hours
|
* ( (double)wf.getDurationBaseSec() / 60 / 60 ) // convert to hours
|
||||||
);
|
);
|
||||||
// TODO: implement here, Victor's suggestion - https://sourceforge.net/forum/message.php?msg_id=5179460
|
// TODO: implement here, Victor's suggestion - https://sourceforge.net/forum/message.php?msg_id=5179460
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue