IDEMPIERE-4723 - Clean up MMatch*/MMeasure*/MMenu/MMovement*/ModelVal* classes code (#645)
This commit is contained in:
parent
6dd950a577
commit
9742c0dbc9
|
@ -151,12 +151,7 @@ public class MMatchInv extends X_M_MatchInv
|
|||
super (ctx, M_MatchInv_ID, trxName);
|
||||
if (M_MatchInv_ID == 0)
|
||||
{
|
||||
// setDateTrx (new Timestamp(System.currentTimeMillis()));
|
||||
// setC_InvoiceLine_ID (0);
|
||||
// setM_InOutLine_ID (0);
|
||||
// setM_Product_ID (0);
|
||||
setM_AttributeSetInstance_ID(0);
|
||||
// setQty (Env.ZERO);
|
||||
setPosted (false);
|
||||
setProcessed (false);
|
||||
setProcessing (false);
|
||||
|
|
|
@ -765,12 +765,7 @@ public class MMatchPO extends X_M_MatchPO
|
|||
super (ctx, M_MatchPO_ID, trxName);
|
||||
if (M_MatchPO_ID == 0)
|
||||
{
|
||||
// setC_OrderLine_ID (0);
|
||||
// setDateTrx (new Timestamp(System.currentTimeMillis()));
|
||||
// setM_InOutLine_ID (0);
|
||||
// setM_Product_ID (0);
|
||||
setM_AttributeSetInstance_ID(0);
|
||||
// setQty (Env.ZERO);
|
||||
setPosted (false);
|
||||
setProcessed (false);
|
||||
setProcessing (false);
|
||||
|
|
|
@ -211,7 +211,6 @@ public class MMeasure extends X_PA_Measure implements ImmutablePOSupport
|
|||
trunc = "MM";
|
||||
else if (MGoal.MEASUREDISPLAY_Week.equals(MeasureDisplay))
|
||||
trunc = "W";
|
||||
// else if (MGoal.MEASUREDISPLAY_Day.equals(MeasureDisplay))
|
||||
// trunc = "D";
|
||||
trunc = "TRUNC(DateDoc,'" + trunc + "')";
|
||||
StringBuilder sql = new StringBuilder ("SELECT SUM(ManualActual), ")
|
||||
|
|
|
@ -163,8 +163,7 @@ public class MMeasureCalc extends X_PA_MeasureCalc implements ImmutablePOSupport
|
|||
trunc = "MM";
|
||||
else if (MGoal.MEASUREDISPLAY_Week.equals(MeasureScope))
|
||||
trunc = "D";
|
||||
// else if (MGoal.MEASUREDISPLAY_Day.equals(MeasureDisplay))
|
||||
// ;
|
||||
|
||||
sb.append(" AND TRUNC(")
|
||||
.append(getDateColumn()).append(",'").append(trunc).append("')=TRUNC(")
|
||||
.append(DB.TO_DATE(reportDate)).append(",'").append(trunc).append("')");
|
||||
|
@ -203,8 +202,7 @@ public class MMeasureCalc extends X_PA_MeasureCalc implements ImmutablePOSupport
|
|||
trunc = "MM";
|
||||
else if (MGoal.MEASUREDISPLAY_Week.equals(MeasureDisplay))
|
||||
trunc = "W";
|
||||
// else if (MGoal.MEASUREDISPLAY_Day.equals(MeasureDisplay))
|
||||
// ;
|
||||
|
||||
dateCol = "TRUNC(" + getDateColumn() + ",'" + trunc + "') ";
|
||||
groupBy = dateCol;
|
||||
}
|
||||
|
@ -277,8 +275,7 @@ public class MMeasureCalc extends X_PA_MeasureCalc implements ImmutablePOSupport
|
|||
trunc = "MM";
|
||||
else if (MGoal.MEASUREDISPLAY_Week.equals(MeasureDisplay))
|
||||
trunc = "W";
|
||||
// else if (MGoal.MEASUREDISPLAY_Day.equals(MeasureDisplay))
|
||||
// trunc = "D";
|
||||
|
||||
sql.append(" AND TRUNC(").append(getDateColumn()).append(",'").append(trunc)
|
||||
.append("')=TRUNC(").append(DB.TO_DATE(date)).append(",'").append(trunc).append("')");
|
||||
}
|
||||
|
|
|
@ -146,7 +146,6 @@ public class MMenu extends X_AD_Menu implements ImmutablePOSupport
|
|||
setIsReadOnly (false); // N
|
||||
setIsSOTrx (false);
|
||||
setIsSummary (false);
|
||||
// setName (null);
|
||||
}
|
||||
} // MMenu
|
||||
|
||||
|
|
|
@ -67,7 +67,6 @@ public class MMovement extends X_M_Movement implements DocAction
|
|||
super (ctx, M_Movement_ID, trxName);
|
||||
if (M_Movement_ID == 0)
|
||||
{
|
||||
// setC_DocType_ID (0);
|
||||
setDocAction (DOCACTION_Complete); // CO
|
||||
setDocStatus (DOCSTATUS_Drafted); // DR
|
||||
setIsApproved (false);
|
||||
|
@ -183,10 +182,7 @@ public class MMovement extends X_M_Movement implements DocAction
|
|||
*/
|
||||
public File createPDF (File file)
|
||||
{
|
||||
// ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.INVOICE, getC_Invoice_ID());
|
||||
// if (re == null)
|
||||
return null;
|
||||
// return re.getPDF(file);
|
||||
return null;
|
||||
} // createPDF
|
||||
|
||||
|
||||
|
@ -352,7 +348,6 @@ public class MMovement extends X_M_Movement implements DocAction
|
|||
if (confirmations.length > 0)
|
||||
return;
|
||||
|
||||
// Create Confirmation
|
||||
MMovementConfirm.create (this, false);
|
||||
} // createConfirmation
|
||||
|
||||
|
@ -1014,8 +1009,6 @@ public class MMovement extends X_M_Movement implements DocAction
|
|||
*/
|
||||
public int getC_Currency_ID()
|
||||
{
|
||||
// MPriceList pl = MPriceList.get(getCtx(), getM_PriceList_ID());
|
||||
// return pl.getC_Currency_ID();
|
||||
return 0;
|
||||
} // getC_Currency_ID
|
||||
|
||||
|
|
|
@ -96,7 +96,6 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
|
|||
super (ctx, M_MovementConfirm_ID, trxName);
|
||||
if (M_MovementConfirm_ID == 0)
|
||||
{
|
||||
// setM_Movement_ID (0);
|
||||
setDocAction (DOCACTION_Complete);
|
||||
setDocStatus (DOCSTATUS_Drafted);
|
||||
setIsApproved (false); // N
|
||||
|
@ -244,10 +243,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
|
|||
*/
|
||||
public File createPDF (File file)
|
||||
{
|
||||
// ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.INVOICE, getC_Invoice_ID());
|
||||
// if (re == null)
|
||||
return null;
|
||||
// return re.getPDF(file);
|
||||
return null;
|
||||
} // createPDF
|
||||
|
||||
|
||||
|
@ -765,8 +761,6 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
|
|||
*/
|
||||
public int getC_Currency_ID()
|
||||
{
|
||||
// MPriceList pl = MPriceList.get(getCtx(), getM_PriceList_ID());
|
||||
// return pl.getC_Currency_ID();
|
||||
return 0;
|
||||
} // getC_Currency_ID
|
||||
|
||||
|
|
|
@ -52,11 +52,6 @@ public class MMovementLine extends X_M_MovementLine
|
|||
super (ctx, M_MovementLine_ID, trxName);
|
||||
if (M_MovementLine_ID == 0)
|
||||
{
|
||||
// setM_LocatorTo_ID (0); // @M_LocatorTo_ID@
|
||||
// setM_Locator_ID (0); // @M_Locator_ID@
|
||||
// setM_MovementLine_ID (0);
|
||||
// setLine (0);
|
||||
// setM_Product_ID (0);
|
||||
setM_AttributeSetInstance_ID(0); // ID
|
||||
setMovementQty (Env.ZERO); // 1
|
||||
setTargetQty (Env.ZERO); // 0
|
||||
|
@ -261,7 +256,7 @@ public class MMovementLine extends X_M_MovementLine
|
|||
{
|
||||
setDD_OrderLine_ID(oLine.getDD_OrderLine_ID());
|
||||
setLine(oLine.getLine());
|
||||
//setC_UOM_ID(oLine.getC_UOM_ID());
|
||||
|
||||
MProduct product = oLine.getProduct();
|
||||
if (product == null)
|
||||
{
|
||||
|
|
|
@ -48,8 +48,6 @@ public class MMovementLineConfirm extends X_M_MovementLineConfirm
|
|||
super (ctx, M_MovementLineConfirm_ID, trxName);
|
||||
if (M_MovementLineConfirm_ID == 0)
|
||||
{
|
||||
// setM_MovementConfirm_ID (0); Parent
|
||||
// setM_MovementLine_ID (0);
|
||||
setConfirmedQty (Env.ZERO);
|
||||
setDifferenceQty (Env.ZERO);
|
||||
setScrappedQty (Env.ZERO);
|
||||
|
|
|
@ -121,9 +121,6 @@ public class ModelValidationEngine
|
|||
continue;
|
||||
loadValidatorClasses(clients[i], classNames);
|
||||
}
|
||||
//logging to db will try to init ModelValidationEngine again!
|
||||
//log.config(toString());
|
||||
// System.out.println(toString());
|
||||
} // ModelValidatorEngine
|
||||
|
||||
private void loadValidatorClasses(MClient client, String classNames)
|
||||
|
@ -180,8 +177,6 @@ public class ModelValidationEngine
|
|||
|
||||
/** Logger */
|
||||
private static CLogger log = CLogger.getCLogger(ModelValidationEngine.class);
|
||||
// /** Change Support */
|
||||
// private VetoableChangeSupport m_changeSupport = new VetoableChangeSupport(this);
|
||||
|
||||
/** Validators */
|
||||
private ArrayList<ModelValidator> m_validators = new ArrayList<ModelValidator>();
|
||||
|
|
Loading…
Reference in New Issue