Class InventoryGRN
- All Implemented Interfaces:
Displayable,StringFiller,HasChildren,HasId,HasReference,OfEntity,TriggerChangeEvent
- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.storedobject.core.HasReference
HasReference.Amend<T extends StoredObject> -
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic String[]voidclose(Transaction transaction) static voidvoidCompute/recompute the landed cost.voidcomputeTax(TransactionManager tm, TaxRegion region) voidcorrectExchangeRate(Transaction transaction, Rate exchangeRate) getDate()intgetNo()intstatic String[]getStore()Get the prefix of the tag to be used for generating the reference.getTotal()intgetType()static String[]static voidbooleanisApplicable(LandedCostType landedCostType) Is a specific type of landed cost applicable to this GRN?booleanisClosed()booleanstatic String[]links()voidprocess(Transaction transaction) static String[]static String[]voidsetCurrency(String currency) voidsetCurrencyObject(Currency currency) voidvoidsetExchangeRate(Rate exchangeRate) voidsetExchangeRate(Object value) voidsetInvoiceDate(Date invoiceDate) voidsetInvoiceNumber(String referenceNumber) voidsetLandedCost(Money landedCost) voidsetLandedCost(Object moneyValue) voidsetNo(int no) voidsetReferenceNumber(String referenceNumber) voidsetStatus(int status) voidvoidsetStore(InventoryStore store) voidsetStore(BigDecimal idValue) voidsetSupplier(Entity supplier) voidsetSupplier(Id supplierId) voidsetSupplier(BigDecimal idValue) voidsetType(int type) toString()String representation of the instance.voidvalidateChildAttach(StoredObject child, int linkType) Do validation when a child is attached.voidvalidateChildUpdate(StoredObject child, int linkType) Do validation when a child is updated.voidThe system will invoke this whenever the object is saved to the DB.voidThis method will be invoked whenever an existing instance is deleted from the database.voidThis method will be invoked whenever an existing instance is updated in the database.Methods inherited from class com.storedobject.core.StoredObject
addLink, addLink, addLink, addLink, addLink, addLink, addLink, addLink, checkCurrency, checkCurrency, checkForDuplicate, checkForDuplicate, checkTimeZone, checkTransaction, clearObjectLinks, contemporary, copy, copy, count, count, count, count, count, count, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countLinks, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, countMasters, create, created, delete, delete, delete, deleted, directUpdate, equals, exists, exists, exists, exists, exists, existsFileData, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLink, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsLinks, existsMaster, existsMaster, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, existsMasters, family, family, family, family, fill, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getActor, getAttachment, getAttachmentId, getChildren, getContemporaryOf, getDeleted, getDeleted, getExistsCondition, getExistsCondition, getFileData, getFileData, getHistorical, getId, getKeyIndex, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getMaster, getNotExistsCondition, getNotExistsCondition, getParent, getParent, getParent, getParentId, getParentId, getParentId, getRelated, getRelated, getTransaction, getTransactionId, getTransactionIP, getUnique, getUniqueCondition, hashCode, inserted, isModified, isVirtual, list, list, list, list, list, list, list, list, list, list, list, list, list, listDeletedIds, listFileData, listFileData, listHistory, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listLinks, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listMasters, listTree, listTree, listTree, listTree, listViaQuery, listViaQuery, load, load, load, load, loadAttributesFrom, loaded, loading, makeNew, makeVirtual, migrate, moduleName, nextVersion, objectLink, objectLink, objectLink, objectLinks, objectLinks, old, person, previousVersion, previousVersion, query, query, query, query, query, query, query, query, query, query, query, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryLinks, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, queryMasters, reload, reload, reloaded, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeAllLinks, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeLink, removeReverseLinks, removeReverseLinks, save, save, save, save, save, save, save, save, save, save, save, save, save, save, save, saved, saving, setMaster, setRawValue, setTransaction, stringify, tableName, timestamp, toCode, toDisplay, transacting, undelete, undelete, undeleted, updated, user, userId, validate, validateChildDetach, validateInsert, validateParentAttach, validateParentDetach, validateParentUpdate, validateUndelete, valueEqualsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.storedobject.core.HasReference
getAmend, getTagSuffix, serialTagMethods inherited from interface com.storedobject.core.OfEntity
check, findSystemEntityId, setSystemEntityMethods inherited from interface com.storedobject.core.TriggerChangeEvent
changeCode
-
Constructor Details
-
InventoryGRN
public InventoryGRN()
-
-
Method Details
-
columns
-
protectedColumns
-
browseColumns
-
indices
-
searchColumns
-
links
-
setNo
public void setNo(int no) -
getNo
- Specified by:
getNoin interfaceHasReference
-
getSystemEntity
- Specified by:
getSystemEntityin interfaceHasReference- Specified by:
getSystemEntityin interfaceOfEntity
-
getSystemEntityId
- Specified by:
getSystemEntityIdin interfaceHasReference- Specified by:
getSystemEntityIdin interfaceOfEntity
-
getReference
- Specified by:
getReferencein interfaceHasReference
-
getTagPrefix
Description copied from interface:HasReferenceGet the prefix of the tag to be used for generating the reference.Warning: This should be a fixed string value.
- Specified by:
getTagPrefixin interfaceHasReference- Returns:
- A fixed tag value to be used as the prefix.
-
setDate
-
getDate
-
setReferenceNumber
-
getReferenceNumber
-
setInvoiceNumber
-
getInvoiceNumber
-
setInvoiceDate
-
getInvoiceDate
-
setStore
-
setStore
-
setStore
-
getStoreId
-
getStore
-
setSupplier
-
setSupplier
-
setSupplier
-
getSupplierId
-
getSupplier
-
getStatusValues
-
setStatus
public void setStatus(int status) -
getStatus
-
getStatusValue
-
getTypeValues
-
setType
public void setType(int type) -
getType
-
getTypeValue
-
setLandedCost
-
setLandedCost
-
getLandedCost
-
setCurrency
-
getCurrency
-
setCurrencyObject
-
getCurrencyObject
-
setExchangeRate
-
setExchangeRate
-
getExchangeRate
-
isProcessed
public boolean isProcessed() -
isClosed
public boolean isClosed() -
validateData
Description copied from class:StoredObjectThe system will invoke this whenever the object is saved to the DB. It will be invoked in all cases while creating new objects and updating/deleting/undeleting existing objects. If any exception is raised by this method, the process of saving to the DB will be abandoned.
Note: This method is mainly used to validate the data of all attributes of the object, and it may be used by others for validating the object. For example, front-end data-entry systems can use this method for validating the object.
- Overrides:
validateDatain classStoredObject- Parameters:
tm- Current transaction manager.- Throws:
Exception- If data is invalid.
-
validateDelete
Description copied from class:StoredObjectThis method will be invoked whenever an existing instance is deleted from the database. So, it will be called within an active transaction. Child classes can override this method to do validation when an existing instance is deleted from the database.Note: When overridden "super" should be called, otherwise, a "design error" will occur.
Also, see
StoredObject.validate().- Overrides:
validateDeletein classStoredObject- Throws:
Exception- By raising an exception from this method, the current transaction can be abandoned.
-
validateUpdate
Description copied from class:StoredObjectThis method will be invoked whenever an existing instance is updated in the database. So, it will be called within an active transaction. Child classes can override this method to do validation when an existing instance is updated in the database.Note: When overridden "super" should be called, otherwise, a "design error" will occur.
Also, see
StoredObject.validate().- Overrides:
validateUpdatein classStoredObject- Throws:
Exception- By raising an exception from this method, the current transaction can be abandoned.
-
validateChildAttach
Description copied from class:StoredObjectDo validation when a child is attached.Note: This method will be invoked only if this class implements
HasChildren.- Overrides:
validateChildAttachin classStoredObject- Parameters:
child- Child to validate.linkType- Link type.- Throws:
Exception- By raising an exception from this method, the current transaction can be abandoned.
-
validateChildUpdate
Description copied from class:StoredObjectDo validation when a child is updated. Default implementation of this invokesStoredObject.validateChildAttach(StoredObject, int).Note: This method will be invoked only if this class implements
HasChildren.- Overrides:
validateChildUpdatein classStoredObject- Parameters:
child- Child to validate.linkType- Link type.- Throws:
Exception- By raising an exception from this method, the current transaction can be abandoned.
-
getSupplierInvoice
-
process
- Throws:
Exception
-
close
- Throws:
Exception
-
toString
Description copied from class:StoredObjectString representation of the instance. Mostly used for logging purposes.- Overrides:
toStringin classStoredObject- Returns:
- String representation of the instance.
-
isApplicable
Is a specific type of landed cost applicable to this GRN?- Parameters:
landedCostType- Type of landed cost.- Returns:
- True/false.
-
computeLandedCost
Compute/recompute the landed cost.- Parameters:
tm- Transaction manager.- Throws:
Exception- If any error occurs.
-
getAmount
-
getTotal
-
computeTax
- Throws:
Exception
-
actionPrefixForUI
-
correctExchangeRate
- Throws:
Exception
-