IDEMPIERE-4723 - Clean up dead code -> MA*/MB* classes (#726)
This commit is contained in:
parent
fa7ddb7dd2
commit
d5845fcffe
|
@ -43,15 +43,6 @@ public class MAttachmentNote extends X_AD_AttachmentNote
|
|||
public MAttachmentNote (Properties ctx, int AD_AttachmentNote_ID, String trxName)
|
||||
{
|
||||
super (ctx, AD_AttachmentNote_ID, trxName);
|
||||
/**
|
||||
if (AD_AttachmentNote_ID == 0)
|
||||
{
|
||||
setAD_Attachment_ID (0);
|
||||
setAD_User_ID (0);
|
||||
setTextMsg (null);
|
||||
setTitle (null);
|
||||
}
|
||||
/**/
|
||||
} // MAttachmentNote
|
||||
|
||||
/**
|
||||
|
|
|
@ -168,7 +168,7 @@ public class MAttributeSet extends X_M_AttributeSet implements ImmutablePOSuppor
|
|||
|
||||
/** Instance Attributes */
|
||||
private MAttribute[] m_instanceAttributes = null;
|
||||
/** Instance Attributes */
|
||||
/** Product Attributes */
|
||||
private MAttribute[] m_productAttributes = null;
|
||||
|
||||
/** Entry Exclude */
|
||||
|
|
|
@ -81,7 +81,6 @@ public class MAttributeSetInstance extends X_M_AttributeSetInstance
|
|||
if (rs.next())
|
||||
{
|
||||
int M_AttributeSet_ID = rs.getInt(1);
|
||||
// M_AttributeSetInstance_ID = rs.getInt(2); // needed ?
|
||||
//
|
||||
retValue = new MAttributeSetInstance (ctx, 0, M_AttributeSet_ID, null);
|
||||
}
|
||||
|
|
|
@ -43,14 +43,6 @@ public class MAttributeValue extends X_M_AttributeValue
|
|||
public MAttributeValue (Properties ctx, int M_AttributeValue_ID, String trxName)
|
||||
{
|
||||
super (ctx, M_AttributeValue_ID, trxName);
|
||||
/** if (M_AttributeValue_ID == 0)
|
||||
{
|
||||
setM_AttributeValue_ID (0);
|
||||
setM_Attribute_ID (0);
|
||||
setName (null);
|
||||
setValue (null);
|
||||
}
|
||||
**/
|
||||
} // MAttributeValue
|
||||
|
||||
/**
|
||||
|
|
|
@ -127,8 +127,6 @@ public class MBOM extends X_M_BOM implements ImmutablePOSupport
|
|||
super (ctx, M_BOM_ID, trxName);
|
||||
if (M_BOM_ID == 0)
|
||||
{
|
||||
// setM_Product_ID (0);
|
||||
// setName (null);
|
||||
setBOMType (BOMTYPE_CurrentActive); // A
|
||||
setBOMUse (BOMUSE_Master); // A
|
||||
}
|
||||
|
|
|
@ -72,12 +72,10 @@ public class MBOMProduct extends X_M_BOMProduct
|
|||
super (ctx, M_BOMProduct_ID, trxName);
|
||||
if (M_BOMProduct_ID == 0)
|
||||
{
|
||||
// setM_BOM_ID (0);
|
||||
setBOMProductType (BOMPRODUCTTYPE_StandardProduct); // S
|
||||
setBOMQty (Env.ONE);
|
||||
setIsPhantom (false);
|
||||
setLeadTimeOffset (0);
|
||||
// setLine (0); // @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM M_BOMProduct WHERE M_BOM_ID=@M_BOM_ID@
|
||||
}
|
||||
} // MBOMProduct
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@ public class MBPBankAccount extends X_C_BP_BankAccount
|
|||
super (ctx, C_BP_BankAccount_ID, trxName);
|
||||
if (C_BP_BankAccount_ID == 0)
|
||||
{
|
||||
// setC_BPartner_ID (0);
|
||||
setIsACH (false);
|
||||
setBPBankAcctUse(BPBANKACCTUSE_Both);
|
||||
}
|
||||
|
|
|
@ -209,8 +209,6 @@ public class MBPGroup extends X_C_BP_Group implements ImmutablePOSupport
|
|||
super (ctx, C_BP_Group_ID, trxName);
|
||||
if (C_BP_Group_ID == 0)
|
||||
{
|
||||
// setValue (null);
|
||||
// setName (null);
|
||||
setIsConfidentialInfo (false); // N
|
||||
setIsDefault (false);
|
||||
setPriorityBase(PRIORITYBASE_Same);
|
||||
|
|
|
@ -78,7 +78,6 @@ public class MBPartner extends X_C_BPartner implements ImmutablePOSupport
|
|||
template.setSO_CreditLimit (Env.ZERO);
|
||||
template.setSO_CreditUsed (Env.ZERO);
|
||||
template.setTotalOpenBalance (Env.ZERO);
|
||||
// s_template.setRating(null);
|
||||
//
|
||||
template.setActualLifeTimeValue(Env.ZERO);
|
||||
template.setPotentialLifeTimeValue(Env.ZERO);
|
||||
|
@ -261,10 +260,6 @@ public class MBPartner extends X_C_BPartner implements ImmutablePOSupport
|
|||
}
|
||||
if (C_BPartner_ID == 0)
|
||||
{
|
||||
// setValue ("");
|
||||
// setName ("");
|
||||
// setName2 (null);
|
||||
// setDUNS("");
|
||||
//
|
||||
setIsCustomer (true);
|
||||
setIsProspect (true);
|
||||
|
@ -674,9 +669,6 @@ public class MBPartner extends X_C_BPartner implements ImmutablePOSupport
|
|||
if (m_primaryAD_User_ID == null)
|
||||
{
|
||||
MUser[] users = getContacts(false);
|
||||
// for (int i = 0; i < users.length; i++)
|
||||
// {
|
||||
// }
|
||||
if (m_primaryAD_User_ID == null && users.length > 0)
|
||||
setPrimaryAD_User_ID(users[0].getAD_User_ID());
|
||||
}
|
||||
|
@ -995,7 +987,6 @@ public class MBPartner extends X_C_BPartner implements ImmutablePOSupport
|
|||
StringBuilder msgacc = new StringBuilder("p.C_BP_Group_ID=").append(getC_BP_Group_ID());
|
||||
insert_Accounting("C_BP_Customer_Acct", "C_BP_Group_Acct", msgacc.toString());
|
||||
insert_Accounting("C_BP_Vendor_Acct", "C_BP_Group_Acct",msgacc.toString());
|
||||
// insert_Accounting("C_BP_Employee_Acct", "C_AcctSchema_Default", null);
|
||||
}
|
||||
if (newRecord || is_ValueChanged(COLUMNNAME_Value))
|
||||
update_Tree(MTree_Base.TREETYPE_BPartner);
|
||||
|
|
|
@ -269,7 +269,7 @@ public class MBPartnerLocation extends X_C_BPartner_Location {
|
|||
getAD_Client_ID(), getAD_Org_ID());
|
||||
if (m_unique < 0 || m_unique > 4)
|
||||
m_unique = 0;
|
||||
if (m_uniqueName != null) { // && m_uniqueName.equals(".")) {
|
||||
if (m_uniqueName != null) {
|
||||
// default
|
||||
m_uniqueName = null;
|
||||
makeUnique(address);
|
||||
|
@ -286,7 +286,6 @@ public class MBPartnerLocation extends X_C_BPartner_Location {
|
|||
if (location.getC_BPartner_Location_ID() == get_ID())
|
||||
continue;
|
||||
if (m_uniqueName.equals(location.getName())) {
|
||||
// m_uniqueName = null;
|
||||
m_unique++;
|
||||
makeUnique(address);
|
||||
unique = false;
|
||||
|
|
|
@ -104,9 +104,7 @@ public class MBankAccount extends X_C_BankAccount implements ImmutablePOSupport
|
|||
setIsDefault (false);
|
||||
setBankAccountType (BANKACCOUNTTYPE_Checking);
|
||||
setCurrentBalance (Env.ZERO);
|
||||
// setC_Currency_ID (0);
|
||||
setCreditLimit (Env.ZERO);
|
||||
// setC_BankAccount_ID (0);
|
||||
}
|
||||
} // MBankAccount
|
||||
|
||||
|
|
|
@ -65,7 +65,6 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
|
|||
super (ctx, C_BankStatement_ID, trxName);
|
||||
if (C_BankStatement_ID == 0)
|
||||
{
|
||||
// setC_BankAccount_ID (0); // parent
|
||||
setStatementDate (new Timestamp(System.currentTimeMillis())); // @Date@
|
||||
setDocAction (DOCACTION_Complete); // CO
|
||||
setDocStatus (DOCSTATUS_Drafted); // DR
|
||||
|
@ -228,10 +227,7 @@ public class MBankStatement extends X_C_BankStatement 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
|
||||
|
||||
|
||||
|
@ -312,25 +308,15 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
|
|||
}
|
||||
// Lines
|
||||
BigDecimal total = Env.ZERO;
|
||||
// IDEMPIERE-480 changed the way accounting is posted, now lines post just with the accounting date of the statement header
|
||||
// so, it is unnecessary to validate the period of lines
|
||||
// Timestamp minDate = getStatementDate();
|
||||
// Timestamp maxDate = minDate;
|
||||
for (int i = 0; i < lines.length; i++)
|
||||
{
|
||||
MBankStatementLine line = lines[i];
|
||||
if (!line.isActive())
|
||||
continue;
|
||||
total = total.add(line.getStmtAmt());
|
||||
// if (line.getDateAcct().before(minDate))
|
||||
// minDate = line.getDateAcct();
|
||||
// if (line.getDateAcct().after(maxDate))
|
||||
// maxDate = line.getDateAcct();
|
||||
}
|
||||
setStatementDifference(total);
|
||||
setEndingBalance(getBeginningBalance().add(total));
|
||||
// MPeriod.testPeriodOpen(getCtx(), minDate, MDocType.DOCBASETYPE_BankStatement, getAD_Org_ID());
|
||||
// MPeriod.testPeriodOpen(getCtx(), maxDate, MDocType.DOCBASETYPE_BankStatement, getAD_Org_ID());
|
||||
|
||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
|
||||
if (m_processMsg != null)
|
||||
|
@ -644,8 +630,6 @@ public class MBankStatement extends X_C_BankStatement 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
|
||||
|
||||
|
|
|
@ -57,17 +57,11 @@ import org.compiere.util.Msg;
|
|||
super (ctx, C_BankStatementLine_ID, trxName);
|
||||
if (C_BankStatementLine_ID == 0)
|
||||
{
|
||||
// setC_BankStatement_ID (0); // Parent
|
||||
// setC_Charge_ID (0);
|
||||
// setC_Currency_ID (0); // Bank Acct Currency
|
||||
// setLine (0); // @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM C_BankStatementLine WHERE C_BankStatement_ID=@C_BankStatement_ID@
|
||||
setStmtAmt(Env.ZERO);
|
||||
setTrxAmt(Env.ZERO);
|
||||
setInterestAmt(Env.ZERO);
|
||||
setChargeAmt(Env.ZERO);
|
||||
setIsReversal (false);
|
||||
// setValutaDate (new Timestamp(System.currentTimeMillis())); // @StatementDate@
|
||||
// setDateAcct (new Timestamp(System.currentTimeMillis())); // @StatementDate@
|
||||
}
|
||||
} // MBankStatementLine
|
||||
|
||||
|
|
Loading…
Reference in New Issue