public class InvCost extends Mbo implements InvCostRemote
See Inventory Package description.
This is a site level object.
The key attributes in this object are as follows: itemnum,itemsetid,location,conditioncode
The persistent attributes in this object are as follows:
Attribute Name | Description |
---|---|
AvgCost | The Average Cost for the condition of item. |
ConditionCode | The condition of the inventory item. |
CondRate | The percentage rate of the condition. |
Controlacc | The Control Account. |
Controlaccount | The Control Account for cost adjustments, a non-persistent column created for standard or average cost adjustments. |
GLAccount | GL Account. |
InvCostAdjAcc | The Cost Adjustment Account. |
InvCostAdjAcc | The Accounts for cost adjustments, a non-persistent column created for standard or average cost adjustments. |
itemnum | Item for the condition code. Item Number can be null. |
ItemSetId | The Item Set. |
LastCost | The Last Cost for the condition of item. |
Location | The inventory location. |
NewAvgCost | The new average cost, non-persistent column created for user input of new average cost for Average Cost Adjustment. |
NewStdCost | The new standard cost, non-persistent column created for user input of new standard cost for Standard Cost Adjustment. |
OrgId | The organization. |
PercentageIncrease | The percentage increase, non-persistent column created for user input of percentage increase for Average Cost Adjustment. |
ShrinkageAcc | Shrinkage Account. |
SiteId | Identifier of the site for this object.
|
StdCost | The standard cost of the item condition. |
MULTILANGCOPY, phantomList, phantomQueue
ALLROWS, CHANGEDBY_USER, COUNT_ADDITIONS, COUNT_AFTERSAVE, COUNT_DATABASE, COUNT_DELETED, COUNT_EXISTING, DBCONFIG, DELAYVALIDATION, DELAYVALIDATIONONLY, DISCARDABLE, GOTCOMPLETEWHERE, HIDDEN, NO_RELATEDMBOS_OF_OWNERSCHILDREN_FETCH, NOACCESSCHECK, NOACTION, NOADD, NOCOMMIT, NODELETE, NONE, NOOVERWRITE, NOSAVE, NOSETVALUE, NOUPDATE, NOVALIDATION, NOVALIDATION_AND_NOACTION, NOVALIDATION_AND_NOACTION_ALLOWCROSSOVER, READONLY, REBUILD, REQUIRED, SAMEVALUEVALIDATION, SETBYPARENT, USER
Constructor and Description |
---|
InvCost(MboSet ms)
Construct the InvCost object
|
Modifier and Type | Method and Description |
---|---|
void |
add()
add()
Provides defaults for a new InvCost Record.
|
MboRemote |
adjustAverageCost(double newcost)
adjustAverageCost(1,2)
Adjust Inventory Average Cost (AVGCSTADJ)
This method is used to carry out an average cost adjustment (not updating as in receipts/ returns).
|
MboRemote |
adjustStandardCost(double newcost)
adjustStandardCost(1,2)
Adjust Inventory Standard Cost (STDCSTADJ)
This method is used to carry out a standard cost adjustment.
|
void |
appValidate()
last minute validate before save().
|
void |
canDelete()
Checks whether this object can be deleted.
|
double |
getDefaultIssueCost()
getDefaultIssueCost()
Core logic to return the default issue cost for this item/storeroom/conditioncode
Checks inventory.costtype and returns the value from that field
Note: Cost Returned is in base Currency
|
void |
init()
Initialization rountine.
|
void |
modify()
This called whenever a change is made to the attributes of a MBO.
|
void |
updateAverageCost(double quantity,
double totalvalue,
double exr)
This method performs the core logic of average cost calculation and update of the invcost.
|
void |
updateLastCost(double value)
This method is provided to update the lastcost of this invcost.
|
addMboSetForRequiredCheck, addToDeleteForInsertList, andEvaluateConditions, blindCopy, checkFieldAccess, checkMethodAccess, checkMethodAccess, checkQualifiedRestriction, checkSiteOrgAccessForSave, clear, copy, copy, copy, copyFake, copyValue, copyValue, createComm, delete, delete, determineRequiredFieldsFromERM, duplicate, enableMethod, evaluateCondition, evaluateCondition, evaluateCtrlConditions, evaluateCtrlConditions, evaluateRestriction, excludeObjectForPropagate, findAllNullRequiredFields, fireEvent, generateAutoKey, generateContentUID, getAlwaysFlags, getAttrRestrictionFlag, getAttrRestrictions, getBoolean, getByte, getBytes, getCheckpoint, getClientLocale, getClientTimeZone, getCommLogOwnerNameAndUniqueId, getCondition, getDatabaseValue, getDate, getDeleteForInsertList, getDocLinksCount, getDomainFilterWhere, getDomainIDs, getDouble, getExistingMboSet, getFetchIndex, getFieldExceptions, getFlags, getFloat, getIgnoreLockCheck, getInitialValue, getInsertCompanySetId, getInsertItemSetId, getInsertOrganization, getInsertSite, getInstanciatedMboSet, getInstanciatedMboValue, getInt, getIntegrationService, getKeyValue, getLanguageRecordRowStamp, getLinesRelationship, getList, getLockedByDisplayName, getLockedByUserID, getLong, getMatchingAttr, getMatchingAttr, getMatchingAttrs, getMaxMessage, getMboData, getMboDataSet, getMboForAttribute, getMboForAttributeStatic, getMboInitialValue, getMboList, getMboLogger, getMboRecordData, getMboServer, getMboSet, getMboSet, getMboSet, getMboSetInfo, getMboValue, getMboValueData, getMboValueData, getMboValueData, getMboValueInfoStatic, getMboValueInfoStatic, getMessage, getMessage, getMessage, getMessage, getMXTransaction, getName, getOrgForGL, getOrgSiteForMaxvar, getOwner, getProfile, getPropagateKeyFlag, getProxy, getRecordIdentifer, getRecordMboName, getRelatedWhere, getRelatedWhere, getRelationshipNameToLangTable, getRowRestrictionFlag, getRowStamp, getSecurityLogger, getSiteOrg, getSqlLogger, getString, getString, getStringInBaseLanguage, getStringInSpecificLocale, getStringTransparent, getSynonymValueWhere, getTenantId, getThisMboSet, getTranslator, getUniqueIdentifer, getUniqueIDName, getUniqueIDValue, getUserInfo, getUserName, getValidateOrder, hasFieldAccess, hasHierarchyLink, hasLockSaveRights, hasRelatedQbe, hasUniqueID, initFieldFlagsOnMbo, initRelationship, isAutoKeyed, isBasedOn, isChangeByUserWhenSetFromLookup, isEAuditFieldModified, isESigFieldModified, isFlagSet, isForDM, isLocked, isLocked, isLockedByMe, isMasterTenant, isMboLockedByMe, isModified, isModified, isNew, isNull, isOptionGranted, isSelected, isSkipCopyField, isValid, isZombie, lock, moveFieldFlagsToMboValue, needCallInitFieldFlag, orEvaluateConditions, propagateKeyValue, removeRelatedSet, rollbackToCheckpoint, select, setAppDefaultValue, setApplicationError, setApplicationRequired, setAutokeyFields, setCopyDefaults, setDefaultValue, setDefaultValues, setDeleted, setEAuditFieldModified, setESigFieldModified, setFetchIndex, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlags, setFlag, setFlag, setFlags, setForDM, setHierarchyLink, setIgnoreRecordLockCheck, setLangCodeDefault, setMLValue, setModified, setNewMbo, setPropagateKeyFlag, setPropagateKeyFlag, setProxy, setReadonlyWhenParentIsReadonly, setReferencedMbo, setReferencedMbo, setUniqueIDValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueFromSequence, setValueNull, setValueNull, sigopGranted, sigopGranted, sigopGranted, sigOptionAccessAuthorized, smartFill, smartFind, smartFind, smartFindByObjectName, smartFindByObjectName, smartFindByObjectNameDirect, startCheckpoint, thisToBeUpdated, toBeAdded, toBeDeleted, toBeSaved, toBeUpdated, toBeValidated, undelete, unlock, unselect, useDataSecurity, validate, validateAttributes, validateKeyUniqueness, valueChanged
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addMboSetForRequiredCheck, addToDeleteForInsertList, blindCopy, checkMethodAccess, clear, copy, copy, copy, copyFake, copyValue, copyValue, createComm, delete, delete, duplicate, evaluateCondition, evaluateCtrlConditions, evaluateCtrlConditions, excludeObjectForPropagate, generateAutoKey, getBoolean, getByte, getBytes, getCommLogOwnerNameAndUniqueId, getDatabaseValue, getDate, getDeleteForInsertList, getDocLinksCount, getDomainIDs, getDouble, getExistingMboSet, getFlags, getFloat, getIgnoreLockCheck, getInitialValue, getInsertCompanySetId, getInsertItemSetId, getInsertOrganization, getInsertSite, getInt, getKeyValue, getLinesRelationship, getList, getLockedByDisplayName, getLong, getMatchingAttr, getMatchingAttr, getMatchingAttrs, getMaxMessage, getMboData, getMboDataSet, getMboInitialValue, getMboList, getMboSet, getMboSet, getMboSet, getMboValueData, getMboValueData, getMboValueData, getMboValueInfoStatic, getMboValueInfoStatic, getMessage, getMessage, getMessage, getMessage, getMXTransaction, getName, getOrgForGL, getOrgSiteForMaxvar, getOwner, getPropagateKeyFlag, getRecordIdentifer, getSiteOrg, getString, getString, getStringInBaseLanguage, getStringInSpecificLocale, getStringTransparent, getThisMboSet, getUniqueIDName, getUniqueIDValue, getUserInfo, getUserName, hasHierarchyLink, hasLockSaveRights, isAutoKeyed, isBasedOn, isFlagSet, isForDM, isLocked, isLocked, isMasterTenant, isMboLockedByMe, isModified, isModified, isNew, isNull, isOptionGranted, isSelected, isZombie, lock, propagateKeyValue, rollbackToCheckpoint, select, setApplicationError, setApplicationRequired, setAutokeyFields, setCopyDefaults, setDeleted, setESigFieldModified, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlag, setFieldFlags, setFlag, setFlag, setFlags, setForDM, setIgnoreRecordLockCheck, setMLValue, setModified, setNewMbo, setPropagateKeyFlag, setPropagateKeyFlag, setReferencedMbo, setReferencedMbo, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueNull, setValueNull, sigopGranted, sigopGranted, sigopGranted, sigOptionAccessAuthorized, smartFill, smartFind, smartFind, smartFindByObjectName, smartFindByObjectName, smartFindByObjectNameDirect, startCheckpoint, thisToBeUpdated, toBeAdded, toBeDeleted, toBeSaved, toBeUpdated, toBeValidated, undelete, unlock, unselect, validate, validateAttributes
public InvCost(MboSet ms) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public void add() throws MXException, java.rmi.RemoteException
Attribute Name | Attribute Value |
---|---|
AVGCOST | 0(zero) |
STDCOST | 0(zero) |
LASTCOST | 0(zero) |
add
in interface MboRemote
add
in class Mbo
MXException
- MXAccessException thrown when the the
user does not have privileges to add a cost to a storeroom.java.rmi.RemoteException
public void init() throws MXException
init
in class Mbo
none
- none
MXException
public void appValidate() throws MXException, java.rmi.RemoteException
appValidate
in class Mbo
MXException
java.rmi.RemoteException
public void updateAverageCost(double quantity, double totalvalue, double exr) throws MXException, java.rmi.RemoteException
quantity
- QUANTITY (in Issueunits) by which the CURBAL
is being increasedtotalvalue
- The TOTALVALUE of the QUANTITY (LOADEDCOST)exr
- EXR - The exchangerate applicable from this
transaction to basecurrencyMXException
java.rmi.RemoteException
public void updateLastCost(double value) throws MXException, java.rmi.RemoteException
value
- the most recent purchase cost of the itemMXException
java.rmi.RemoteException
public MboRemote adjustAverageCost(double newcost) throws MXException, java.rmi.RemoteException
newcost
- The NEWCOST i.e. the new value of the average
cost for the item-storeroom-conditioncode, in the currency units corresponding to
BASE1MXException
- Generates an MXAccessException if the
user does not have the privileges to perform this transaction.MXApplicationException
- thrown if the item is capitalized or if the
new cost is the same as the old costjava.rmi.RemoteException
public MboRemote adjustStandardCost(double newcost) throws MXException, java.rmi.RemoteException
newcost
- The NEWCOST i.e. the new value of the standard
cost for the item-storeroom-conditioncode, in the currency units corresponding
to BASE1MXException
- Generates an MXAccessException if the
user does not have the privileges to perform this transaction.
MXApplicationException thrown if the item is capitalized or if the
new cost is the same as the old costjava.rmi.RemoteException
public double getDefaultIssueCost() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public void canDelete() throws MXException, java.rmi.RemoteException
canDelete
in class Mbo
MXAccessException
MXApplicationException
MXException
java.rmi.RemoteException
public void modify() throws MXException, java.rmi.RemoteException
Mbo
modify
in class Mbo
MXException
java.rmi.RemoteException