public class InvoiceCost extends Mbo implements InvoiceCostRemote
See Invoice Package description.
The key attributes for this object are InvoiceNum, InvoiceLineNum and CostLineNum.
The attributes in this object are as follows:
Attribute Name | Attribute Description |
---|---|
ChargeStore | Yes/No field. Yes indicates that the cost for this line item should be accumulated in the Inventory Cost field on the asset with which this line is associated. |
CostLineNum | Unique system generated invoice cost line number. |
AssetNum | The asset to which costs for the service should to be charged.
Foreign key to Asset .
|
FinCntrlID | Financial Control Identifier. |
GLCreditAcct | The general ledger account code to be credited for this cost distribution line. |
GLDebitAcct | The general ledger account code to be debited the cost of this invoice line item, taken from the PO line (if one is specified). |
InvoiceLineNum | The invoice line number to which this invoice cost line is associated. |
InvoiceNum | Identifier of the invoice. |
LineCost | The amount to be charged to the work order, location, asset, or debit GL account, named for this line. |
Location | Location where the materials and services were used,
displayed from the PO line.
Foreign key to Location .
|
Memo | Note entered by user regarding this distribution. |
OrgID | Organization Identifier. |
Percentage | The percent of invoice line cost represented by the cost distribution line you are entering. |
Quantity | The quantity to be charged to the work order, location, asset, or debit GL account, named for this line. |
RefWO | The referenced work order number |
SiteID | Site Identifier. |
TaskID | The work order's task id associated with this line item. |
UnitCost | Cost per unit of the item, displayed from the invoice line. |
Vendor | Supplier of the invoice.
Foreign key to Company .
|
WONum | Work order number to be charged.
Foreign key to WO .
|
ICT1 - ICT3 | Extra fields. |
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 |
---|
InvoiceCost(MboSet ms)
Construct the InvoiceCost object
|
Modifier and Type | Method and Description |
---|---|
void |
add()
This is called when a new invoice cost is added to the InvoiceCost MboSet collection.
|
void |
appValidate()
Pre-save validation method.
|
void |
canDelete()
Can this invoiceCost be deleted?
It cannot be deleted if it is readonly and also if it is not the only
invoicecost for this invoiceline.
|
void |
checkWOAssetLocGLDebitForCost()
If at least one of the following: WONUM, LOCATION, ASSETNUM or GLDEBITACCT does not have a value, and the
related invoiceline does not have an item belonging to a storeroom, return error.
|
void |
clearInvCostPOLine()
Clear the fields copied from poline on deleting the polinenum
on the InvoiceLine.
|
MboRemote |
createReceipt()
This function is called first when a receipt is created for a invoicecost line.
|
void |
createReceiptForProrate()
Create material receipt for prorated cost of the invoice line, if updateinventory is true and
there are balance in the storeroom, which its invoice cost
is not distributed.
|
void |
delete(long accessModifier)
Delete the invoicecost record after checking if it can be deleted.
|
java.lang.String[] |
getValidateOrder()
Validation Order for InvoiceCost attributes.
|
boolean |
hasReceipt()
Does this invoicecost has the corresponding receipt?
|
void |
init()
Initialized Invoice cost mbo.
|
boolean |
isEditabilitySetByPO()
Method to indicate if the editibility of the invoice cost fields should be
set based on the corresponding poline info.
|
void |
setReadonly()
convenient function to set certain fields to readonly or not.
|
MboRemote |
writeToInvoiceMatch(MboRemote receipt)
Write the invoicematch between the cost and the receipt.
|
MboRemote |
writeToInvoiceMatch(MboRemote receipt,
double qty,
double cost)
This method writes the invoice match between this cost line and the
receipt specified.
|
addMboSetForRequiredCheck, addToDeleteForInsertList, andEvaluateConditions, blindCopy, checkFieldAccess, checkMethodAccess, checkMethodAccess, checkQualifiedRestriction, checkSiteOrgAccessForSave, clear, copy, copy, copy, copyFake, copyValue, copyValue, createComm, 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, 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, modify, 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, 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 InvoiceCost(MboSet ms) throws java.rmi.RemoteException
java.rmi.RemoteException
public void init() throws MXException
init
in class Mbo
MXException
public void add() throws MXException, java.rmi.RemoteException
Attribute Name | Attribute Value |
---|---|
chargestore | No |
costlinenum | Add one to the existing maximum value |
glcreditacct | Vendor's apsuspenseacc(if applicable) |
invoicenum | Owner Invoice's invoicenum |
linecost | Owner InvoiceLine's linecost |
percentage | 100 |
quantity | Owner InvoiceLine's quantity |
unitcost | Owner InvoiceLine's unitcost |
vendor | Owner InvoiceLine's vendor |
add
in interface MboRemote
add
in class Mbo
MXException
java.rmi.RemoteException
public void canDelete() throws MXException, java.rmi.RemoteException
canDelete
in class Mbo
MXException
java.rmi.RemoteException
public void delete(long accessModifier) throws MXException, java.rmi.RemoteException
delete
in interface MboRemote
delete
in class Mbo
accessModifier
- The bitwise flag specified to determine
if certain normal security checks are to be
bypassed for this delete request.
For example:
if the accessModifer is NOACCESSCHECK, then the
check for the object's NODELETE flag and the
call to the object's canDelete() method
will not be performed.
If the accessModifer is NONE, then all the
access checks are performed before this object
is marked delete.MXException
java.rmi.RemoteException
Mbo.delete(long)
public void clearInvCostPOLine() throws MXException, java.rmi.RemoteException
clearInvCostPOLine
in interface InvoiceCostRemote
MXException
java.rmi.RemoteException
public MboRemote createReceipt() throws MXException, java.rmi.RemoteException
createReceipt
in interface InvoiceCostRemote
MXException
java.rmi.RemoteException
public void createReceiptForProrate() throws MXException, java.rmi.RemoteException
createReceiptForProrate
in interface InvoiceCostRemote
MXException
java.rmi.RemoteException
public boolean hasReceipt() throws MXException, java.rmi.RemoteException
hasReceipt
in interface InvoiceCostRemote
MXException
java.rmi.RemoteException
public MboRemote writeToInvoiceMatch(MboRemote receipt, double qty, double cost) throws MXException, java.rmi.RemoteException
writeToInvoiceMatch
in interface InvoiceCostRemote
The
- receipt which is the match or one of the matches of the
invoiceline.qty
- matched quantity in invoice's order unit.coust
- matched cost in invoice's currency.MXException
java.rmi.RemoteException
overloaded form which the invoicecost
is completely matched with only the receipt specified.
public MboRemote writeToInvoiceMatch(MboRemote receipt) throws MXException, java.rmi.RemoteException
writeToInvoiceMatch
in interface InvoiceCostRemote
MXException
java.rmi.RemoteException
public void setReadonly() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public boolean isEditabilitySetByPO() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public void appValidate() throws MXException, java.rmi.RemoteException
appValidate
in class Mbo
MXApplicationException
- (invoice, WOAssetLocGLDebitNull) One of the following does
not have a value: wonum, assetnum, location, or gldebitacct.MXException
java.rmi.RemoteException
public java.lang.String[] getValidateOrder()
getValidateOrder
in class Mbo
public void checkWOAssetLocGLDebitForCost() throws MXException, java.rmi.RemoteException
checkWOAssetLocGLDebitForCost
in interface InvoiceCostRemote
MXException
java.rmi.RemoteException
checkWOAssetLocGLDebitForCost()