IDEMPIERE-4723 - Clean up dead code -> MA*/MB* classes (#726)

This commit is contained in:
Diego Ruiz 2021-06-18 04:34:11 +02:00 committed by GitHub
parent fa7ddb7dd2
commit d5845fcffe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 3 additions and 62 deletions

View File

@ -43,15 +43,6 @@ public class MAttachmentNote extends X_AD_AttachmentNote
public MAttachmentNote (Properties ctx, int AD_AttachmentNote_ID, String trxName) public MAttachmentNote (Properties ctx, int AD_AttachmentNote_ID, String trxName)
{ {
super (ctx, AD_AttachmentNote_ID, 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 } // MAttachmentNote
/** /**

View File

@ -168,7 +168,7 @@ public class MAttributeSet extends X_M_AttributeSet implements ImmutablePOSuppor
/** Instance Attributes */ /** Instance Attributes */
private MAttribute[] m_instanceAttributes = null; private MAttribute[] m_instanceAttributes = null;
/** Instance Attributes */ /** Product Attributes */
private MAttribute[] m_productAttributes = null; private MAttribute[] m_productAttributes = null;
/** Entry Exclude */ /** Entry Exclude */

View File

@ -81,7 +81,6 @@ public class MAttributeSetInstance extends X_M_AttributeSetInstance
if (rs.next()) if (rs.next())
{ {
int M_AttributeSet_ID = rs.getInt(1); int M_AttributeSet_ID = rs.getInt(1);
// M_AttributeSetInstance_ID = rs.getInt(2); // needed ?
// //
retValue = new MAttributeSetInstance (ctx, 0, M_AttributeSet_ID, null); retValue = new MAttributeSetInstance (ctx, 0, M_AttributeSet_ID, null);
} }

View File

@ -43,14 +43,6 @@ public class MAttributeValue extends X_M_AttributeValue
public MAttributeValue (Properties ctx, int M_AttributeValue_ID, String trxName) public MAttributeValue (Properties ctx, int M_AttributeValue_ID, String trxName)
{ {
super (ctx, M_AttributeValue_ID, 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 } // MAttributeValue
/** /**

View File

@ -127,8 +127,6 @@ public class MBOM extends X_M_BOM implements ImmutablePOSupport
super (ctx, M_BOM_ID, trxName); super (ctx, M_BOM_ID, trxName);
if (M_BOM_ID == 0) if (M_BOM_ID == 0)
{ {
// setM_Product_ID (0);
// setName (null);
setBOMType (BOMTYPE_CurrentActive); // A setBOMType (BOMTYPE_CurrentActive); // A
setBOMUse (BOMUSE_Master); // A setBOMUse (BOMUSE_Master); // A
} }

View File

@ -72,12 +72,10 @@ public class MBOMProduct extends X_M_BOMProduct
super (ctx, M_BOMProduct_ID, trxName); super (ctx, M_BOMProduct_ID, trxName);
if (M_BOMProduct_ID == 0) if (M_BOMProduct_ID == 0)
{ {
// setM_BOM_ID (0);
setBOMProductType (BOMPRODUCTTYPE_StandardProduct); // S setBOMProductType (BOMPRODUCTTYPE_StandardProduct); // S
setBOMQty (Env.ONE); setBOMQty (Env.ONE);
setIsPhantom (false); setIsPhantom (false);
setLeadTimeOffset (0); setLeadTimeOffset (0);
// setLine (0); // @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM M_BOMProduct WHERE M_BOM_ID=@M_BOM_ID@
} }
} // MBOMProduct } // MBOMProduct

View File

@ -74,7 +74,6 @@ public class MBPBankAccount extends X_C_BP_BankAccount
super (ctx, C_BP_BankAccount_ID, trxName); super (ctx, C_BP_BankAccount_ID, trxName);
if (C_BP_BankAccount_ID == 0) if (C_BP_BankAccount_ID == 0)
{ {
// setC_BPartner_ID (0);
setIsACH (false); setIsACH (false);
setBPBankAcctUse(BPBANKACCTUSE_Both); setBPBankAcctUse(BPBANKACCTUSE_Both);
} }

View File

@ -209,8 +209,6 @@ public class MBPGroup extends X_C_BP_Group implements ImmutablePOSupport
super (ctx, C_BP_Group_ID, trxName); super (ctx, C_BP_Group_ID, trxName);
if (C_BP_Group_ID == 0) if (C_BP_Group_ID == 0)
{ {
// setValue (null);
// setName (null);
setIsConfidentialInfo (false); // N setIsConfidentialInfo (false); // N
setIsDefault (false); setIsDefault (false);
setPriorityBase(PRIORITYBASE_Same); setPriorityBase(PRIORITYBASE_Same);

View File

@ -78,7 +78,6 @@ public class MBPartner extends X_C_BPartner implements ImmutablePOSupport
template.setSO_CreditLimit (Env.ZERO); template.setSO_CreditLimit (Env.ZERO);
template.setSO_CreditUsed (Env.ZERO); template.setSO_CreditUsed (Env.ZERO);
template.setTotalOpenBalance (Env.ZERO); template.setTotalOpenBalance (Env.ZERO);
// s_template.setRating(null);
// //
template.setActualLifeTimeValue(Env.ZERO); template.setActualLifeTimeValue(Env.ZERO);
template.setPotentialLifeTimeValue(Env.ZERO); template.setPotentialLifeTimeValue(Env.ZERO);
@ -261,10 +260,6 @@ public class MBPartner extends X_C_BPartner implements ImmutablePOSupport
} }
if (C_BPartner_ID == 0) if (C_BPartner_ID == 0)
{ {
// setValue ("");
// setName ("");
// setName2 (null);
// setDUNS("");
// //
setIsCustomer (true); setIsCustomer (true);
setIsProspect (true); setIsProspect (true);
@ -674,9 +669,6 @@ public class MBPartner extends X_C_BPartner implements ImmutablePOSupport
if (m_primaryAD_User_ID == null) if (m_primaryAD_User_ID == null)
{ {
MUser[] users = getContacts(false); MUser[] users = getContacts(false);
// for (int i = 0; i < users.length; i++)
// {
// }
if (m_primaryAD_User_ID == null && users.length > 0) if (m_primaryAD_User_ID == null && users.length > 0)
setPrimaryAD_User_ID(users[0].getAD_User_ID()); 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()); 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_Customer_Acct", "C_BP_Group_Acct", msgacc.toString());
insert_Accounting("C_BP_Vendor_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)) if (newRecord || is_ValueChanged(COLUMNNAME_Value))
update_Tree(MTree_Base.TREETYPE_BPartner); update_Tree(MTree_Base.TREETYPE_BPartner);

View File

@ -269,7 +269,7 @@ public class MBPartnerLocation extends X_C_BPartner_Location {
getAD_Client_ID(), getAD_Org_ID()); getAD_Client_ID(), getAD_Org_ID());
if (m_unique < 0 || m_unique > 4) if (m_unique < 0 || m_unique > 4)
m_unique = 0; m_unique = 0;
if (m_uniqueName != null) { // && m_uniqueName.equals(".")) { if (m_uniqueName != null) {
// default // default
m_uniqueName = null; m_uniqueName = null;
makeUnique(address); makeUnique(address);
@ -286,7 +286,6 @@ public class MBPartnerLocation extends X_C_BPartner_Location {
if (location.getC_BPartner_Location_ID() == get_ID()) if (location.getC_BPartner_Location_ID() == get_ID())
continue; continue;
if (m_uniqueName.equals(location.getName())) { if (m_uniqueName.equals(location.getName())) {
// m_uniqueName = null;
m_unique++; m_unique++;
makeUnique(address); makeUnique(address);
unique = false; unique = false;

View File

@ -104,9 +104,7 @@ public class MBankAccount extends X_C_BankAccount implements ImmutablePOSupport
setIsDefault (false); setIsDefault (false);
setBankAccountType (BANKACCOUNTTYPE_Checking); setBankAccountType (BANKACCOUNTTYPE_Checking);
setCurrentBalance (Env.ZERO); setCurrentBalance (Env.ZERO);
// setC_Currency_ID (0);
setCreditLimit (Env.ZERO); setCreditLimit (Env.ZERO);
// setC_BankAccount_ID (0);
} }
} // MBankAccount } // MBankAccount

View File

@ -65,7 +65,6 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
super (ctx, C_BankStatement_ID, trxName); super (ctx, C_BankStatement_ID, trxName);
if (C_BankStatement_ID == 0) if (C_BankStatement_ID == 0)
{ {
// setC_BankAccount_ID (0); // parent
setStatementDate (new Timestamp(System.currentTimeMillis())); // @Date@ setStatementDate (new Timestamp(System.currentTimeMillis())); // @Date@
setDocAction (DOCACTION_Complete); // CO setDocAction (DOCACTION_Complete); // CO
setDocStatus (DOCSTATUS_Drafted); // DR setDocStatus (DOCSTATUS_Drafted); // DR
@ -228,10 +227,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
*/ */
public File createPDF (File file) public File createPDF (File file)
{ {
// ReportEngine re = ReportEngine.get (getCtx(), ReportEngine.INVOICE, getC_Invoice_ID()); return null;
// if (re == null)
return null;
// return re.getPDF(file);
} // createPDF } // createPDF
@ -312,25 +308,15 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
} }
// Lines // Lines
BigDecimal total = Env.ZERO; 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++) for (int i = 0; i < lines.length; i++)
{ {
MBankStatementLine line = lines[i]; MBankStatementLine line = lines[i];
if (!line.isActive()) if (!line.isActive())
continue; continue;
total = total.add(line.getStmtAmt()); total = total.add(line.getStmtAmt());
// if (line.getDateAcct().before(minDate))
// minDate = line.getDateAcct();
// if (line.getDateAcct().after(maxDate))
// maxDate = line.getDateAcct();
} }
setStatementDifference(total); setStatementDifference(total);
setEndingBalance(getBeginningBalance().add(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); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null) if (m_processMsg != null)
@ -644,8 +630,6 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
*/ */
public int getC_Currency_ID() public int getC_Currency_ID()
{ {
// MPriceList pl = MPriceList.get(getCtx(), getM_PriceList_ID());
// return pl.getC_Currency_ID();
return 0; return 0;
} // getC_Currency_ID } // getC_Currency_ID

View File

@ -57,17 +57,11 @@ import org.compiere.util.Msg;
super (ctx, C_BankStatementLine_ID, trxName); super (ctx, C_BankStatementLine_ID, trxName);
if (C_BankStatementLine_ID == 0) 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); setStmtAmt(Env.ZERO);
setTrxAmt(Env.ZERO); setTrxAmt(Env.ZERO);
setInterestAmt(Env.ZERO); setInterestAmt(Env.ZERO);
setChargeAmt(Env.ZERO); setChargeAmt(Env.ZERO);
setIsReversal (false); setIsReversal (false);
// setValutaDate (new Timestamp(System.currentTimeMillis())); // @StatementDate@
// setDateAcct (new Timestamp(System.currentTimeMillis())); // @StatementDate@
} }
} // MBankStatementLine } // MBankStatementLine