Package org.compiere.model
Class MCostHistory
java.lang.Object
org.compiere.model.PO
org.compiere.model.X_M_CostHistory
org.compiere.model.MCostHistory
- All Implemented Interfaces:
Serializable,Cloneable,Comparator<Object>,I_M_CostHistory,I_Persistent,ICostInfo,Evaluatee
Cost History Model
- See Also:
-
Field Summary
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, log, p_ctx, p_info, UUID_NEW_RECORD, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_IDFields inherited from interface org.compiere.model.I_M_CostHistory
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_BackDateProcessedOn, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_DateAcct, COLUMNNAME_IsActive, COLUMNNAME_IsBackDate, COLUMNNAME_M_AttributeSetInstance_ID, COLUMNNAME_M_CostDetail_ID, COLUMNNAME_M_CostElement_ID, COLUMNNAME_M_CostHistory_ID, COLUMNNAME_M_CostHistory_UU, COLUMNNAME_M_CostType_ID, COLUMNNAME_M_Product_ID, COLUMNNAME_NewCAmt, COLUMNNAME_NewCostPrice, COLUMNNAME_NewCQty, COLUMNNAME_NewQty, COLUMNNAME_OldCAmt, COLUMNNAME_OldCostPrice, COLUMNNAME_OldCQty, COLUMNNAME_OldQty, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, Model, Table_ID, Table_Name -
Constructor Summary
ConstructorsConstructorDescriptionMCostHistory(Properties ctx, int M_CostHistory_ID, String trxName) Standard ConstructorMCostHistory(Properties ctx, String M_CostHistory_UU, String trxName) UUID based ConstructorMCostHistory(Properties ctx, ResultSet rs, String trxName) Load ConstructorMCostHistory(MCostDetail cd, MCost cost, MCostElement ce) -
Method Summary
Modifier and TypeMethodDescriptionprotected static MCostHistoryget(Properties ctx, int AD_Client_ID, int AD_Org_ID, int M_Product_ID, int M_CostType_ID, int C_AcctSchema_ID, String costingMethod, int M_CostElement_ID, int M_AttributeSetInstance_ID, Timestamp dateAcct, String trxName) Get Cost History Record by Account Date If no cost history record <= account date, simulate using the first cost history record after account dateprotected static MCostHistoryget(Properties ctx, int AD_Org_ID, int M_CostType_ID, int C_AcctSchema_ID, String costingMethod, int M_CostElement_ID, int M_AttributeSetInstance_ID, MCostDetail cd, String trxName) Get Cost History Record by Cost DetailGet Accumulated Amt.Get Accumulated Qty.Get Current Cost Price.Get Current Quantity.Methods inherited from class org.compiere.model.X_M_CostHistory
get_AccessLevel, getBackDateProcessedOn, getDateAcct, getM_AttributeSetInstance, getM_AttributeSetInstance_ID, getM_CostDetail, getM_CostDetail_ID, getM_CostElement, getM_CostElement_ID, getM_CostHistory_ID, getM_CostHistory_UU, getM_CostType, getM_CostType_ID, getM_Product, getM_Product_ID, getNewCAmt, getNewCostPrice, getNewCQty, getNewQty, getOldCAmt, getOldCostPrice, getOldCQty, getOldQty, initPO, isBackDate, setBackDateProcessedOn, setDateAcct, setIsBackDate, setM_AttributeSetInstance_ID, setM_CostDetail_ID, setM_CostElement_ID, setM_CostHistory_ID, setM_CostHistory_UU, setM_CostType_ID, setM_Product_ID, setNewCAmt, setNewCostPrice, setNewCQty, setNewQty, setOldCAmt, setOldCostPrice, setOldCQty, setOldQty, toStringMethods inherited from class org.compiere.model.PO
afterDelete, afterSave, beforeDelete, beforeSave, buildInsertSQL, 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_TableAttribute, get_TableAttributeAsBoolean, get_TableAttributeAsInt, get_TableAttributes, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_UUID, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, 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, loadByUU, loadComplete, loadDefaults, loadPO, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveCrossTenantSafe, saveCrossTenantSafeEx, saveCrossTenantSafeEx, 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, toInsertSQL, unlock, update_Tree, validForeignKeys, validForeignKeysExMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods inherited from interface org.compiere.model.I_M_CostHistory
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActiveMethods inherited from interface org.compiere.model.I_Persistent
save
-
Constructor Details
-
MCostHistory
UUID based Constructor- Parameters:
ctx- ContextM_CostHistory_UU- UUID keytrxName- Transaction
-
MCostHistory
Standard Constructor- Parameters:
ctx- contextM_CostDetail_ID- idtrxName- trx
-
MCostHistory
Load Constructor- Parameters:
ctx- contextrs- result settrxName- trx
-
MCostHistory
-
-
Method Details
-
get
protected static MCostHistory get(Properties ctx, int AD_Org_ID, int M_CostType_ID, int C_AcctSchema_ID, String costingMethod, int M_CostElement_ID, int M_AttributeSetInstance_ID, MCostDetail cd, String trxName) Get Cost History Record by Cost Detail- Parameters:
ctx- contextAD_Org_ID- orgM_CostType_ID- cost typeC_AcctSchema_ID- accounting schemacostingMethod- cost methodM_CostElement_ID- optional cost elementM_AttributeSetInstance_ID- asicd- cost detailtrxName- transaction name- Returns:
- MCostHistory or null
-
get
protected static MCostHistory get(Properties ctx, int AD_Client_ID, int AD_Org_ID, int M_Product_ID, int M_CostType_ID, int C_AcctSchema_ID, String costingMethod, int M_CostElement_ID, int M_AttributeSetInstance_ID, Timestamp dateAcct, String trxName) Get Cost History Record by Account Date If no cost history record <= account date, simulate using the first cost history record after account date- Parameters:
ctx- contextAD_Client_ID- clientAD_Org_ID- orgM_Product_ID- productM_CostType_ID- cost typeC_AcctSchema_ID- ascostingMethod- costing methodM_CostElement_ID- optional costing elementM_AttributeSetInstance_ID- asidateAcct- account datetrxName- transaction name- Returns:
- MCostHistory or null
-
getCumulatedAmt
Description copied from interface:ICostInfoGet Accumulated Amt.- Specified by:
getCumulatedAmtin interfaceICostInfo- Returns:
- Total Amount
-
getCumulatedQty
Description copied from interface:ICostInfoGet Accumulated Qty.- Specified by:
getCumulatedQtyin interfaceICostInfo- Returns:
- Total Quantity
-
getCurrentCostPrice
Description copied from interface:ICostInfoGet Current Cost Price.- Specified by:
getCurrentCostPricein interfaceICostInfo- Returns:
- The currently used cost price
-
getCurrentQty
Description copied from interface:ICostInfoGet Current Quantity.- Specified by:
getCurrentQtyin interfaceICostInfo- Returns:
- Current Quantity
-