Libero QA:
LiberoValidator - fix intendation MPPMRP.C_OrderLine - fix SQL boolean logic; Victor, please ALWAYS use brackets when write boolean logic
This commit is contained in:
parent
9227c53c4f
commit
67d8427774
|
|
@ -181,7 +181,9 @@ public class LiberoValidator implements ModelValidator
|
||||||
MInOut inout = (MInOut)po;
|
MInOut inout = (MInOut)po;
|
||||||
if(inout.isSOTrx())
|
if(inout.isSOTrx())
|
||||||
{
|
{
|
||||||
final String whereClause = "C_OrderLine_ID IS NOT NULL AND EXISTS ( SELECT 1 FROM C_OrderLine ol , M_InOutLine iol WHERE ol.C_OrderLine_ID=iol.C_OrderLine_ID AND iol.M_InOut_ID=? )";
|
final String whereClause = "C_OrderLine_ID IS NOT NULL"
|
||||||
|
+" AND EXISTS (SELECT 1 FROM C_OrderLine ol , M_InOutLine iol"
|
||||||
|
+" WHERE ol.C_OrderLine_ID=iol.C_OrderLine_ID AND iol.M_InOut_ID=? )";
|
||||||
Collection<MPPOrder> orders = new Query(po.getCtx(), MPPOrder.Table_Name, whereClause, po.get_TrxName())
|
Collection<MPPOrder> orders = new Query(po.getCtx(), MPPOrder.Table_Name, whereClause, po.get_TrxName())
|
||||||
.setParameters(new Object[]{inout.getM_InOut_ID()})
|
.setParameters(new Object[]{inout.getM_InOut_ID()})
|
||||||
.list();
|
.list();
|
||||||
|
|
@ -200,10 +202,7 @@ public class LiberoValidator implements ModelValidator
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (po instanceof MInOut && timing == TIMING_AFTER_COMPLETE)
|
||||||
{
|
|
||||||
}
|
|
||||||
if (po instanceof MInOut && timing == TIMING_AFTER_COMPLETE)
|
|
||||||
{
|
{
|
||||||
MInOut inout = (MInOut)po;
|
MInOut inout = (MInOut)po;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -369,8 +369,7 @@ public class MPPMRP extends X_PP_MRP
|
||||||
MPPOrder order = MPPOrder.forC_OrderLine_ID(ol.getCtx(), ol.get_ID(), ol.get_TrxName());
|
MPPOrder order = MPPOrder.forC_OrderLine_ID(ol.getCtx(), ol.get_ID(), ol.get_TrxName());
|
||||||
if (order == null)
|
if (order == null)
|
||||||
{
|
{
|
||||||
final String whereClause = MPPProductBOM.COLUMNNAME_BOMType+"=? "
|
final String whereClause = MPPProductBOM.COLUMNNAME_BOMType+" IN (?,?)"
|
||||||
+" OR "+MPPProductBOM.COLUMNNAME_BOMType+"=? "
|
|
||||||
+" AND "+MPPProductBOM.COLUMNNAME_BOMUse+"=?"
|
+" AND "+MPPProductBOM.COLUMNNAME_BOMUse+"=?"
|
||||||
+" AND "+MPPProductBOM.COLUMNNAME_M_Product_ID+"=?";
|
+" AND "+MPPProductBOM.COLUMNNAME_M_Product_ID+"=?";
|
||||||
MPPProductBOM bom = new Query(ol.getCtx(), MPPProductBOM.Table_Name, whereClause, null)
|
MPPProductBOM bom = new Query(ol.getCtx(), MPPProductBOM.Table_Name, whereClause, null)
|
||||||
|
|
@ -389,11 +388,9 @@ public class MPPMRP extends X_PP_MRP
|
||||||
if(pp != null)
|
if(pp != null)
|
||||||
{
|
{
|
||||||
bom = (MPPProductBOM) pp.getPP_Product_BOM();
|
bom = (MPPProductBOM) pp.getPP_Product_BOM();
|
||||||
if(bom != null && !MPPProductBOM.BOMTYPE_Make_To_Order.equals(bom.getBOMType()))
|
if( bom != null
|
||||||
{
|
&& !MPPProductBOM.BOMTYPE_Make_To_Order.equals(bom.getBOMType())
|
||||||
bom = null;
|
&& !MPPProductBOM.BOMTYPE_Make_To_Kit.equals(bom.getBOMType()) )
|
||||||
}
|
|
||||||
if(bom != null && !MPPProductBOM.BOMTYPE_Make_To_Kit.equals(bom.getBOMType()))
|
|
||||||
{
|
{
|
||||||
bom = null;
|
bom = null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue