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:
teo_sarca 2009-01-13 13:08:46 +00:00
parent 9227c53c4f
commit 67d8427774
2 changed files with 45 additions and 49 deletions

View File

@ -181,7 +181,9 @@ public class LiberoValidator implements ModelValidator
MInOut inout = (MInOut)po;
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())
.setParameters(new Object[]{inout.getM_InOut_ID()})
.list();
@ -200,10 +202,7 @@ public class LiberoValidator implements ModelValidator
}
}
}
else
{
}
if (po instanceof MInOut && timing == TIMING_AFTER_COMPLETE)
else if (po instanceof MInOut && timing == TIMING_AFTER_COMPLETE)
{
MInOut inout = (MInOut)po;

View File

@ -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());
if (order == null)
{
final String whereClause = MPPProductBOM.COLUMNNAME_BOMType+"=? "
+" OR "+MPPProductBOM.COLUMNNAME_BOMType+"=? "
final String whereClause = MPPProductBOM.COLUMNNAME_BOMType+" IN (?,?)"
+" AND "+MPPProductBOM.COLUMNNAME_BOMUse+"=?"
+" AND "+MPPProductBOM.COLUMNNAME_M_Product_ID+"=?";
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)
{
bom = (MPPProductBOM) pp.getPP_Product_BOM();
if(bom != null && !MPPProductBOM.BOMTYPE_Make_To_Order.equals(bom.getBOMType()))
{
bom = null;
}
if(bom != null && !MPPProductBOM.BOMTYPE_Make_To_Kit.equals(bom.getBOMType()))
if( bom != null
&& !MPPProductBOM.BOMTYPE_Make_To_Order.equals(bom.getBOMType())
&& !MPPProductBOM.BOMTYPE_Make_To_Kit.equals(bom.getBOMType()) )
{
bom = null;
}