49 #define GNC_TYPE_SPLIT (gnc_split_get_type ()) 50 #define GNC_SPLIT(o) \ 51 (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_SPLIT, Split)) 52 #define GNC_SPLIT_CLASS(k) \ 53 (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_SPLIT, SplitClass)) 54 #define GNC_IS_SPLIT(o) \ 55 (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_SPLIT)) 56 #define GNC_IS_SPLIT_CLASS(k) \ 57 (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_SPLIT)) 58 #define GNC_SPLIT_GET_CLASS(o) \ 59 (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_SPLIT, SplitClass)) 60 GType gnc_split_get_type(
void);
84 gnc_numeric xaccSplitConvertAmount (
const Split *split,
const Account * account);
101 void xaccSplitReinit(Split * split);
141 void xaccSplitSetAccount (Split *s,
Account *acc);
145 void xaccSplitSetParent (Split *split, Transaction *trans);
282 const gnc_commodity * base_currency);
291 const gnc_commodity * base_currency);
353 gboolean check_guids,
354 gboolean check_balances,
355 gboolean check_txn_splits);
361 #define xaccSplitLookupDirect(g,b) xaccSplitLookup(&(g),b) 421 gint xaccSplitOrderDateOnly (
const Split *sa,
const Split *sb);
471 #ifdef DUMP_FUNCTIONS 472 void xaccSplitDump (
const Split *split,
const char *tag);
528 #define SPLIT_DATE_RECONCILED "date-reconciled" 529 #define SPLIT_BALANCE "balance" 530 #define SPLIT_CLEARED_BALANCE "cleared-balance" 531 #define SPLIT_RECONCILED_BALANCE "reconciled-balance" 532 #define SPLIT_MEMO "memo" 533 #define SPLIT_ACTION "action" 534 #define SPLIT_RECONCILE "reconcile-flag" 535 #define SPLIT_AMOUNT "amount" 536 #define SPLIT_SHARE_PRICE "share-price" 537 #define SPLIT_VALUE "value" 538 #define SPLIT_TYPE "type" 539 #define SPLIT_VOIDED_AMOUNT "voided-amount" 540 #define SPLIT_VOIDED_VALUE "voided-value" 541 #define SPLIT_LOT "lot" 542 #define SPLIT_TRANS "trans" 543 #define SPLIT_ACCOUNT "account" 544 #define SPLIT_ACCOUNT_GUID "account-guid" 546 #define SPLIT_ACCT_FULLNAME "acct-fullname" 547 #define SPLIT_CORR_ACCT_NAME "corr-acct-fullname" 548 #define SPLIT_CORR_ACCT_CODE "corr-acct-code" 552 #define xaccSplitGetGUID(X) qof_entity_get_guid(QOF_INSTANCE(X)) void xaccSplitSetValue(Split *split, gnc_numeric value)
The xaccSplitSetValue() method sets the value of this split in the transaction's commodity.
gnc_numeric xaccSplitGetClearedBalance(const Split *split)
The cleared-balance is the currency-denominated balance of all transactions that have been marked as ...
gint xaccSplitOrder(const Split *sa, const Split *sb)
The xaccSplitOrder(sa,sb) method is useful for sorting.
void xaccSplitAddPeerSplit(Split *split, const Split *other_split, const time64 timestamp)
Add a peer split to this split's lot-split list.
void xaccSplitSetBaseValue(Split *split, gnc_numeric value, const gnc_commodity *base_currency)
Depending on the base_currency, set either the value or the amount of this split or both: If the base...
void xaccSplitSetAction(Split *split, const char *action)
The Action is an arbitrary user-assigned string.
void xaccSplitMakeStockSplit(Split *s)
Mark a split to be of type stock split - after this, you shouldn't modify the value anymore...
int xaccSplitCompareAccountCodes(const Split *sa, const Split *sb)
Compare two splits by code of account.
gnc_numeric xaccSplitGetReconciledBalance(const Split *split)
Returns the reconciled-balance of this split.
gboolean xaccSplitDestroy(Split *split)
Destructor.
void xaccSplitCopyOnto(const Split *from_split, Split *to_split)
This is really a helper for xaccTransCopyOnto.
char xaccSplitGetReconcile(const Split *split)
Returns the value of the reconcile flag.
void xaccSplitSetReconcile(Split *split, char reconciled_flag)
Set the reconcile flag.
Transaction * xaccSplitGetParent(const Split *split)
Returns the parent transaction of the split.
void xaccSplitRemovePeerSplit(Split *split, const Split *other_split)
Remove a peer split from this split's lot-split list.
int xaccSplitCompareOtherAccountFullNames(const Split *sa, const Split *sb)
Compare two splits by full name of the other account.
QofBook * xaccSplitGetBook(const Split *split)
Returns the book of this split, i.e.
gnc_numeric xaccSplitGetBalance(const Split *split)
Returns the running balance up to and including the indicated split.
int xaccSplitCompareAccountFullNames(const Split *sa, const Split *sb)
Compare two splits by full name of account.
gboolean xaccSplitEqual(const Split *sa, const Split *sb, gboolean check_guids, gboolean check_balances, gboolean check_txn_splits)
Equality.
gboolean xaccSplitHasPeers(const Split *split)
Does this split have peers?
void xaccSplitMergePeerSplits(Split *split, const Split *other_split)
Merge the other_split's peer splits into split's peers.
gnc_numeric xaccSplitVoidFormerAmount(const Split *split)
Returns the original pre-void amount of a split.
Split * xaccSplitLookup(const GncGUID *guid, QofBook *book)
The xaccSplitLookup() subroutine will return the split associated with the given id, or NULL if there is no such split.
void xaccSplitSetAmount(Split *split, gnc_numeric amount)
The xaccSplitSetAmount() method sets the amount in the account's commodity that the split should have...
gnc_numeric xaccSplitVoidFormerValue(const Split *split)
Returns the original pre-void value of a split.
void xaccSplitSetMemo(Split *split, const char *memo)
The memo is an arbitrary string associated with a split.
int xaccSplitCompareOtherAccountCodes(const Split *sa, const Split *sb)
Compare two splits by code of the other account.
void xaccSplitSetSharePriceAndAmount(Split *split, gnc_numeric price, gnc_numeric amount)
The xaccSplitSetSharePriceAndAmount() method will simultaneously update the share price and the numbe...
gnc_numeric xaccSplitGetNoclosingBalance(const Split *split)
The noclosing-balance is the currency-denominated balance of all transactions except 'closing' transa...
gboolean xaccSplitIsPeerSplit(const Split *split, const Split *other_split)
Report if a split is a peer of this one.
char * xaccSplitGetCorrAccountFullName(const Split *sa)
These functions take a split, get the corresponding split on the "other side" of the transaction...
gnc_numeric xaccSplitGetSharePrice(const Split *split)
Returns the price of the split, that is, the value divided by the amount.
All type declarations for the whole Gnucash engine.
gnc_numeric xaccSplitGetBaseValue(const Split *split, const gnc_commodity *base_currency)
Depending on the base_currency, return either the value or the amount of this split: If the base_curr...
Split * xaccMallocSplit(QofBook *book)
Constructor.
const char * xaccSplitGetCorrAccountName(const Split *sa)
document me
void xaccSplitSetLot(Split *split, GNCLot *lot)
Assigns the split to a specific Lot.
void xaccSplitSetDateReconciledSecs(Split *split, time64 time)
Set the date on which this split was reconciled by specifying the time as time64. ...
time64 xaccSplitGetDateReconciled(const Split *split)
Retrieve the date when the Split was reconciled.
gnc_numeric xaccSplitGetValue(const Split *split)
Returns the value of this split in the transaction's commodity.
Account * xaccSplitGetAccount(const Split *split)
Returns the account of this split, which was set through xaccAccountInsertSplit().
const char * xaccSplitGetCorrAccountCode(const Split *sa)
document me
Split * xaccSplitGetOtherSplit(const Split *split)
The xaccSplitGetOtherSplit() is a convenience routine that returns the other of a pair of splits...
void xaccSplitSetSharePrice(Split *split, gnc_numeric price)
const char * xaccSplitGetMemo(const Split *split)
Returns the memo string.
const char * xaccSplitGetAction(const Split *split)
Returns the action string.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
const char * xaccSplitGetType(const Split *s)
The xaccIsPeerSplit() is a convenience routine that returns TRUE (a non-zero value) if the two splits...
The type used to store guids in C.
Commodity handling public routines.
GNCLot * xaccSplitGetLot(const Split *split)
Returns the pointer to the debited/credited Lot where this split belongs to, or NULL if it doesn't be...
gnc_numeric xaccSplitGetAmount(const Split *split)
Returns the amount of the split in the account's commodity.