Files | |
file | Account.h |
Account handling public routines. | |
file | gnc-pricedb.h |
a simple price database for gnucash. | |
file | SchedXaction.h |
Scheduled Transactions public handling routines. | |
file | Transaction.h |
API for Transactions and Splits (journal entries). | |
file | TransLog.h |
API for the transaction logger. | |
Account parameter names | |
#define | ACCOUNT_KVP "kvp" |
#define | ACCOUNT_NAME_ "name" |
#define | ACCOUNT_CODE_ "code" |
#define | ACCOUNT_DESCRIPTION_ "desc" |
#define | ACCOUNT_NOTES_ "notes" |
#define | ACCOUNT_BALANCE_ "balance" |
#define | ACCOUNT_CLEARED_ "cleared" |
#define | ACCOUNT_RECONCILED_ "reconciled" |
#define | ACCOUNT_PRESENT_ "present" |
#define | ACCOUNT_FUTURE_MINIMUM_ "future-minimum" |
#define | ACCOUNT_TAX_RELATED "tax-related-p" |
Split Reconciled field values | |
If you change these be sure to change gnc-ui-util.c:gnc_get_reconciled_str() and associated functions | |
#define | CREC 'c' /**< The Split has been cleared */ |
#define | YREC 'y' /**< The Split has been reconciled */ |
#define | FREC 'f' /**< frozen into accounting period */ |
#define | NREC 'n' /**< not reconciled or cleared */ |
#define | VREC 'v' /**< split is void */ |
Transaction Type field values | |
#define | TXN_TYPE_NONE '\0' /**< No transaction type */ |
#define | TXN_TYPE_INVOICE 'I' /**< Transaction is an invoice */ |
#define | TXN_TYPE_PAYMENT 'P' /**< Transaction is a payment */ |
Split Parameter names | |
Note, if you want to get the equivalent of "ACCT_MATCH_ALL" you need to create a search on the following parameter list: SPLIT->SPLIT_TRANS->TRANS_SPLITLIST->SPLIT_ACCOUNT_GUID. If you do this, you might want to use the ACCOUNT_MATCH_ALL_TYPE as the override so the gnome-search dialog displays the right type. | |
#define | SPLIT_KVP "kvp" |
#define | SPLIT_DATE_RECONCILED "date-reconciled" |
#define | SPLIT_BALANCE "balance" |
#define | SPLIT_CLEARED_BALANCE "cleared-balance" |
#define | SPLIT_RECONCILED_BALANCE "reconciled-balance" |
#define | SPLIT_MEMO "memo" |
#define | SPLIT_ACTION "action" |
#define | SPLIT_RECONCILE "reconcile-flag" |
#define | SPLIT_AMOUNT "amount" |
#define | SPLIT_SHARE_PRICE "share-price" |
#define | SPLIT_VALUE "value" |
#define | SPLIT_TYPE "type" |
#define | SPLIT_VOIDED_AMOUNT "voided-amount" |
#define | SPLIT_VOIDED_VALUE "voided-value" |
#define | SPLIT_LOT "lot" |
#define | SPLIT_TRANS "trans" |
#define | SPLIT_ACCOUNT "account" |
#define | SPLIT_ACCOUNT_GUID "account-guid" /**< for guid_match_all */ |
#define | SPLIT_ACCT_FULLNAME "acct-fullname" |
#define | SPLIT_CORR_ACCT_NAME "corr-acct-fullname" |
#define | SPLIT_CORR_ACCT_CODE "corr-acct-code" |
Transaction Parameter names | |
#define | TRANS_KVP "kvp" |
#define | TRANS_NUM "num" |
#define | TRANS_DESCRIPTION "desc" |
#define | TRANS_DATE_ENTERED "date-entered" |
#define | TRANS_DATE_POSTED "date-posted" |
#define | TRANS_DATE_DUE "date-due" |
#define | TRANS_IMBALANCE "trans-imbalance" |
#define | TRANS_IS_BALANCED "trans-balanced?" |
#define | TRANS_NOTES "notes" |
#define | TRANS_TYPE "type" |
#define | TRANS_VOID_STATUS "void-p" |
#define | TRANS_VOID_REASON "void-reason" |
#define | TRANS_VOID_TIME "void-time" |
#define | TRANS_SPLITLIST "split-list" |
Account Placeholder getters/setters | |
enum | GNCPlaceholderType { PLACEHOLDER_NONE, PLACEHOLDER_THIS, PLACEHOLDER_CHILD } |
gboolean | xaccAccountGetPlaceholder (Account *account) |
void | xaccAccountSetPlaceholder (Account *account, gboolean option) |
GNCPlaceholderType | xaccAccountGetDescendantPlaceholder (Account *account) |
Account Conversion routines | |
Conversion routines for the account types to/from strings that are used in persistant storage, communications. These strings should *not& be translated to the local language. Typical converstion is INCOME -> "INCOME". | |
char * | xaccAccountTypeEnumAsString (GNCAccountType type) |
gboolean | xaccAccountStringToType (const char *str, GNCAccountType *type) |
GNCAccountType | xaccAccountStringToEnum (const char *str) |
Account Constructors/Destructors and Edit/Commit | |
Account * | xaccMallocAccount (GNCBook *book) |
Account * | xaccCloneAccount (const Account *from, GNCBook *book) |
Account * | xaccCloneAccountSimple (const Account *from, GNCBook *book) |
void | xaccAccountBeginEdit (Account *account) |
void | xaccAccountCommitEdit (Account *account) |
void | xaccAccountDestroy (Account *account) |
Account kvp_frame getters/setters | |
kvp_frame * | xaccAccountGetSlots (Account *account) |
void | xaccAccountSetSlots_nc (Account *account, kvp_frame *frame) |
Account GUID subroutines | |
const GUID * | xaccAccountGetGUID (Account *account) |
GUID | xaccAccountReturnGUID (Account *account) |
Account * | xaccAccountLookup (const GUID *guid, GNCBook *book) |
Account * | xaccAccountLookupDirect (GUID guid, GNCBook *book) |
Account general setters/getters | |
void | xaccAccountSetType (Account *account, GNCAccountType) |
void | xaccAccountSetName (Account *account, const char *name) |
void | xaccAccountSetCode (Account *account, const char *code) |
void | xaccAccountSetDescription (Account *account, const char *desc) |
void | xaccAccountSetNotes (Account *account, const char *notes) |
void | xaccAccountSetLastNum (Account *account, const char *num) |
GNCAccountType | xaccAccountGetType (Account *account) |
const char * | xaccAccountGetName (Account *account) |
const char * | xaccAccountGetCode (Account *account) |
const char * | xaccAccountGetDescription (Account *account) |
const char * | xaccAccountGetNotes (Account *account) |
const char * | xaccAccountGetLastNum (Account *account) |
[NOHEADER] | |
void | xaccAccountSetCommodity (Account *account, gnc_commodity *comm) |
gnc_commodity * | xaccAccountGetCommodity (Account *account) |
int | xaccAccountGetCommoditySCU (Account *account) |
int | xaccAccountGetCommoditySCUi (Account *account) |
void | xaccAccountSetCommoditySCU (Account *account, int frac) |
void | xaccAccountSetCommoditySCUandFlag (Account *account, int frac) |
void | xaccAccountSetNonStdSCU (Account *account, gboolean flag) |
gboolean | xaccAccountGetNonStdSCU (Account *account) |
gnc_numeric | xaccAccountGetBalance (Account *account) |
gnc_numeric | xaccAccountGetClearedBalance (Account *account) |
gnc_numeric | xaccAccountGetReconciledBalance (Account *account) |
gnc_numeric | xaccAccountGetPresentBalance (Account *account) |
gnc_numeric | xaccAccountGetProjectedMinimumBalance (Account *account) |
gnc_numeric | xaccAccountGetBalanceAsOfDate (Account *account, time_t date) |
gnc_numeric | xaccAccountConvertBalanceToCurrency (Account *account, gnc_numeric balance, gnc_commodity *balance_currency, gnc_commodity *new_currency) |
gnc_numeric | xaccAccountConvertBalanceToCurrencyAsOfDate (Account *account, gnc_numeric balance, gnc_commodity *balance_currency, gnc_commodity *new_currency, time_t date) |
gnc_numeric | xaccAccountGetBalanceInCurrency (Account *account, gnc_commodity *report_commodity, gboolean include_children) |
gnc_numeric | xaccAccountGetClearedBalanceInCurrency (Account *account, gnc_commodity *report_commodity, gboolean include_children) |
gnc_numeric | xaccAccountGetReconciledBalanceInCurrency (Account *account, gnc_commodity *report_commodity, gboolean include_children) |
gnc_numeric | xaccAccountGetPresentBalanceInCurrency (Account *account, gnc_commodity *report_commodity, gboolean include_children) |
gnc_numeric | xaccAccountGetProjectedMinimumBalanceInCurrency (Account *account, gnc_commodity *report_commodity, gboolean include_children) |
Account Deprecated currency/security access routines. | |
| |
void | DxaccAccountSetCurrency (Account *account, gnc_commodity *currency, GNCBook *book) |
void | DxaccAccountSetSecurity (Account *account, gnc_commodity *security, GNCBook *book) |
gnc_commodity * | DxaccAccountGetCurrency (Account *account, GNCBook *book) |
gnc_commodity * | DxaccAccountGetSecurity (Account *account, GNCBook *book) |
void | DxaccAccountSetCurrencySCU (Account *account, int frac) |
int | DxaccAccountGetCurrencySCU (Account *account) |
Account Children and Parent getters/setters | |
AccountGroup * | xaccAccountGetChildren (Account *account) |
AccountGroup * | xaccAccountGetParent (Account *account) |
Account * | xaccAccountGetParentAccount (Account *account) |
GList * | xaccAccountGetDescendants (Account *account) |
void | xaccAccountSetReconcileChildrenStatus (Account *account, gboolean status) |
gboolean | xaccAccountGetReconcileChildrenStatus (Account *account) |
Account Tax related getters/setters | |
gboolean | xaccAccountGetTaxRelated (Account *account) |
void | xaccAccountSetTaxRelated (Account *account, gboolean tax_related) |
const char * | xaccAccountGetTaxUSCode (Account *account) |
void | xaccAccountSetTaxUSCode (Account *account, const char *code) |
const char * | xaccAccountGetTaxUSPayerNameSource (Account *account) |
void | xaccAccountSetTaxUSPayerNameSource (Account *account, const char *source) |
Account Reconciliation information getters/setters | |
gboolean | xaccAccountGetReconcileLastDate (Account *account, time_t *last_date) |
void | xaccAccountSetReconcileLastDate (Account *account, time_t last_date) |
gboolean | xaccAccountGetReconcileLastInterval (Account *account, int *months, int *days) |
void | xaccAccountSetReconcileLastInterval (Account *account, int months, int days) |
gboolean | xaccAccountGetReconcilePostponeDate (Account *account, time_t *postpone_date) |
void | xaccAccountSetReconcilePostponeDate (Account *account, time_t postpone_date) |
gboolean | xaccAccountGetReconcilePostponeBalance (Account *account, gnc_numeric *balance) |
void | xaccAccountSetReconcilePostponeBalance (Account *account, gnc_numeric balance) |
void | xaccAccountClearReconcilePostpone (Account *account) |
Account AutoInterest getters/setters | |
| |
gboolean | xaccAccountGetAutoInterestXfer (Account *account, gboolean default_value) |
void | xaccAccountSetAutoInterestXfer (Account *account, gboolean option) |
Configuration ForceDoubleEntry getters/setters | |
void | xaccConfigSetForceDoubleEntry (int force) |
int | xaccConfigGetForceDoubleEntry (void) |
Transaction creation and editing | |
Transaction * | xaccMallocTransaction (GNCBook *book) |
void | xaccTransDestroy (Transaction *trans) |
gboolean | xaccTransEqual (const Transaction *ta, const Transaction *tb, gboolean check_guids, gboolean check_splits) |
DOCUMENT ME! | |
void | xaccTransBeginEdit (Transaction *trans) |
void | xaccTransCommitEdit (Transaction *trans) |
void | xaccTransRollbackEdit (Transaction *trans) |
gboolean | xaccTransIsOpen (const Transaction *trans) |
Transaction * | xaccTransLookup (const GUID *guid, GNCBook *book) |
Transaction * | xaccTransLookupDirect (GUID guid, GNCBook *book) |
Transaction general getters/setters | |
const GUID * | xaccTransGetGUID (const Transaction *trans) |
GUID | xaccTransReturnGUID (const Transaction *trans) |
GNCBook * | xaccTransGetBook (const Transaction *trans) |
kvp_frame * | xaccTransGetSlots (const Transaction *trans) |
void | xaccTransSetSlots_nc (Transaction *t, kvp_frame *frm) |
void | xaccTransSetTxnType (Transaction *trans, char type) |
char | xaccTransGetTxnType (const Transaction *trans) |
void | xaccTransSetNum (Transaction *trans, const char *num) |
Sets the transaction Number (or ID) field. | |
void | xaccTransSetDescription (Transaction *trans, const char *desc) |
Sets the transaction Description. | |
void | xaccTransSetNotes (Transaction *trans, const char *notes) |
Sets the transaction Notes. More... | |
const char * | xaccTransGetNum (const Transaction *trans) |
Gets the transaction Number (or ID) field. | |
const char * | xaccTransGetDescription (const Transaction *trans) |
Gets the transaction Description. | |
const char * | xaccTransGetNotes (const Transaction *trans) |
Gets the transaction Notes. More... | |
void | xaccTransAppendSplit (Transaction *trans, Split *split) |
Add a split to the transaction. More... | |
Split * | xaccTransGetSplit (const Transaction *trans, int i) |
SplitList * | xaccTransGetSplitList (const Transaction *trans) |
void | xaccTransSetReadOnly (Transaction *trans, const char *reason) |
void | xaccTransClearReadOnly (Transaction *trans) |
const char * | xaccTransGetReadOnly (const Transaction *trans) |
gboolean | xaccTransWarnReadOnly (const Transaction *trans) |
int | xaccTransCountSplits (const Transaction *trans) |
gboolean | xaccTransHasReconciledSplits (const Transaction *trans) |
gboolean | xaccTransHasReconciledSplitsByAccount (const Transaction *trans, const Account *account) |
gnc_commodity * | xaccTransGetCurrency (const Transaction *trans) |
void | xaccTransSetCurrency (Transaction *trans, gnc_commodity *curr) |
gnc_numeric | xaccTransGetImbalance (const Transaction *trans) |
gnc_numeric | xaccTransGetAccountValue (const Transaction *trans, const Account *account) |
int | xaccTransOrder (const Transaction *ta, const Transaction *tb) |
Transaction date setters/getters | |
void | xaccTransSetDate (Transaction *trans, int day, int mon, int year) |
void | xaccTransSetDateSecs (Transaction *trans, time_t time) |
void | xaccTransSetDatePostedSecs (Transaction *trans, time_t time) |
void | xaccTransSetDatePostedTS (Transaction *trans, const Timespec *ts) |
void | xaccTransSetDateEnteredSecs (Transaction *trans, time_t time) |
Modify the date of when the transaction was entered. | |
void | xaccTransSetDateEnteredTS (Transaction *trans, const Timespec *ts) |
Modify the date of when the transaction was entered. | |
void | xaccTransSetDateDueTS (Transaction *trans, const Timespec *ts) |
time_t | xaccTransGetDate (const Transaction *trans) |
void | xaccTransGetDatePostedTS (const Transaction *trans, Timespec *ts) |
Timespec | xaccTransRetDatePostedTS (const Transaction *trans) |
void | xaccTransGetDateEnteredTS (const Transaction *trans, Timespec *ts) |
Timespec | xaccTransRetDateEnteredTS (const Transaction *trans) |
Timespec | xaccTransRetDateDueTS (const Transaction *trans) |
void | xaccTransGetDateDueTS (const Transaction *trans, Timespec *ts) |
Split general getters/setters | |
Split * | xaccMallocSplit (GNCBook *book) |
gboolean | xaccSplitDestroy (Split *split) |
GNCBook * | xaccSplitGetBook (const Split *split) |
Account * | xaccSplitGetAccount (const Split *split) |
Transaction * | xaccSplitGetParent (const Split *split) |
GNCLot * | xaccSplitGetLot (const Split *split) |
kvp_frame * | xaccSplitGetSlots (const Split *split) |
void | xaccSplitSetSlots_nc (Split *s, kvp_frame *frm) |
const GUID * | xaccSplitGetGUID (const Split *split) |
GUID | xaccSplitReturnGUID (const Split *split) |
void | xaccSplitSetMemo (Split *split, const char *memo) |
const char * | xaccSplitGetMemo (const Split *split) |
void | xaccSplitSetAction (Split *split, const char *action) |
const char * | xaccSplitGetAction (const Split *split) |
Split Date getters/setters | |
void | xaccSplitSetReconcile (Split *split, char reconciled_flag) |
char | xaccSplitGetReconcile (const Split *split) |
void | xaccSplitSetDateReconciledSecs (Split *split, time_t time) |
void | xaccSplitSetDateReconciledTS (Split *split, Timespec *ts) |
void | xaccSplitGetDateReconciledTS (const Split *split, Timespec *ts) |
Timespec | xaccSplitRetDateReconciledTS (const Split *split) |
Split amount getters/setters | |
'value' vs. 'amount' of a Split: The 'value' is the amount of the _transaction_ balancing commodity (i.e. currency) involved, 'amount' is the amount of the _account's_ commodity involved. | |
void | xaccSplitSetAmount (Split *split, gnc_numeric amount) |
gnc_numeric | xaccSplitGetAmount (const Split *split) |
void | xaccSplitSetValue (Split *split, gnc_numeric value) |
gnc_numeric | xaccSplitGetValue (const Split *split) |
void | xaccSplitSetSharePriceAndAmount (Split *split, gnc_numeric price, gnc_numeric amount) |
gnc_numeric | xaccSplitGetSharePrice (const Split *split) |
void | xaccSplitSetBaseValue (Split *split, gnc_numeric value, const gnc_commodity *base_currency) |
gnc_numeric | xaccSplitGetBaseValue (const Split *split, const gnc_commodity *base_currency) |
gnc_numeric | xaccSplitGetBalance (const Split *split) |
gnc_numeric | xaccSplitGetClearedBalance (const Split *split) |
gnc_numeric | xaccSplitGetReconciledBalance (const Split *split) |
Split utility functions | |
gboolean | xaccSplitEqual (const Split *sa, const Split *sb, gboolean check_guids, gboolean check_txn_splits) |
Split * | xaccSplitLookup (const GUID *guid, GNCBook *book) |
Split * | xaccSplitLookupDirect (GUID guid, GNCBook *book) |
Split * | xaccSplitGetOtherSplit (const Split *split) |
gboolean | xaccIsPeerSplit (const Split *split_1, const Split *split_2) |
const char * | xaccSplitGetType (const Split *s) |
void | xaccSplitMakeStockSplit (Split *s) |
int | xaccSplitDateOrder (const Split *sa, const Split *sb) |
int | xaccSplitCompareAccountFullNames (Split *sa, Split *sb) |
int | xaccSplitCompareAccountCodes (Split *sa, Split *sb) |
int | xaccSplitCompareOtherAccountFullNames (Split *sa, Split *sb) |
int | xaccSplitCompareOtherAccountCodes (Split *sa, Split *sb) |
char * | xaccSplitGetCorrAccountFullName (const Split *sa, char seperator) |
const char * | xaccSplitGetCorrAccountName (const Split *sa) |
const char * | xaccSplitGetCorrAccountCode (const Split *sa) |
Split deprecated functions | |
void | xaccSplitSetSharePrice (Split *split, gnc_numeric price) |
void | DxaccSplitSetAmount (Split *s, double damt) |
void | DxaccSplitSetValue (Split *split, double value) |
double | DxaccSplitGetValue (const Split *split) |
void | DxaccSplitSetSharePriceAndAmount (Split *split, double price, double amount) |
void | DxaccSplitSetShareAmount (Split *split, double amount) |
double | DxaccSplitGetShareAmount (const Split *split) |
void | DxaccSplitSetSharePrice (Split *split, double price) |
double | DxaccSplitGetSharePrice (const Split *split) |
void | DxaccSplitSetBaseValue (Split *split, double value, const gnc_commodity *base_currency) |
Transaction voiding | |
void | xaccTransVoid (Transaction *transaction, const char *reason) |
gboolean | xaccTransGetVoidStatus (const Transaction *transaction) |
char * | xaccTransGetVoidReason (const Transaction *transaction) |
gnc_numeric | xaccSplitVoidFormerAmount (const Split *split) |
gnc_numeric | xaccSplitVoidFormerValue (const Split *split) |
Timespec | xaccTransGetVoidTime (const Transaction *tr) |
Defines | |
#define | ACCOUNT_MATCH_ALL_TYPE "account-match-all" |
#define | GNC_SX_ID "sched-xaction" |
#define | GNC_SX_ACCOUNT "account" |
#define | GNC_SX_CREDIT_FORMULA "credit-formula" |
#define | GNC_SX_DEBIT_FORMULA "debit-formula" |
#define | GNC_SX_SHARES "shares" |
#define | GNC_SX_AMOUNT "amnt" |
#define | GNC_SX_FROM_SCHED_XACTION "from-sched-xaction" |
#define | RECONCILED_MATCH_TYPE "reconciled-match" |
Typedefs | |
typedef gnc_numeric(* | xaccGetBalanceFn )(Account *account) |
typedef gnc_numeric(* | xaccGetBalanceInCurrencyFn )(Account *account, gnc_commodity *report_commodity, gboolean include_children) |
typedef gpointer(* | SplitCallback )(Split *s, gpointer data) |
typedef gboolean(* | TransactionCallback )(Transaction *t, void *data) |
typedef gnc_price_s | GNCPrice |
typedef gnc_price_lookup_s | GNCPriceLookup |
typedef gnc_price_db_s | GNCPriceDB |
typedef gncp_SchedXaction | SchedXaction |
Enumerations | |
enum | GNCAccountType { BAD_TYPE = -1, NO_TYPE = -1, BANK = 0, CASH = 1, CREDIT = 3, ASSET = 2, LIABILITY = 4, STOCK = 5, MUTUAL = 6, CURRENCY = 7, INCOME = 8, EXPENSE = 9, EQUITY = 10, RECEIVABLE = 11, PAYABLE = 12, NUM_ACCOUNT_TYPES = 13, CHECKING = 13, SAVINGS = 14, MONEYMRKT = 15, CREDITLINE = 16 } |
Functions | |
const char * | xaccAccountGetTypeStr (GNCAccountType type) |
GNCAccountType | xaccAccountGetTypeFromStr (const gchar *str) |
gboolean | xaccAccountTypesCompatible (GNCAccountType parent_type, GNCAccountType child_type) |
GNCBook * | xaccAccountGetBook (Account *account) |
Account * | xaccAccountLookupTwin (Account *acc, GNCBook *book) |
gboolean | xaccAccountEqual (Account *a, Account *b, gboolean check_guids) |
void | xaccAccountInsertLot (Account *, GNCLot *) |
void | xaccAccountRemoveLot (Account *, GNCLot *) |
void | xaccAccountInsertSplit (Account *account, Split *split) |
void | xaccAccountFixSplitDateOrder (Account *account, Split *split) |
void | xaccTransFixSplitDateOrder (Transaction *trans) |
int | xaccAccountOrder (Account **account_1, Account **account_2) |
void | xaccAccountDeleteOldData (Account *account) |
SplitList * | xaccAccountGetSplitList (Account *account) |
LotList * | xaccAccountGetLotList (Account *account) |
LotList * | xaccAccountFindOpenLots (Account *acc, gboolean(*match_func)(GNCLot *lot, gpointer user_data), gpointer user_data, GCompareFunc sort_func) |
char * | xaccAccountGetFullName (Account *account, const char separator) |
gboolean | xaccAccountHasAncestor (Account *account, Account *ancestor) |
void | xaccAccountSetMark (Account *account, short mark) |
short | xaccAccountGetMark (Account *account) |
void | xaccClearMark (Account *account, short val) |
void | xaccClearMarkDown (Account *account, short val) |
void | xaccClearMarkDownGr (AccountGroup *group, short val) |
void | xaccAccountSetPriceSrc (Account *account, const char *src) |
const char * | xaccAccountGetPriceSrc (Account *account) |
void | xaccAccountSetQuoteTZ (Account *account, const char *tz) |
const char * | xaccAccountGetQuoteTZ (Account *account) |
gpointer | xaccAccountForEachSplit (Account *account, SplitCallback, gpointer data) |
gboolean | xaccAccountForEachTransaction (Account *account, TransactionCallback, void *data) |
gboolean | xaccAccountVisitUnvisitedTransactions (Account *account, TransactionCallback, void *data, GHashTable *visited_txns) |
Transaction * | xaccAccountFindTransByDesc (Account *account, const char *description) |
Split * | xaccAccountFindSplitByDesc (Account *account, const char *description) |
GNCPrice * | gnc_price_create (GNCBook *book) |
GNCPrice * | gnc_price_clone (GNCPrice *p, GNCBook *book) |
void | gnc_price_ref (GNCPrice *p) |
void | gnc_price_unref (GNCPrice *p) |
void | gnc_price_begin_edit (GNCPrice *p) |
void | gnc_price_commit_edit (GNCPrice *p) |
void | gnc_price_set_commodity (GNCPrice *p, gnc_commodity *c) |
void | gnc_price_set_currency (GNCPrice *p, gnc_commodity *c) |
void | gnc_price_set_time (GNCPrice *p, Timespec t) |
void | gnc_price_set_source (GNCPrice *p, const char *source) |
void | gnc_price_set_type (GNCPrice *p, const char *type) |
void | gnc_price_set_value (GNCPrice *p, gnc_numeric value) |
void | gnc_price_set_version (GNCPrice *p, gint32 versn) |
GNCPrice * | gnc_price_lookup (const GUID *guid, GNCBook *book) |
const GUID * | gnc_price_get_guid (GNCPrice *p) |
const GUID | gnc_price_return_guid (GNCPrice *p) |
GNCBook * | gnc_price_get_book (GNCPrice *p) |
gnc_commodity * | gnc_price_get_commodity (GNCPrice *p) |
gnc_commodity * | gnc_price_get_currency (GNCPrice *p) |
Timespec | gnc_price_get_time (GNCPrice *p) |
const char * | gnc_price_get_source (GNCPrice *p) |
const char * | gnc_price_get_type (GNCPrice *p) |
gnc_numeric | gnc_price_get_value (GNCPrice *p) |
gint32 | gnc_price_get_version (GNCPrice *p) |
gboolean | gnc_price_equal (GNCPrice *p1, GNCPrice *p2) |
gboolean | gnc_price_list_insert (GList **prices, GNCPrice *p) |
gboolean | gnc_price_list_remove (GList **prices, GNCPrice *p) |
void | gnc_price_list_destroy (GList *prices) |
gboolean | gnc_price_list_equal (GList *prices1, GList *prices2) |
GNCPriceDB * | gnc_pricedb_create (GNCBook *book) |
void | gnc_pricedb_destroy (GNCPriceDB *db) |
gboolean | gnc_pricedb_add_price (GNCPriceDB *db, GNCPrice *p) |
gboolean | gnc_pricedb_remove_price (GNCPriceDB *db, GNCPrice *p) |
GNCPrice * | gnc_pricedb_lookup_latest (GNCPriceDB *db, gnc_commodity *commodity, gnc_commodity *currency) |
GList * | gnc_pricedb_lookup_latest_any_currency (GNCPriceDB *db, gnc_commodity *commodity) |
GList * | gnc_pricedb_get_prices (GNCPriceDB *db, gnc_commodity *commodity, gnc_commodity *currency) |
GList * | gnc_pricedb_lookup_at_time (GNCPriceDB *db, gnc_commodity *commodity, gnc_commodity *currency, Timespec t) |
GList * | gnc_pricedb_lookup_at_time_any_currency (GNCPriceDB *db, gnc_commodity *c, Timespec t) |
GList * | gnc_pricedb_lookup_day (GNCPriceDB *db, gnc_commodity *commodity, gnc_commodity *currency, Timespec t) |
GList * | gnc_pricedb_lookup_day_any_currency (GNCPriceDB *db, gnc_commodity *c, Timespec t) |
GNCPrice * | gnc_pricedb_lookup_nearest_in_time (GNCPriceDB *db, gnc_commodity *c, gnc_commodity *currency, Timespec t) |
GList * | gnc_pricedb_lookup_nearest_in_time_any_currency (GNCPriceDB *db, gnc_commodity *c, Timespec t) |
gnc_numeric | gnc_pricedb_convert_balance_latest_price (GNCPriceDB *pdb, gnc_numeric balance, gnc_commodity *balance_currency, gnc_commodity *new_currency) |
gnc_numeric | gnc_pricedb_convert_balance_nearest_price (GNCPriceDB *pdb, gnc_numeric balance, gnc_commodity *balance_currency, gnc_commodity *new_currency, Timespec t) |
gboolean | gnc_pricedb_foreach_price (GNCPriceDB *db, gboolean(*f)(GNCPrice *p, gpointer user_data), gpointer user_data, gboolean stable_order) |
gboolean | gnc_pricedb_dirty (GNCPriceDB *db) |
guint | gnc_pricedb_get_num_prices (GNCPriceDB *db) |
gboolean | gnc_pricedb_equal (GNCPriceDB *db1, GNCPriceDB *db2) |
void | gnc_price_print (GNCPrice *db, FILE *f, int indent) |
void | gnc_pricedb_print_contents (GNCPriceDB *db, FILE *f) |
SchedXaction * | xaccSchedXactionMalloc (GNCBook *book) |
gboolean | xaccSchedXactionIsDirty (SchedXaction *sx) |
void | xaccSchedXactionSetDirtyness (SchedXaction *sx, gboolean dirty_p) |
void | xaccSchedXactionFree (SchedXaction *sx) |
FreqSpec * | xaccSchedXactionGetFreqSpec (SchedXaction *sx) |
void | xaccSchedXactionSetFreqSpec (SchedXaction *sx, FreqSpec *fs) |
gchar * | xaccSchedXactionGetName (SchedXaction *sx) |
void | xaccSchedXactionSetName (SchedXaction *sx, const gchar *newName) |
GDate * | xaccSchedXactionGetStartDate (SchedXaction *sx) |
void | xaccSchedXactionSetStartDate (SchedXaction *sx, GDate *newStart) |
int | xaccSchedXactionHasEndDate (SchedXaction *sx) |
GDate * | xaccSchedXactionGetEndDate (SchedXaction *sx) |
void | xaccSchedXactionSetEndDate (SchedXaction *sx, GDate *newEnd) |
GDate * | xaccSchedXactionGetLastOccurDate (SchedXaction *sx) |
void | xaccSchedXactionSetLastOccurDate (SchedXaction *sx, GDate *newLastOccur) |
gboolean | xaccSchedXactionHasOccurDef (SchedXaction *sx) |
gint | xaccSchedXactionGetNumOccur (SchedXaction *sx) |
void | xaccSchedXactionSetNumOccur (SchedXaction *sx, gint numNum) |
gint | xaccSchedXactionGetRemOccur (SchedXaction *sx) |
void | xaccSchedXactionSetRemOccur (SchedXaction *sx, gint numRemain) |
gint | gnc_sx_get_instance_count (SchedXaction *sx, void *stateData) |
void | gnc_sx_set_instance_count (SchedXaction *sx, gint instanceNum) |
GList * | xaccSchedXactionGetSplits (SchedXaction *sx) |
void | xaccSchedXactionSetSplits (SchedXaction *sx, GList *newSplits) |
void | xaccSchedXactionGetAutoCreate (SchedXaction *sx, gboolean *outAutoCreate, gboolean *outNotify) |
void | xaccSchedXactionSetAutoCreate (SchedXaction *sx, gboolean newAutoCreate, gboolean newNotify) |
gint | xaccSchedXactionGetAdvanceCreation (SchedXaction *sx) |
void | xaccSchedXactionSetAdvanceCreation (SchedXaction *sx, gint createDays) |
gint | xaccSchedXactionGetAdvanceReminder (SchedXaction *sx) |
void | xaccSchedXactionSetAdvanceReminder (SchedXaction *sx, gint reminderDays) |
kvp_frame * | xaccSchedXactionGetSlots (SchedXaction *sx) |
void | xaccSchedXactionSetSlots (SchedXaction *sx, kvp_frame *frm) |
kvp_value * | xaccSchedXactionGetSlot (SchedXaction *sx, const char *slot) |
void | xaccSchedXactionSetSlot (SchedXaction *sx, const char *slot, const kvp_value *value) |
const GUID * | xaccSchedXactionGetGUID (SchedXaction *sx) |
void | xaccSchedXactionSetGUID (SchedXaction *sx, GUID g) |
void * | gnc_sx_create_temporal_state (SchedXaction *sx) |
void | gnc_sx_incr_temporal_state (SchedXaction *sx, void *stateData) |
void | gnc_sx_revert_to_temporal_state (SchedXaction *sx, void *stateData) |
void | gnc_sx_destroy_temporal_state (void *stateData) |
void * | gnc_sx_clone_temporal_state (void *stateData) |
GDate | xaccSchedXactionGetNextInstance (SchedXaction *sx, void *stateData) |
GDate | xaccSchedXactionGetInstanceAfter (SchedXaction *sx, GDate *date, void *stateData) |
void | xaccSchedXactionSetTemplateTrans (SchedXaction *sx, GList *t_t_list, GNCBook *book) |
void | gnc_sx_add_defer_instance (SchedXaction *sx, void *deferStateData) |
void | gnc_sx_remove_defer_instance (SchedXaction *sx, void *deferStateData) |
GList * | gnc_sx_get_defer_instances (SchedXaction *sx) |
Account * | xaccGetAccountByName (Transaction *trans, const char *name) |
Account * | xaccGetAccountByFullName (Transaction *trans, const char *name, const char separator) |
void | xaccOpenLog (void) |
void | xaccCloseLog (void) |
void | xaccTransWriteLog (Transaction *, char) |
void | xaccLogEnable (void) |
void | xaccLogDisable (void) |
void | xaccLogSetBaseName (const char *) |
|
This is the type-override when you want to match all accounts. Used in the gnome-search parameter list. Be carefull when you use this. |
|
GNCPrice: Each price in the database represents an "instantaneous" quote for a given commodity with respect to another commodity. For example, a given price might represent the value of LNUX in USD on 2001-02-03. Fields: commodity: the item being priced. currency: the denomination of the value of the item being priced. value: the value of the item being priced. time: the time the price was valid. source: a string describing the source of the quote. These strings will be something like this: "Finance::Quote", "user:misc", "user:foo", etc. If the quote came from a user, as a matter of policy, you *must* prefix the string you give with "user:". For now, the only other reserved values are "Finance::Quote" and "old-file-import". Any string used must be added to the source_list array in dialog-price-edit-db.c so that it can be properly translated. (There are unfortunately many strings in users databased, so this string must be translated on output instead of always being used intranslated form.) type: the type of quote - types possible right now are bid, ask, last, nav, and unknown. Implementation Details: NOTE: for source and type, NULL and the empty string are considered the same, so if one of these is "", then after a file save/restore, it might be NULL. Behave accordingly. GNCPrices are reference counted. When you gnc_price_create one or clone it, the new price's count is set to 1. When you are finished with a price, call gnc_price_unref. If you hand the price pointer to some other code that needs to keep it, make sure it calls gnc_price_ref to indicate its interest in that price, and calls gnc_price_unref when it's finished with the price. For those unfamiliar with reference counting, basically each price stores an integer count which starts at 1 and is incremented every time someone calls gnc_price_ref. Conversely, the count is decremented every time someone calls gnc_price_unref. If the count ever reaches 0, the price is destroyed. All of the getters return data that's internal to the GNCPrice, not copies, so don't free these values. All of the setters store copies of the data given, with the exception of the commodity field which just stores the pointer given. It is assumed that commodities are a global resource and are pointer unique. |
|
GNCPriceDB Whenever a you store a price in the pricedb, the pricedb adds its own reference to the price, so you can safely unref that price after inserting it into the DB if you're finished with it otherwise. Similarly, when the pricedb returns a price to you, either singly, or in a price list, the price will have had a ref added for you, so you only need to unref the price(s) when you're finished with it/them. |
|
The SchedXaction data. |
|
Unimplemented |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gnc_price_clone - returns a newly allocated price that's a content-wise duplicate of the given price, p. The returned clone will have a reference count of 1. |
|
gnc_price_create - returns a newly allocated and initialized price with a reference count of 1. |
|
gnc_price_list_destroy - destroy the given price list, calling gnc_price_unref on all the prices included in the list. |
|
gnc_price_list_insert - insert a price into the given list, calling gnc_price_ref on it during the process. |
|
gnc_price_list_remove - remove the price, p, from the given list, calling gnc_price_unref on it during the process. |
|
As mentioned above all of the getters return data that's internal to the GNCPrice, not copies, so don't free these values. |
|
semi-lame debugging code |
|
gnc_price_ref - indicate your need for a given price to stick around (i.e. increase its reference count by 1). |
|
gnc_price_ref - indicate you're finished with a price (i.e. decrease its reference count by 1). |
|
gnc_pricedb_add_price - add a price to the pricedb, you may drop your reference to the price (i.e. call unref) after this succeeds, whenever you're finished with the price. |
|
gnc_pricedb_convert_balance_latest_price - Convert a balance from one currency to another. |
|
gnc_pricedb_convert_balance_nearest_price - Convert a balance from one currency to another. |
|
gnc_pricedb_create - create a new pricedb. Normally you won't need this; you will get the pricedb via gnc_book_get_pricedb. |
|
gnc_pricedb_destroy - destroy the given pricedb and unref all of the prices it contains. This may not deallocate all of those prices. Other code may still be holding references to them. |
|
gnc_pricedb_dirty - return FALSE if the database has not been modified. |
|
gnc_pricedb_foreach_price - call f once for each price in db, until and unless f returns FALSE. If stable_order is not FALSE, make sure the ordering of the traversal is stable (i.e. the same order every time given the same db contents -- stable traversals may be less efficient). |
|
gnc_pricedb_get_num_prices - return the number of prices in the database. |
|
gnc_pricedb_get_prices - return all the prices for a given commodity in the given currency. Returns NULL on failure. The result is a GNCPrice list (see above). |
|
gnc_pricedb_lookup_at_time - return all prices that match the given commodity, currency, and timespec. Prices will be returned as a GNCPrice list (see above). |
|
gnc_pricedb_lookup_at_time_any_currency - return all prices that match the given commodity and timespec in any available currency. Prices will be returned as a GNCPrice list (see above). |
|
gnc_pricedb_lookup_day - return all prices that match the given commodity, currency, and timespec. Prices will be returned as a GNCPrice list (see above). |
|
gnc_pricedb_lookup_day_any_currency - return all prices that match the given commodity and timespec in any available currency. Prices will be returned as a GNCPrice list (see above). |
|
gnc_pricedb_lookup_latest - find the most recent price for the given commodity in the given currency. Returns NULL on failure. |
|
gnc_pricedb_lookup_latest_any_currency - find the most recent prices for the given commodity in any available currency. Prices will be returned as a GNCPrice list (see above). |
|
gnc_pricedb_lookup_nearest_in_time - return the price for the given commodity in the given currency nearest to the given time t. |
|
gnc_pricedb_lookup_nearest_in_time_any_currency - return all prices that match the given commodity and timespec in any available currency. Prices will be returned as a GNCPrice list (see above). |
|
gnc_pricedb_remove_price - removes the given price, p, from the pricedb. Returns TRUE if successful, FALSE otherwise. |
|
Adds an instance to the deferred list of the SX. Added instances are added in (date-)sorted order. |
|
Allocates and returns a copy of the given temporal state. Destroy with gnc_sx_destroy_temporal_state(), as you'd expect. |
|
Temporal state data. These functions allow us to opaquely save the entire temporal state of ScheduledTransactions. This is used by the "since-last-run" dialog to store the initial state of SXes before modification ... if it later becomes necessary to revert an entire set of changes, we can 'revert' the SX without having to rollback all the individual state changes. |
|
Returns the defer list from the SX; this is a (date-)sorted temporal-state-data instance list. The list should not be modified by the caller; use the gnc_sx_{add,remove}_defer_instance() functions to modifiy the list. |
|
Set the instance count. This is incremented by one for every created instance of the SX. Returns the instance num of the SX unless stateData is non-null, in which case it returns the instance num from the state data.
|
|
Removes an instance from the deferred list. If the instance is no longer useful; gnc_sx_destroy_temporal_state() it. |
|
Sets the instance count to something other than the default. As the default is the incorrect value '0', callers should DTRT here. |
|
The xaccAccountBeginEdit() subroutine is the first phase of a two-phase-commit wrapper for account updates. |
|
ThexaccAccountCommitEdit() subroutine is the second phase of a two-phase-commit wrapper for account updates. |
|
Delete any old data in the account's kvp data. This includes the old currency and security fields. |
|
The xaccAccountDestroy() routine can be used to get rid of an account. The account should have been opened for editing (by calling xaccAccountBeginEdit()) before calling this routine. |
|
Compare two accounts for equality - this is a deep compare. |
|
Find a list of open lots that match the match_func. Sort according to sort_func. If match_func is NULL, then all open lots are returned. If sort_func is NULL, then the returned list has no particular order. The caller must free to returned list. |
|
Returns a pointer to the split, not a copy. |
|
Returns a pointer to the transaction, not a copy. |
|
The xaccAccountFixSplitDateOrder() subroutine checks to see if a split is in proper sorted date order with respect to the other splits in this account. |
|
Unimplemented |
|
The xaccAccountForEachTransaction() routine will traverse all of the transactions in the given account. Continue processing IFF proc does not return FALSE. This function does not descend recursively to traverse transactions in child accounts. Proc will be called exactly once for each transaction that is pointed to by at least one split in the given account. Note too, that if you call this function on two separate accounts and those accounts share transactions, proc will be called once per account for the shared transactions. The result of this function will not be FALSE if-and-only-if every relevant transaction was traversed exactly once. |
|
|
|
The xaccAccountGetFullName routine returns the fully qualified name of the account using the given separator char. The name must be g_free'd after use. The fully qualified name of an account is the concatenation of the names of the account and all its ancestor accounts starting with the topmost account and ending with the given account. Each name is separated by the given character. @note: WAKE UP! Unlike all other gets, the string returned by xaccAccountGetFullName() must be freed by you the user !!! hack alert -- since it breaks the rule of string allocation, maybe this routine should not be in this library, but some utility library? |
|
The xaccAccountGetGUID() subroutine will return the globally unique id associated with that account. |
|
The xaccAccountGetLotList() routine returns a pointer to the GList of the lots in this account. The same warnings as above apply. |
|
Get the mark set by xaccAccountSetMark |
|
|
|
The xaccAccountGetSplitList() routine returns a pointer to a GList of the splits in the account.
|
|
The xaccAccountGetTypeStr() routine returns a string suitable for use in the GUI/Interface. These strings should be translated to the local language. |
|
Returns true if the account has 'ancestor' as an ancestor. Returns false if either is NULL. |
|
The xaccAccountInsertLot() method will register the indicated lot with this account. Any splits later inserted into this lot must belong to this account. If the lot is already in another account, the lot, and all of the splits in it, will be moved from that account to this account. |
|
The xaccAccountInsertSplit() method will insert the indicated split into the indicated account. If the split already belongs to another account, it will be removed from that account first. |
|
The xaccAccountLookup() subroutine will return the account associated with the given id, or NULL if there is no such account. |
|
xaccAccountLookupDirect performs the same function as xaccAccountLookup but takes a GUID struct directly. |
|
The xaccAccountLookupTwin() routine will find the "twin" of this account (if it exists) in another book. When accounts are copied or cloned, both of the pair are marked with the guid of thier copy, thus allowing the sibling-copy of an account to be found. Since the sibling may end up in a different book, we need a way of finding it, given only that we know the book, and that we know its twin. That's what this routine does. Given some book 'book', and an account 'acc', it will find the sibling account of 'acc' that is in 'book', and return it. If not found, it returns NULL. This routine uses the 'gemini' kvp values to do its work. |
|
The xaccAccountOrder() subroutine defines a sorting order on accounts. It takes pointers to two accounts, and returns -1 if the first account is "less than" the second, returns +1 if the first is "greater than" the second, and 0 if they are equal. To determine the sort order, first the account codes are compared, and if these are equal, then account types, and, if these are equal, the account names. |
|
The xaccAccountReturnGUID() subroutine returns the same GUID as xaccAccountGetGUID, but as a struct. |
|
Set the last num field of an Account |
|
Set a mark on the account. The meaning of this mark is completely undefined. Its presented here as a utility for the programmer, to use as desired. Handy for performing customer traversals over the account tree. The mark is *not* stored in the database/file format. When accounts are newly created, the mark is set to zero. |
|
The xaccAccountSetPriceSrc() and xaccAccountGetPriceSrc() routines are used to get and set a string that identifies the Finance::Quote backend that should be used to retrieve online prices. See price-quotes.scm for more information. |
|
xaccAccountGetQuoteTZ() and xaccAccountSetQuoteTZ() set the timezone to be used when interpreting the results from a given Finance::Quote backend. Unfortunately, the upstream sources don't label their output, so the user has to specify this bit.
|
|
Return TRUE if accounts of type parent_type can have accounts of type child_type as children. |
|
The xaccAccountVisitUnvisitedTransactions() routine will visit every transaction in the account that hasn't already been visited exactly once. visited_txns must be a hash table created via guid_hash_table_new() and is the authority about which transactions have already been visited. Further, when this procedure returns visited_txns will have been modified to reflect all the newly visited transactions. The result of this function will not be FALSE if-and-only-if every relevant transaction was traversed exactly once. |
|
The xaccClearMark will find the topmost group, and clear the mark in the entire group tree. |
|
The xaccClearMarkDown will clear the mark only in this and in sub-accounts. |
|
Will clear the mark for all the accounts of the AccountGroup . |
|
The xaccCloneAccount() does the same as xaccCloneAccountSimple, except that it also uses the 'gemini' kvp value to mark the account from which it was copied. |
|
The xaccCloneAccountSimple() routine makes a simple copy of the indicated account, placing it in the indicated book. It copies the account type, name, description, and the kvp values; it does not copy splits/transactions. Note also that it does NOT use the 'gemini' kvp value to indicate where it was copied from. |
|
The xaccConfigSetForceDoubleEntry() and xaccConfigGetForceDoubleEntry() set and get the "force_double_entry" flag. This flag determines how the splits in a transaction will be balanced. |
|
The xaccConfigSetForceDoubleEntry() and xaccConfigGetForceDoubleEntry() set and get the "force_double_entry" flag. This flag determines how the splits in a transaction will be balanced. The following values have significance: 0 -- anything goes 1 -- The sum of all splits in a transaction will be forced to be zero, even if this requires the creation of additional splits. Note that a split whose value is zero (e.g. a stock price) can exist by itself. Otherwise, all splits must come in at least pairs. 2 -- splits without parents will be forced into a lost & found account. (Not implemented) |
|
The xaccGetAccountByFullName routine is similar to xaccGetAccountByName, but uses full names using the given separator. |
|
The xaccGetAccountByName() is a convenience routine that is essentially identical to xaccGetPeerAccountFromName(), except that it accepts the handy transaction as root. |
|
The xaccIsPeerSplit() is a convenience routine that returns TRUE (a non-zero value) if the two splits share a common parent transaction, else it returns FALSE (zero). |
|
document me |
|
document me |
|
The xaccLogSetBaseName() method sets the base filepath and the root part of the journal file name. If the journal file is already open, it will close it and reopen it with the new base name. |
|
Constructor |
|
Constructor. |
|
The xaccMallocTransaction() will malloc memory and initialize it. Once created, it is usually unsafe to merely "free" this memory; the xaccTransDestroy() method should be called. |
|
Cleans up and frees a SchedXaction and it's associated data. |
|
Returns invalid date when there is no end-date specified. |
|
Returns the next occurance of a scheduled transaction. If the transaction hasn't occured, then it's based off the start date. Otherwise, it's based off the last-occurance date. If state data is NULL, the current value of the SX is used for computation. Otherwise, the values in the state data are used. This allows the caller to correctly create a set of instances into the future for possible action without modifying the SX state until action is actually taken. |
|
Use the following two functions in preference to the above two . . . |
|
Returns true if the scheduled transaction has a defined number of occurances, false if not. |
|
|
|
Creates and initializes a scheduled transaction. |
|
Set dirtyness state. Only save/load code should modify this outside SX engine CODE . . . (set it to FALSE after backend completes reading in data FIXME: put this into a private header . . . . |
|
Set to an invalid GDate to turn off 'end-date' definition. |
|
The FreqSpec is given to the SchedXaction for mem mgmt; it should not be freed by the external code. |
|
A copy of the name is made. |
|
Set to '0' to turn off number-of-occurances definition. |
|
Sets the SX kvp data to the given kvp_frame. NOTE: This is not copied, but set directly. |
|
Compare two splits by code of account. Returns similar to strcmp. |
|
Compare two splits by full name of account. Returns similar to strcmp. |
|
Compare two splits by code of the other account. Returns similar to strcmp. This function attempts to find the split on the other side of a transaction and compare on it. |
|
Compare two splits by full name of the other account. Returns similar to strcmp. This function attempts to find the split on the other side of a transaction and compare on it. |
|
The xaccSplitDateOrder(sa,sb) method is useful for sorting. if sa and sb have different transactions, return their xaccTransOrder return a negative value if split sa has a smaller currency-value than sb, return a positive value if split sa has a larger currency-value than sb, return a negative value if split sa has a smaller share-price than sb, return a positive value if split sa has a larger share-price than sb, then compares memo and action using the strcmp() c-library routine, returning what strcmp would return. Then it compares the reconciled flags, then the reconciled dates, Finally, it returns zero if all of the above match. |
|
Destructor. The xaccSplitDestroy() method will update its parent account and transaction in a consistent manner, resulting in the complete unlinking of the split, and the freeing of its associated memory. The goal of this routine is to perform the removal and destruction of the split in an atomic fashion, with no chance of accidentally leaving the accounting structure out-of-balance or otherwise inconsistent. If the deletion of the split leaves the transaction with no splits, then the transaction will be marked for deletion. (It will not be deleted until the xaccTransCommitEdit() routine is called.)
|
|
Equality.
|
|
Returns the account of this split, which was set through xaccAccountInsertSplit(). |
|
Returns the action string. |
|
Returns the amount of the split in the account's commodity. |
|
Returns the running balance up to and including the indicated split. The balance is the currency-denominated balance. For accounts with non-unit share prices, it is correctly adjusted for share prices. The following three subroutines return the running balance up to & including the indicated split. (The function xaccSplitGetShareBalance seems to have silently disappeared.) |
|
Depending on the base_currency, return either the value or the amount of this split: If the base_curreny is the transaction's commodity, return the value. If it is the account's commodity, return the amount. If it is neither and the force_double_entry flag is false, return the value. If is is neither and force_double_entry is true, print a warning message and return gnc_numeric_zero().
|
|
Returns the book of this split, i.e. the entity where this split is stored. |
|
The cleared-balance is the currency-denominated balance of all transactions that have been marked as cleared or reconciled. It is correctly adjusted for price fluctuations. |
|
document me |
|
These functions take a split, get the corresponding split on the "other side" of the transaction, and extract either the name or code of that split, reverting to returning a constant "Split" if the transaction has more than one split on the "other side". These were added for the transaction report, and is in C because the code was already written in C for the above functions and duplication is silly. |
|
document me |
|
Get the date on which this split was reconciled by having it written into the Timespec that 'ts' is pointing to. |
|
The xaccSplitGetGUID() subroutine will return the globally unique id associated with that split. |
|
Returns the pointer to the debited/credited Lot where this split belongs to, or NULL if it doesn't belong to any. |
|
Returns the memo string. |
|
The xaccSplitGetOtherSplit() is a convenience routine that returns the other of a pair of splits. If there are more than two splits, it returns NULL. |
|
Returns the parent transaction of the split, which was set through xaccTransAppendSplit(). |
|
Returns the value of the reconcile flag. |
|
Returns the reconciled-balance of this split. The reconciled-balance is the currency-denominated balance of all transactions that have been marked as reconciled. |
|
Returns the price of the split, that is, the value divided by the amount. If the amount is zero, returns a gnc_numeric of value one. |
|
Returns the kvp_frame slots of this split for direct editing. Split slots are used to store arbitrary strings, numbers, and structures which aren't members of the transaction struct. See kvp_doc.txt for reserved slot names. |
|
Returns the split type, which is either the string "normal", or "stock-split" for a split from a stock split (pun intended? :-). |
|
Returns the value of this split in the transaction's commodity. |
|
The xaccSplitLookup() subroutine will return the split associated with the given id, or NULL if there is no such split. |
|
Returns the split associated with the given id, or NULL if there is no such split. |
|
Mark a split to be of type stock split - after this, you shouldn't modify the value anymore, just the amount. |
|
Returns the date (as Timespec) on which this split was reconciled. |
|
xaccSplitReturnGUID also returns the guid (globally unique id), but in a GUID struct. |
|
The Action is an arbitrary user-assigned string. The action field is an arbitrary user-assigned value. It is meant to be a very short (one to ten cahracter) string that signifies the "type" of this split, such as e.g. Buy, Sell, Div, Withdraw, Deposit, ATM, Check, etc. The idea is that this field can be used to create custom reports or graphs of data. |
|
The xaccSplitSetAmount() (formerly xaccSplitSetShareAmount) method sets the amount in the account's commodity that the split should have. The following four setter functions set the prices and amounts. All of the routines always maintain balance: that is, invoking any of them will cause other splits in the transaction to be modified so that the net value of the transaction is zero. IMPORTANT: The split should be parented by an account before any of these routines are invoked! This is because the actual setting of amounts/values requires SCU settings from the account. If these are not available, then amounts/values will be set to -1/0, which is an invalid value. I beleive this order dependency is a bug, but I'm too lazy to find, fix & test at the moment ...
|
|
Depending on the base_currency, set either the value or the amount of this split or both: If the base_currency is the transaction's commodity, set the value. If it's the account's commodity, set the amount. If both, set both.
|
|
Set the date on which this split was reconciled by specifying the time as time_t. |
|
Set the date on which this split was reconciled by specifying the time as Timespec. |
|
The memo is an arbitrary string associated with a split. It is intended to hold a short (zero to forty character) string that is displayed by the GUI along with this split. Users typically type in free form text from the GUI. |
|
Set the reconcile flag. The Reconcile flag is a single char, whose values are typically are 'n', 'y', 'c'. In Transaction.h, macros are defined for typical values (e.g. CREC, YREC). |
|
|
|
The xaccSplitSetSharePriceAndAmount() method will simultaneously update the share price and the number of shares. This is a utility routine that is equivalent to a xaccSplitSetSharePrice() followed by and xaccSplitSetAmount(), except that it incurs the processing overhead of balancing only once, instead of twice. |
|
Set the kvp_frame slots of this split to the given frm by directly using the frm pointer (i.e. non-copying). |
|
The xaccSplitSetValue() method sets the value of this split in the transaction's commodity.
|
|
document me |
|
document me |
|
Add a split to the transaction. The xaccTransAppendSplit() method will append the indicated split to the collection of splits in this transaction.
|
|
The xaccTransBeginEdit() method must be called before any changes are made to a transaction or any of its component splits. If this is not done, errors will result. |
|
The xaccTransCommitEdit() method indicates that the changes to the transaction and its splits are complete and should be made permanent. Note this routine may result in the deletion of the transaction, if the transaction is "empty" (has no splits), or of xaccTransDestroy() was called on the transaction. |
|
Returns the number of splits in this transaction. |
|
The xaccTransDestroy() method will remove all of the splits from each of their accounts, free the memory associated with them. This routine must be followed by either an xaccTransCommitEdit(), in which case the transaction memory will be freed, or by xaccTransRollbackEdit(), in which case nothing at all is freed, and everything is put back into original order. |
|
The xaccTransFixSplitDateOrder() checks to see if all of the splits in this transaction are in proper date order. |
|
The xaccTransGetAccountValue() method returns the total value applied to a particular account. In some cases there may be multiple Splits in a single Transaction applied to one account (in particular when trying to balance Lots) -- this function is just a convienience to view everything at once. |
|
Returns the book in which the transaction is stored |
|
Returns the commodity of this transaction. Each transaction's 'currency' is by definition the balancing common currency for the splits in that transaction.
|
|
Retrieve the posted date of the transaction. (Although having different function names, GetDate and GetDatePosted refer to the same single date.) |
|
Retrieve the date of when the transaction was entered. |
|
The xaccTransGetGUID() subroutine will return the globally unique id associated with that transaction. |
|
The xaccTransGetImbalance() method returns the total value of the transaction. In a pure double-entry system, this imbalance should be exactly zero, and if it is not, something is broken. However, when double-entry semantics are not enforced, unbalanced transactions can sneak in, and this routine can be used to find out how much things are off by. The value returned is denominated in the currency that is returned by the xaccTransFindCommonCurrency() method. |
|
Gets the transaction Notes. The Notes field is only visible in the register in double-line mode |
|
FIXME: document me |
|
Returns the transaction's kvp_frame slots. Transaction slots are used to store arbitrary strings, numbers, and structures which aren't members of the transaction struct. |
|
The xaccTransGetSplit() method returns a pointer to each of the splits in this transaction.
|
|
The xaccTransGetSplitList() method returns a GList of the splits in a transaction.
|
|
Returns the Transaction Type See define TXN_TYPE_NONE, TXN_TYPE_INVOICE and TXN_TYPE_PAYMENT |
|
document me |
|
document me |
|
document me |
|
FIXME: document me |
|
FIXME: document me |
|
The xaccTransIsOpen() method returns TRUE if the transaction is open for editing. Otherwise, it returns false. |
|
The xaccTransLookup() subroutine will return the transaction associated with the given id, or NULL if there is no such transaction. |
|
The xaccTransLookup() subroutine will return the transaction associated with the given id, or NULL if there is no such transaction. |
|
The xaccTransOrder(ta,tb) method is useful for sorting. return a negative value if transaction ta is dated earlier than tb, return a positive value if transaction ta is dated later than tb, then compares num and description values, using the strcmp() c-library routine, returning what strcmp would return. Finally, it returns zero if all of the above match. Note that it does *NOT* compare its member splits. |
|
Dates and txn-type for A/R and A/P "invoice" postings |
|
xaccTransReturnGUID() will returns a GUID struct associated with that transaction. |
|
The xaccTransRollbackEdit() routine rejects all edits made, and sets the transaction back to where it was before the editing started. This includes restoring any deleted splits, removing any added splits, and undoing the effects of xaccTransDestroy, as well as restoring share quantities, memos, descriptions, etc. |
|
Set the commodity of this transaction. |
|
The xaccTransSetDate() method does the same thing as xaccTransSetDate[Posted]Secs(), but takes a convenient day-month-year format. (Footnote: this shouldn't matter to a user, but anyone modifying the engine should understand that when xaccTransCommitEdit() is called, the date order of each of the component splits will be checked, and will be restored in ascending date order.) |
|
Dates and txn-type for A/R and A/P "invoice" postings |
|
xaccTransSetDatePostedSecs() is just an alias for xaccTransSetDateSecs() -- both functions access the same date. |
|
The xaccTransSetDatePostedTS() method does the same thing as xaccTransSetDate[Posted]Secs(), but takes a struct timespec64. |
|
The xaccTransSetDateSecs() method will modify the posted date of the transaction, specified by a time_t (see ctime(3)). |
|
Sets the transaction Notes. The Notes field is only visible in the register in double-line mode |
|
Set the transaction to be ReadOnly |
|
Set the kvp_frame slots of this transaction to the given frm by directly using the frm pointer (i.e. non-copying). |
|
Set the Transaction Type See define TXN_TYPE_NONE, TXN_TYPE_INVOICE and TXN_TYPE_PAYMENT |
|
xaccTransactionVoid voids a transaction. A void transaction has no values, is unaffected by reconciliation, and, by default is not included in any queries. A voided transaction should not be altered (and we'll try to make it so it can't be). voiding is irreversible. Once voided, a transaction cannot be un-voided. |
|
FIXME: document me |
|
|