Class Invoice
- All Implemented Interfaces:
Displayable
,StringFiller
,Financial
,HasId
,OfEntity
,TradeType
- Direct Known Subclasses:
CustomerInvoice
,SupplierInvoice
-
Field Summary
Fields inherited from class com.storedobject.core.StoredObject
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPayment
(Money amount, Transaction transaction) void
addPayment
(Money amount, TransactionManager tm) static String[]
static void
final AccountConfiguration
getDate()
boolean
abstract String
getParty()
int
static String
getPaymentStatusValue
(int value) static String[]
boolean
getTotal()
int
getType()
Retrieves the type of the invoice.final boolean
Checks if the ledger is already posted.protected String
final void
postLedger
(TransactionManager transactionManager) Posts ledger transactions using the provided TransactionManager.protected void
postTax
(JournalVoucher journalVoucher) static String[]
static void
readOnlyColumns
(ColumnNames columnNames) void
saved()
This method is invoked whenever an instance is saved/deleted/resurrected.void
void
void
void
setExchangeRate
(Rate exchangeRate) void
setExchangeRate
(Object value) void
setFromInventory
(boolean fromInventory) void
setParty
(EntityAccount party) void
void
setParty
(BigDecimal idValue) void
setPayment
(Money payment) void
setPayment
(Money amount, Transaction transaction) void
setPayment
(Money amount, TransactionManager tm) void
setPayment
(Object moneyValue) void
setPaymentDetail
(String paymentDetail) void
setPaymentStatus
(int paymentStatus) void
setPosted
(boolean posted) void
setSystemEntity
(Id systemEntityId) void
setSystemEntity
(SystemEntity systemEntity) void
setSystemEntity
(BigDecimal idValue) void
void
void
setType
(int type) void
This will be invoked by the system whenever the object is saved to the DB.void
This method will be invoked whenever an existing instance is deleted from the database.void
This 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, fill, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getAttachment, getAttachmentId, getChildren, 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, 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, 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, saving, setMaster, setRawValue, setTransaction, stringify, tableName, timestamp, toCode, toDisplay, toString, transacting, undelete, undelete, undeleted, updated, user, userId, validate, validateChildAttach, validateChildDetach, validateChildUpdate, validateInsert, validateParentAttach, validateParentDetach, validateParentUpdate, validateUndelete, valueEquals
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.storedobject.core.OfEntity
check, findSystemEntityId
-
Constructor Details
-
Invoice
public Invoice()
-
-
Method Details
-
columns
-
protectedColumns
-
browseColumns
-
readOnlyColumns
-
setSystemEntity
- Specified by:
setSystemEntity
in interfaceOfEntity
-
setSystemEntity
-
setSystemEntity
-
getSystemEntityId
- Specified by:
getSystemEntityId
in interfaceOfEntity
-
getSystemEntity
- Specified by:
getSystemEntity
in interfaceOfEntity
-
setType
public void setType(int type) -
getType
Retrieves the type of the invoice.Note: The type should match with the PO type for proper linkage.
-
setDate
-
getDate
-
setParty
-
setParty
-
setParty
-
getPartyId
-
getParty
-
setAmount
-
setAmount
-
getAmount
-
setTotal
-
setTotal
-
getTotal
-
setPosted
public void setPosted(boolean posted) -
getPosted
-
setPayment
-
setPayment
-
getPayment
-
setPaymentDetail
-
getPaymentDetail
-
setPaymentStatus
public void setPaymentStatus(int paymentStatus) -
getPaymentStatus
-
getPaymentStatusValues
-
getPaymentStatusValue
-
getPaymentStatusValue
-
setFromInventory
public void setFromInventory(boolean fromInventory) -
getFromInventory
-
setExchangeRate
-
setExchangeRate
-
getExchangeRate
-
validateData
Description copied from class:StoredObject
This will be invoked by the system whenever the object is saved to the DB. It will be invoked in all cases, while creating new objects and updating/deleting/un-deleting 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:
validateData
in classStoredObject
- Parameters:
tm
- Current transaction manager.- Throws:
Exception
- If data is invalid.
-
saved
Description copied from class:StoredObject
This method is invoked whenever an instance is saved/deleted/resurrected. It can be overridden to take care of any additional actions required by the application.- Overrides:
saved
in classStoredObject
- Throws:
Exception
- When error occurs or invalidate state exists so that transaction will be abandoned.
-
validateUpdate
Description copied from class:StoredObject
This 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:
validateUpdate
in classStoredObject
- Throws:
Exception
- By raising an exception from this method the current transaction can be abandoned.
-
validateDelete
Description copied from class:StoredObject
This 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:
validateDelete
in classStoredObject
- Throws:
Exception
- By raising an exception from this method the current transaction can be abandoned.
-
getConfiguration
-
isLedgerPosted
public final boolean isLedgerPosted()Description copied from interface:Financial
Checks if the ledger is already posted.- Specified by:
isLedgerPosted
in interfaceFinancial
- Returns:
- true if the ledger is already posted, false otherwise.
-
postLedger
Description copied from interface:Financial
Posts ledger transactions using the provided TransactionManager.- Specified by:
postLedger
in interfaceFinancial
- Parameters:
transactionManager
- the TransactionManager used to post the ledger transaction- Throws:
Exception
- if the ledger is already posted
-
postTax
- Throws:
Exception
-
particulars
-
addPayment
- Throws:
Exception
-
addPayment
- Throws:
Exception
-
setPayment
- Throws:
Exception
-
setPayment
- Throws:
Exception
-
getInvoiceNo
-