public final class SplitTxn extends AbstractTxn
BANK_TRANSACTION_TYPE, SPLIT_TRANSACTION_TYPE, STATUS_CLEARED, STATUS_RECONCILING, STATUS_UNRECONCILED, TAG_FI_ID, TAG_FITID_PREFIX, TAG_INVST_SPLIT_EXP, TAG_INVST_SPLIT_FEE, TAG_INVST_SPLIT_INC, TAG_INVST_SPLIT_SEC, TAG_INVST_SPLIT_TYPE, TAG_INVST_SPLIT_XFR, TAG_IS_NEW_TXN, TAG_ONLINE_PMT_ID, TAG_QIF_IMPORT_SESSION, TAG_QIF_INVST_ACTION, TAG_RECON_ASOFDT, TAG_RECON_DATE, TAG_SPLIT_ADDED, TAG_SPLIT_AMOUNT, TAG_SPLIT_CALC, TAG_SPLIT_PAIR, TRANSFER_TYPE_BANK, TRANSFER_TYPE_BUYSELL, TRANSFER_TYPE_BUYSELLXFR, TRANSFER_TYPE_DIVIDEND, TRANSFER_TYPE_DIVIDENDXFR, TRANSFER_TYPE_MISCINCEXP, TRANSFER_TYPE_SHORTCOVER| Constructor and Description |
|---|
SplitTxn(ParentTxn parentTxn,
long parentAmount,
double rate,
Account account,
java.lang.String description,
long txnId,
byte status)
Deprecated.
Please use the other constructor
|
SplitTxn(ParentTxn parentTxn,
long parentAmount,
long splitAmount,
double rate,
Account account,
java.lang.String description,
long txnId,
byte status)
Creates a SplitTxn with the parentAmount having a negative effect on the
account of parentTxn, and splitAmount having a positive effect on the
account of this SplitTxn.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getAmount()
Get the amount of this transaction in terms of the
currency of the parent transaction.
|
java.lang.String |
getCheckNumber()
Get the checknumber associated with this transaction.
|
long |
getDate()
Deprecated.
use getDateInt() instead!
|
long |
getDateEntered()
Get the date that this transaction was entered.
|
int |
getDateInt()
Get the date of this transaction
|
Txn |
getFlipSide()
Return the 'flip side' of this split transaction.
|
AbstractTxn |
getOtherTxn(int i)
Return the "other transaction" for this split.
|
int |
getOtherTxnCount()
Return the number of "other transactions".
|
long |
getParentAmount()
Get the amount of this transaction in terms of the
currency of the parent transaction.
|
ParentTxn |
getParentTxn()
Get the ParentTxn for which this is a split.
|
double |
getRate()
Get the rate for the transaction.
|
long |
getTaxDate()
Deprecated.
use getTaxDateInt() instead!
|
int |
getTaxDateInt()
Get the date of this transaction for tax purposes.
|
java.lang.String |
getTransferType()
Get the type of transaction.
|
long |
getValue()
Get the amount that this transaction affects the account of the this transaction.
|
boolean |
isTransferTo(Account acct)
Check whether or not this transaction includes a transfer
to the given account.
|
void |
negateAmount()
Reverses the sign of the amount of the split
|
void |
setAmount(long newAmount)
Set the amount that this split affects the -other- side of the transaction.
|
void |
setAmount(long newSplitAmount,
double newRate,
long newParentAmount)
Set the amounts for this transaction, including the amount of the
transaction in the split account, the rate, and the amount of the
transaction in the account of the parent transaction.
|
void |
setAmount(long newSplitAmount,
long newParentAmount)
Set the amounts for this transaction, including the amount of the
transaction in the split account, and the amount of the transaction
in the account of the parent transaction.
|
void |
setCheckNumber(java.lang.String newCheckNumber) |
void |
setParentAmount(double newRate,
long newParentAmount)
Set the amount of the transaction in the parent account.
|
void |
setRate(double newRate) |
void |
takeAmounts(SplitTxn split)
Take the amount and rates from the given split.
|
void |
takeValuesFrom(SplitTxn otherTxn) |
java.lang.String |
toString() |
getAccount, getCheckNumAsInt, getDescription, getFIID, getFiTxnId, getStatus, getStatusChar, getTag, getTag, getTags, getTxnId, isDirty, isNew, needsToBePrinted, removeTag, resetDirty, setAccount, setDescription, setDirty, setFIID, setFiTxnId, setIsNew, setStatus, setTag, setTags, wasDownloadedpublic SplitTxn(ParentTxn parentTxn, long parentAmount, double rate, Account account, java.lang.String description, long txnId, byte status)
public SplitTxn(ParentTxn parentTxn, long parentAmount, long splitAmount, double rate, Account account, java.lang.String description, long txnId, byte status)
public ParentTxn getParentTxn()
getParentTxn in interface TxngetParentTxn in class AbstractTxnpublic long getDate()
getDate in class AbstractTxnpublic long getDateEntered()
getDateEntered in interface TxngetDateEntered in class AbstractTxnpublic long getTaxDate()
getTaxDate in class AbstractTxnpublic int getDateInt()
getDateInt in interface TxngetDateInt in class AbstractTxnpublic int getTaxDateInt()
getTaxDateInt in interface TxngetTaxDateInt in class AbstractTxnpublic long getParentAmount()
public long getAmount()
public long getValue()
getValue in interface TxngetValue in class AbstractTxnpublic boolean isTransferTo(Account acct)
isTransferTo in interface TxnisTransferTo in class AbstractTxnpublic double getRate()
public java.lang.String getTransferType()
getTransferType in interface TxngetTransferType in class AbstractTxnpublic void setParentAmount(double newRate,
long newParentAmount)
public void negateAmount()
public void takeAmounts(SplitTxn split)
public final void takeValuesFrom(SplitTxn otherTxn)
public void setAmount(long newSplitAmount,
long newParentAmount)
public void setAmount(long newSplitAmount,
double newRate,
long newParentAmount)
public void setAmount(long newAmount)
public void setRate(double newRate)
public final java.lang.String getCheckNumber()
AbstractTxngetCheckNumber in interface TxngetCheckNumber in class AbstractTxnpublic final void setCheckNumber(java.lang.String newCheckNumber)
public int getOtherTxnCount()
getOtherTxnCount in interface TxngetOtherTxnCount in class AbstractTxnpublic AbstractTxn getOtherTxn(int i)
getOtherTxn in interface TxngetOtherTxn in class AbstractTxnpublic Txn getFlipSide()
public java.lang.String toString()
toString in class java.lang.Object