Package com.storedobject.core
Interface LedgerEntry
-
Method Summary
Modifier and TypeMethodDescriptionForeign currency amount of this entry.Get the balance in the account after this entry is counted.default int
Certain external systems still follows batch processing and the entry may have a batch number.getDate()
Date of this entry.default int
Get the entry serial number.default Id
Get the transaction Id that created this entry.Local currency amount of this entry.Get the local currency balance in the account after this entry is counted.default Money
Get the opening balance in local currency in the account at this entry (before effecting transaction of this entry).default Money
Get the opening balance in the account at this entry (before effecting transaction of this entry).Transaction particulars (narration) of this entry.default String
getParticulars
(boolean includeValueDatedDetails) Transaction particulars (narration) of this entry.default String
Returns the reference of the entry.default String
getType()
Return a short-string representing the type of the entry.default Date
Value-date of this entry.default JournalVoucher
Get the voucher for this entry.default List
<JournalVoucher> Get the vouchers for this transaction.default boolean
Check if this entry is created by the given foreign financial system.default boolean
Check if this entry is not yet posted on the ledger in the DB.default String
String representation of this entry.
-
Method Details
-
getDate
-
getValueDate
-
getAmount
-
getLocalCurrencyAmount
-
getBalance
-
getLocalCurrencyBalance
Money getLocalCurrencyBalance()Get the local currency balance in the account after this entry is counted.- Returns:
- Local currency balance.
-
getOpeningBalance
Get the opening balance in the account at this entry (before effecting transaction of this entry).- Returns:
- Opening balance.
-
getLocalCurrencyOpeningBalance
Get the opening balance in local currency in the account at this entry (before effecting transaction of this entry).- Returns:
- Local currency opening balance.
-
getParticulars
String getParticulars()Transaction particulars (narration) of this entry.- Returns:
- Transaction particulars.
-
getParticulars
Transaction particulars (narration) of this entry.- Parameters:
includeValueDatedDetails
- Whether to include value-dated details or not.- Returns:
- Transaction particulars.
-
getEntrySerial
default int getEntrySerial()Get the entry serial number.- Returns:
- Entry serial number.
-
getLedgerTran
Get the transaction Id that created this entry. (This is not available in external systems).- Returns:
- Transaction Id.
-
getVoucher
Get the voucher for this entry. (This is not available in external systems).- Returns:
- Voucher.
-
getVouchers
Get the vouchers for this transaction. The first entry in the list will be the voucher for this entry.Note: This could return an empty list if the voucher is not available in the current implementation.
- Returns:
- List of journal vouchers.
-
toDisplay
String representation of this entry.- Returns:
- A string representation suitable for human-friendly display.
-
isUnposted
default boolean isUnposted()Check if this entry is not yet posted on the ledger in the DB. This is always false in the case of SO platform. However, if you are abstracting away entries from external systems, it may contain un-posted entries.- Returns:
- The default implementation always returns
false
.
-
getType
Return a short-string representing the type of the entry. In SO platform, this is available only if aTransactionType
is set while posting the entry.In some external system, it could be numeric value but the String representation will be returned by this method even though it is a bit inefficient.
- Returns:
- A short-string representing the transaction. Otherwise,
null
is returned.
-
getBatchNumber
default int getBatchNumber()Certain external systems still follows batch processing and the entry may have a batch number. This method returns that number.SO platform is not batch-based and returns -1 from this method.
- Returns:
- Batch number for batch-based systems and -1 if not batch-based or not available.
-
isCreatedBy
Check if this entry is created by the given foreign financial system.- Parameters:
ffs
- Foreign financial system. If null, we are checking if it is created by the SO platform.- Returns:
- True if created by the given foreign financial system.
-
getReference
-