Package org.compiere.model
Class MDepreciationExp
- java.lang.Object
-
- org.compiere.model.PO
-
- org.compiere.model.X_A_Depreciation_Exp
-
- org.compiere.model.MDepreciationExp
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_A_Depreciation_Exp
,I_Persistent
,Evaluatee
public class MDepreciationExp extends X_A_Depreciation_Exp
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.compiere.model.X_A_Depreciation_Exp
A_ENTRY_TYPE_AD_Reference_ID, A_ENTRY_TYPE_Depreciation, A_ENTRY_TYPE_Disposals, A_ENTRY_TYPE_Forecasts, A_ENTRY_TYPE_New, A_ENTRY_TYPE_Splits, A_ENTRY_TYPE_Transfers, POSTINGTYPE_Actual, POSTINGTYPE_AD_Reference_ID, POSTINGTYPE_Budget, POSTINGTYPE_Commitment, POSTINGTYPE_Reservation, POSTINGTYPE_Statistical
-
Fields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, LOCAL_TRX_PREFIX, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
-
Fields inherited from interface org.compiere.model.I_A_Depreciation_Exp
accessLevel, COLUMNNAME_A_Account_Number_Acct, COLUMNNAME_A_Accumulated_Depr, COLUMNNAME_A_Accumulated_Depr_Delta, COLUMNNAME_A_Accumulated_Depr_F, COLUMNNAME_A_Accumulated_Depr_F_Delta, COLUMNNAME_A_Asset_Addition_ID, COLUMNNAME_A_Asset_Cost, COLUMNNAME_A_Asset_Cost_Delta, COLUMNNAME_A_Asset_Disposed_ID, COLUMNNAME_A_Asset_ID, COLUMNNAME_A_Asset_Remaining, COLUMNNAME_A_Asset_Remaining_F, COLUMNNAME_A_Depreciation_Entry_ID, COLUMNNAME_A_Depreciation_Exp_ID, COLUMNNAME_A_Depreciation_Exp_UU, COLUMNNAME_A_Entry_Type, COLUMNNAME_A_Period, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_C_AcctSchema_ID, COLUMNNAME_CR_Account_ID, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_DateAcct, COLUMNNAME_Description, COLUMNNAME_DR_Account_ID, COLUMNNAME_Expense, COLUMNNAME_Expense_F, COLUMNNAME_Help, COLUMNNAME_IsActive, COLUMNNAME_IsDepreciated, COLUMNNAME_PostingType, COLUMNNAME_Processed, COLUMNNAME_Processing, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_UseLifeMonths, COLUMNNAME_UseLifeMonths_F, Model, Table_ID, Table_Name
-
-
Constructor Summary
Constructors Constructor Description MDepreciationExp(Properties ctx, int A_Depreciation_Exp_ID, String trxName)
Standard ConstructorMDepreciationExp(Properties ctx, ResultSet rs, String trxName)
Load Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
afterDelete(boolean success)
Executed after Delete operation.protected boolean
beforeDelete()
Executed before Delete operation.static void
checkExistsNotProcessedEntries(Properties ctx, int A_Asset_ID, Timestamp dateAcct, String postingType, String trxName)
static Collection<MDepreciationExp>
createDepreciation(MDepreciationWorkfile assetwk, int PeriodNo, Timestamp dateAcct, BigDecimal amt, BigDecimal amt_F, BigDecimal accumAmt, BigDecimal accumAmt_F, String help, String trxName)
Create Depreciation Entries Produce record:static MDepreciationExp
createEntry(Properties ctx, String entryType, int A_Asset_ID, int A_Period, Timestamp DateAcct, String postingType, int drAcct, int crAcct, BigDecimal expense, String description, MDepreciationWorkfile assetwk)
Create entrystatic MDepreciationExp
get(Properties ctx, int A_Depreciation_Exp_ID)
Gets depreciation expensestatic List<MDepreciationExp>
getNotProcessedEntries(Properties ctx, int A_Asset_ID, String postingType, String trxName)
protected boolean
isPosted()
void
process()
Process this entry and save the modified workfile.void
setProcessed(boolean Processed)
Set Processed.String
toString()
String representationvoid
updateFrom(MDepreciationWorkfile wk)
Update fields from asset workfile-
Methods inherited from class org.compiere.model.X_A_Depreciation_Exp
get_AccessLevel, getA_Account_Number_A, getA_Account_Number_Acct, getA_Accumulated_Depr, getA_Accumulated_Depr_Delta, getA_Accumulated_Depr_F, getA_Accumulated_Depr_F_Delta, getA_Asset, getA_Asset_Addition, getA_Asset_Addition_ID, getA_Asset_Cost, getA_Asset_Cost_Delta, getA_Asset_Disposed, getA_Asset_Disposed_ID, getA_Asset_ID, getA_Asset_Remaining, getA_Asset_Remaining_F, getA_Depreciation_Entry, getA_Depreciation_Entry_ID, getA_Depreciation_Exp_ID, getA_Depreciation_Exp_UU, getA_Entry_Type, getA_Period, getC_AcctSchema, getC_AcctSchema_ID, getCR_Account, getCR_Account_ID, getDateAcct, getDescription, getDR_Account, getDR_Account_ID, getExpense, getExpense_F, getHelp, getKeyNamePair, getPostingType, getUseLifeMonths, getUseLifeMonths_F, initPO, isDepreciated, isProcessed, isProcessing, setA_Account_Number_Acct, setA_Accumulated_Depr, setA_Accumulated_Depr_Delta, setA_Accumulated_Depr_F, setA_Accumulated_Depr_F_Delta, setA_Asset_Addition_ID, setA_Asset_Cost, setA_Asset_Cost_Delta, setA_Asset_Disposed_ID, setA_Asset_ID, setA_Asset_Remaining, setA_Asset_Remaining_F, setA_Depreciation_Entry_ID, setA_Depreciation_Exp_ID, setA_Depreciation_Exp_UU, setA_Entry_Type, setA_Period, setC_AcctSchema_ID, setCR_Account_ID, setDateAcct, setDescription, setDR_Account_ID, setExpense, setExpense_F, setHelp, setIsDepreciated, setPostingType, setProcessing, setUseLifeMonths, setUseLifeMonths_F
-
Methods inherited from class org.compiere.model.PO
afterSave, beforeSave, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock, update_Tree, validForeignKeys
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from interface org.compiere.model.I_A_Depreciation_Exp
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
-
Methods inherited from interface org.compiere.model.I_Persistent
save
-
-
-
-
Constructor Detail
-
MDepreciationExp
public MDepreciationExp(Properties ctx, int A_Depreciation_Exp_ID, String trxName)
Standard Constructor
-
MDepreciationExp
public MDepreciationExp(Properties ctx, ResultSet rs, String trxName)
Load Constructor
-
-
Method Detail
-
get
public static MDepreciationExp get(Properties ctx, int A_Depreciation_Exp_ID)
Gets depreciation expense- Parameters:
ctx
- contextA_Depreciation_Exp_ID
- depreciation expense id- Returns:
- depreciation expense or null if A_Depreciation_Exp_ID=0 or not found
-
createEntry
public static MDepreciationExp createEntry(Properties ctx, String entryType, int A_Asset_ID, int A_Period, Timestamp DateAcct, String postingType, int drAcct, int crAcct, BigDecimal expense, String description, MDepreciationWorkfile assetwk)
Create entry
-
updateFrom
public void updateFrom(MDepreciationWorkfile wk)
Update fields from asset workfile- Parameters:
wk
- asset workfile
-
createDepreciation
public static Collection<MDepreciationExp> createDepreciation(MDepreciationWorkfile assetwk, int PeriodNo, Timestamp dateAcct, BigDecimal amt, BigDecimal amt_F, BigDecimal accumAmt, BigDecimal accumAmt_F, String help, String trxName)
Create Depreciation Entries Produce record:68.. = 28.. depreciation value
-
process
public void process()
Process this entry and save the modified workfile.
-
beforeDelete
protected boolean beforeDelete()
Description copied from class:PO
Executed before Delete operation.- Overrides:
beforeDelete
in classPO
- Returns:
- true if record can be deleted
-
afterDelete
protected boolean afterDelete(boolean success)
Description copied from class:PO
Executed after Delete operation.- Overrides:
afterDelete
in classPO
- Parameters:
success
- true if record deleted- Returns:
- true if delete is a success
-
isPosted
protected boolean isPosted()
-
checkExistsNotProcessedEntries
public static void checkExistsNotProcessedEntries(Properties ctx, int A_Asset_ID, Timestamp dateAcct, String postingType, String trxName)
-
getNotProcessedEntries
public static List<MDepreciationExp> getNotProcessedEntries(Properties ctx, int A_Asset_ID, String postingType, String trxName)
-
setProcessed
public void setProcessed(boolean Processed)
Description copied from class:X_A_Depreciation_Exp
Set Processed.- Specified by:
setProcessed
in interfaceI_A_Depreciation_Exp
- Overrides:
setProcessed
in classX_A_Depreciation_Exp
- Parameters:
Processed
- The document has been processed
-
toString
public String toString()
Description copied from class:PO
String representation- Overrides:
toString
in classX_A_Depreciation_Exp
- Returns:
- String representation
-
-