45 #ifndef XACC_ACCOUNT_H 46 #define XACC_ACCOUNT_H 54 typedef gnc_numeric (*xaccGetBalanceFn)(
const Account *account );
56 typedef gnc_numeric (*xaccGetBalanceInCurrencyFn) (
57 const Account *account,
const gnc_commodity *report_commodity,
58 gboolean include_children);
60 typedef gnc_numeric (*xaccGetBalanceAsOfDateFn) (
63 typedef void (*AccountCb)(
Account *a, gpointer data);
64 typedef gpointer (*AccountCb2)(
Account *a, gpointer data);
68 QofInstanceClass parent_class;
72 #define GNC_TYPE_ACCOUNT (gnc_account_get_type ()) 73 #define GNC_ACCOUNT(o) \ 74 (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_ACCOUNT, Account)) 75 #define GNC_ACCOUNT_CLASS(k) \ 76 (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_ACCOUNT, AccountClass)) 77 #define GNC_IS_ACCOUNT(o) \ 78 (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_ACCOUNT)) 79 #define GNC_IS_ACCOUNT_CLASS(k) \ 80 (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_ACCOUNT)) 81 #define GNC_ACCOUNT_GET_CLASS(o) \ 82 (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_ACCOUNT, AccountClass)) 219 gboolean check_guids);
244 gunichar gnc_get_account_separator (
void);
245 void gnc_set_account_separator (
const gchar *separator);
248 Account *gnc_book_get_root_account(QofBook *book);
249 void gnc_book_set_root_account(QofBook *book,
Account *root);
252 #define xaccAccountGetGUID(X) qof_entity_get_guid(QOF_INSTANCE(X)) 253 #define xaccAccountReturnGUID(X) (X ? *(qof_entity_get_guid(QOF_INSTANCE(X))) : *(guid_null())) 259 #define xaccAccountLookupDirect(g,b) xaccAccountLookup(&(g),b) 267 gboolean gnc_account_and_descendants_empty (
Account *acc);
300 QofBook *gnc_account_get_book(
const Account *account);
345 const gnc_numeric start_baln);
355 const gnc_numeric start_baln);
365 const gnc_numeric start_baln);
574 gnc_numeric xaccAccountGetPresentBalance (
const Account *account);
575 gnc_numeric xaccAccountGetProjectedMinimumBalance (
const Account *account);
592 gnc_numeric xaccAccountConvertBalanceToCurrency(
595 const gnc_commodity *balance_currency,
596 const gnc_commodity *new_currency);
597 gnc_numeric xaccAccountConvertBalanceToCurrencyAsOfDate(
599 gnc_numeric balance,
const gnc_commodity *balance_currency,
600 const gnc_commodity *new_currency,
time64 date);
604 gnc_numeric xaccAccountGetBalanceInCurrency (
605 const Account *account,
const gnc_commodity *report_commodity,
606 gboolean include_children);
607 gnc_numeric xaccAccountGetClearedBalanceInCurrency (
608 const Account *account,
const gnc_commodity *report_commodity,
609 gboolean include_children);
610 gnc_numeric xaccAccountGetReconciledBalanceInCurrency (
611 const Account *account,
const gnc_commodity *report_commodity,
612 gboolean include_children);
613 gnc_numeric xaccAccountGetPresentBalanceInCurrency (
614 const Account *account,
const gnc_commodity *report_commodity,
615 gboolean include_children);
616 gnc_numeric xaccAccountGetProjectedMinimumBalanceInCurrency (
617 const Account *account,
const gnc_commodity *report_commodity,
618 gboolean include_children);
624 gboolean include_children);
628 Account *account,
time64 date, gnc_commodity *report_commodity,
629 gboolean include_children);
631 gnc_numeric xaccAccountGetNoclosingBalanceChangeForPeriod (
633 gnc_numeric xaccAccountGetNoclosingBalanceChangeInCurrencyForPeriod (
635 gnc_numeric xaccAccountGetBalanceChangeForPeriod (
845 AccountCb func, gpointer user_data);
861 AccountCb func, gpointer user_data);
879 AccountCb2 func, gpointer user_data);
972 gnc_commodity* commodity);
1052 #define xaccAccountInsertSplit(acc, s) xaccSplitSetAccount((s), (acc)) 1067 size_t xaccAccountGetSplitsSize (
const Account *account);
1102 TransactionCallback proc,
1107 const char *description);
1111 const char *description);
1126 void xaccAccountRemoveLot (
Account *, GNCLot *);
1146 gpointer (*proc)(GNCLot *lot, gpointer user_data), gpointer user_data);
1155 gboolean (*match_func)(GNCLot *lot,
1156 gpointer user_data),
1157 gpointer user_data, GCompareFunc sort_func);
1173 int *months,
int *days);
1176 int months,
int days);
1186 gnc_numeric *balance);
1189 gnc_numeric balance);
1207 gnc_numeric *balance);
1231 gnc_numeric *balance);
1528 TransactionCallback thunk,
1546 TransactionCallback thunk,
1581 TransactionCallback proc,
void *data);
1585 Account* gnc_account_imap_find_account (
Account* acc,
const char* category,
1591 Account* gnc_account_imap_find_any (QofBook *book,
const char* category,
const char *key);
1595 void gnc_account_imap_add_account (
Account* acc,
const char *category,
1596 const char *key,
Account *added_acc);
1600 void gnc_account_imap_delete_account(
Account* acc,
const char* category,
const char* key);
1611 typedef struct imap_info
1646 char *match_string, gboolean empty);
1697 #define ACCOUNT_KVP "kvp" 1698 #define ACCOUNT_NAME_ "name" 1699 #define ACCOUNT_CODE_ "code" 1700 #define ACCOUNT_DESCRIPTION_ "desc" 1701 #define ACCOUNT_COLOR_ "color" 1702 #define ACCOUNT_FILTER_ "filter" 1703 #define ACCOUNT_SORT_ORDER_ "sort-order" 1704 #define ACCOUNT_SORT_REVERSED_ "sort-reversed" 1705 #define ACCOUNT_NOTES_ "notes" 1706 #define ACCOUNT_BALANCE_ "balance" 1707 #define ACCOUNT_NOCLOSING_ "noclosing" 1708 #define ACCOUNT_OPENING_BALANCE_ "opening-balance" 1709 #define ACCOUNT_CLEARED_ "cleared" 1710 #define ACCOUNT_RECONCILED_ "reconciled" 1711 #define ACCOUNT_PRESENT_ "present" 1712 #define ACCOUNT_FUTURE_MINIMUM_ "future-minimum" 1713 #define ACCOUNT_TAX_RELATED "tax-related-p" 1714 #define ACCOUNT_TYPE_ "account-type" 1715 #define ACCOUNT_SCU "smallest-commodity-unit" 1716 #define ACCOUNT_NSCU "non-standard-scu" 1717 #define ACCOUNT_PARENT "parent-account" 1723 #define ACCOUNT_MATCH_ALL_TYPE "account-match-all" void xaccAccountSetType(Account *account, GNCAccountType)
Set the account's type.
Account * gnc_account_get_parent(const Account *account)
This routine returns a pointer to the parent of the specified account.
void xaccAccountSetFilter(Account *account, const char *filter)
Set the account's Filter.
void xaccAccountSetSortOrder(Account *account, const char *sortorder)
Set the account's Sort Order.
gint xaccAccountForEachTransaction(const Account *account, TransactionCallback proc, void *data)
The xaccAccountForEachTransaction() routine will traverse all of the transactions in account and call...
int xaccAccountTreeForEachTransaction(Account *acc, TransactionCallback proc, void *data)
Traverse all of the transactions in the given account group.
int gnc_account_tree_staged_transaction_traversal(const Account *account, unsigned int stage, TransactionCallback thunk, void *data)
gnc_account_tree_staged_transaction_traversal() calls thunk on each transaction in the group whose cu...
gboolean xaccAccountGetAutoInterest(const Account *acc)
Get the "auto interest" flag for an account.
const char * xaccAccountGetLastNum(const Account *account)
Get the last num field of an Account.
GNCAccountType xaccAccountTypeGetFundamental(GNCAccountType t)
Convenience function to return the fundamental type asset/liability/income/expense/equity given an ac...
gchar * gnc_account_get_map_entry(Account *acc, const char *head, const char *category)
Returns the text string pointed to by head and category for the Account, free the returned text...
GList LotList
GList of GNCLots.
gboolean xaccAccountGetSortReversed(const Account *account)
Get the account's Sort Order direction.
guint32 xaccAccountTypesCompatibleWith(GNCAccountType type)
Return the bitmask of account types compatible with a given type.
void gnc_account_imap_info_destroy(GncImapInfo *)
Clean destructor for the imap_info structure of Bayesian mappings.
void gnc_account_append_child(Account *new_parent, Account *child)
This function will remove from the child account any pre-existing parent relationship, and will then add the account as a child of the new parent.
gpointer xaccAccountForEachLot(const Account *acc, gpointer(*proc)(GNCLot *lot, gpointer user_data), gpointer user_data)
The xaccAccountForEachLot() method will apply the function 'proc' to each lot in the account...
GList * gnc_account_get_descendants_sorted(const Account *account)
This function returns a GList containing all the descendants of the specified account, sorted at each level.
gint gnc_account_n_descendants(const Account *account)
Return the number of descendants of the specified account.
gint64 xaccAccountGetTaxUSCopyNumber(const Account *account)
Returns copy_number stored in KVP; if KVP doesn't exist or copy_number is zero, returns 1...
gboolean gnc_account_is_root(const Account *account)
This routine indicates whether the specified account is the root node of an account tree...
SplitList * xaccAccountGetSplitList(const Account *account)
The xaccAccountGetSplitList() routine returns a pointer to a GList of the splits in the account...
void xaccAccountSetAssociatedAccount(Account *acc, const char *tag, const Account *assoc_acct)
Set the account's associated account e.g.
gboolean xaccAccountGetNonStdSCU(const Account *account)
Return boolean, indicating whether this account uses a non-standard SCU.
int xaccAccountGetCommoditySCUi(const Account *account)
Return the 'internal' SCU setting.
gnc_commodity * DxaccAccountGetCurrency(const Account *account)
void gnc_account_foreach_descendant(const Account *account, AccountCb func, gpointer user_data)
This method will traverse all children of this accounts and their descendants, calling 'func' on each...
void xaccAccountSetNotes(Account *account, const char *notes)
Set the account's notes.
gboolean xaccAccountIsPriced(const Account *acc)
Returns true if the account is a stock, mutual fund or currency, otherwise false. ...
void gnc_account_delete_map_entry(Account *acc, char *head, char *category, char *match_string, gboolean empty)
Delete the entry for Account pointed to by head,category and match_string, if empty is TRUE then use ...
Expense accounts are used to denote expenses.
const char * xaccAccountGetFilter(const Account *account)
Get the account's filter.
GNCAccountType xaccAccountGetType(const Account *account)
Returns the account's account type.
void xaccAccountSetMark(Account *account, short mark)
Set a mark on the account.
int xaccAccountGetCommoditySCU(const Account *account)
Return the SCU for the account.
const char * xaccAccountGetCode(const Account *account)
Get the account's accounting code.
gboolean xaccAccountGetAppendText(const Account *account)
Get the "import-append-text" flag for an account.
void xaccAccountSetReconcileLastDate(Account *account, time64 last_date)
DOCUMENT ME!
Account * gnc_account_create_root(QofBook *book)
Create a new root level account.
void xaccAccountSetTaxRelated(Account *account, gboolean tax_related)
DOCUMENT ME!
Mutual Fund accounts will typically be shown in registers which show three columns: price...
void xaccAccountSortSplits(Account *acc, gboolean force)
The xaccAccountSortSplits() routine will resort the account's splits if the sort is dirty...
void xaccAccountSetCode(Account *account, const char *code)
Set the account's accounting code.
gpointer gnc_account_foreach_descendant_until(const Account *account, AccountCb2 func, gpointer user_data)
This method will traverse all children of this accounts and their descendants, calling 'func' on each...
void gnc_account_set_policy(Account *account, GNCPolicy *policy)
Set the account's lot order policy.
void xaccAccountSetReconcileLastInterval(Account *account, int months, int days)
DOCUMENT ME!
gboolean gnc_account_remove_split(Account *acc, Split *s)
Remove the given split from an account.
gnc_numeric xaccAccountGetBalanceAsOfDateInCurrency(Account *account, time64 date, gnc_commodity *report_commodity, gboolean include_children)
This function gets the balance at the end of the given date in the desired commodity.
guint32 xaccAccountTypesValid(void)
Returns the bitmask of the account type enums that are valid.
const char * xaccAccountTypeEnumAsString(GNCAccountType type)
Conversion routines for the account types to/from strings that are used in persistent storage...
stop here; the following types just aren't ready for prime time
GList * gnc_account_list_name_violations(QofBook *book, const gchar *separator)
Runs through all the accounts and returns a list of account names that contain the provided separator...
void xaccAccountSetHigherBalanceLimit(Account *account, gnc_numeric balance)
Set the higher balance limit for the account.
void xaccAccountInsertLot(Account *, GNCLot *)
The xaccAccountInsertLot() method will register the indicated lot with this account.
void xaccAccountMoveAllSplits(Account *accfrom, Account *accto)
The xaccAccountMoveAllSplits() routine reassigns each of the splits in accfrom to accto...
void gnc_account_set_sort_dirty(Account *acc)
Tell the account believes that the splits may be incorrectly sorted and need to be resorted...
The cash account type is used to denote a shoe-box or pillowcase stuffed with * cash.
const char * gnc_account_get_debit_string(GNCAccountType acct_type)
Get the debit string associated with this account type.
void gnc_account_imap_add_account_bayes(Account *acc, GList *tokens, Account *added_acc)
Updates the imap for a given account using a list of tokens.
void xaccAccountSetLastNum(Account *account, const char *num)
Set the last num field of an Account.
gnc_numeric xaccAccountGetClearedBalance(const Account *account)
Get the current balance of the account, only including cleared transactions.
gboolean xaccAccountGetReconcilePostponeDate(const Account *account, time64 *postpone_date)
DOCUMENT ME!
Account used to record multiple commodity transactions.
gboolean xaccAccountGetLowerBalanceLimit(const Account *account, gnc_numeric *balance)
Get the lower balance limit for the account.
void xaccAccountDestroy(Account *account)
The xaccAccountDestroy() routine can be used to get rid of an account.
gboolean xaccAccountIsHidden(const Account *acc)
Should this account be "hidden".
Account * gnc_account_lookup_by_name(const Account *parent, const char *name)
The gnc_account_lookup_by_name() subroutine fetches the account by name from the descendants of the s...
void gnc_account_remove_child(Account *parent, Account *child)
This function will remove the specified child account from the specified parent account.
int xaccAccountOrder(const Account *account_1, const Account *account_2)
The xaccAccountOrder() subroutine defines a sorting order on accounts.
Stock accounts will typically be shown in registers which show three columns: price, number of shares, and value.
const char * xaccAccountGetColor(const Account *account)
Get the account's color.
Split * xaccAccountFindSplitByDesc(const Account *account, const char *description)
Returns a pointer to the split, not a copy.
gboolean xaccAccountIsAssetLiabType(GNCAccountType t)
Convenience function to check if the account is a valid Asset or Liability type, but not a business a...
void xaccClearMarkDown(Account *account, short val)
The xaccClearMarkDown will clear the mark only in this and in sub-accounts.
GList SplitList
GList of Split.
GNCAccountType xaccAccountStringToEnum(const char *str)
Conversion routines for the account types to/from strings that are used in persistent storage...
bank account type – don't use this for now, see NUM_ACCOUNT_TYPES
gchar * gnc_account_get_full_name(const Account *account)
The gnc_account_get_full_name routine returns the fully qualified name of the account using the given...
gnc_numeric xaccAccountGetReconciledBalanceAsOfDate(Account *account, time64 date)
Get the reconciled balance of the account at the end of the day of the date specified.
void xaccAccountSetPlaceholder(Account *account, gboolean val)
Set the "placeholder" flag for an account.
gboolean xaccAccountTypesCompatible(GNCAccountType parent_type, GNCAccountType child_type)
Return TRUE if accounts of type parent_type can have accounts of type child_type as children...
gnc_numeric xaccAccountGetNoclosingBalanceAsOfDateInCurrency(Account *acc, time64 date, gnc_commodity *report_commodity, gboolean include_children)
This function gets the balance at the end of the given date, ignoring closing entries, in the desired commodity.
gchar * gnc_account_name_violations_errmsg(const gchar *separator, GList *invalid_account_names)
Composes a translatable error message showing which account names clash with the current account sepa...
void xaccAccountClearLowerBalanceLimit(Account *account)
Clear the lower balance limit for the account.
gboolean xaccTransactionTraverse(Transaction *trans, int stage)
xaccTransactionTraverse() checks the stage of the given transaction.
void xaccAccountSetColor(Account *account, const char *color)
Set the account's Color.
Transaction * xaccAccountFindTransByDesc(const Account *account, const char *description)
Returns a pointer to the transaction, not a copy.
void xaccAccountSetIncludeSubAccountBalances(Account *account, gboolean include)
Set whether to include balances of sub accounts.
void gnc_account_set_balance_dirty(Account *acc)
Tell the account that the running balances may be incorrect and need to be recomputed.
Income accounts are used to denote income.
void gnc_account_foreach_child(const Account *account, AccountCb func, gpointer user_data)
This method will traverse the immediate children of this accounts, calling 'func' on each account...
Account * gnc_account_lookup_by_code(const Account *parent, const char *code)
The gnc_account_lookup_by_code() subroutine works like gnc_account_lookup_by_name, but uses the account code.
void gnc_account_tree_begin_staged_transaction_traversals(Account *acc)
gnc_account_tree_begin_staged_transaction_traversals() resets the traversal marker inside every trans...
void dxaccAccountSetPriceSrc(Account *account, const char *src)
Set a string that identifies the Finance::Quote backend that should be used to retrieve online prices...
void xaccAccountBeginStagedTransactionTraversals(const Account *account)
xaccAccountBeginStagedTransactionTraversals() resets the traversal marker for each transaction which ...
Implement Accounting Policy.
GNCPlaceholderType xaccAccountGetDescendantPlaceholder(const Account *account)
Returns PLACEHOLDER_NONE if account is NULL or neither account nor any descendant of account is a pla...
const char * xaccAccountGetDescription(const Account *account)
Get the account's description.
void gnc_account_set_start_reconciled_balance(Account *acc, const gnc_numeric start_baln)
This function will set the starting reconciled commodity balance for this account.
void gnc_account_delete_all_bayes_maps(Account *acc)
Delete all bayes entries for Account.
const char * dxaccAccountGetQuoteTZ(const Account *account)
Get the timezone to be used when interpreting the results from a given Finance::Quote backend...
GType gnc_account_get_type(void)
Returns the GType type system description of the Account class.
line of credit – don't use this for now, see NUM_ACCOUNT_TYPES
void xaccAccountClearReconcilePostpone(Account *account)
DOCUMENT ME!
const char * xaccAccountGetTaxUSPayerNameSource(const Account *account)
DOCUMENT ME!
void gnc_account_reset_convert_bayes_to_flat(void)
Reset the flag that indicates the function imap_convert_bayes_to_flat has been run.
GList * gnc_account_get_children_sorted(const Account *account)
This routine returns a GList of all children accounts of the specified account, ordered by xaccAccoun...
The bank account type denotes a savings or checking account held at a bank.
LotList * xaccAccountGetLotList(const Account *account)
The xaccAccountGetLotList() routine returns a list of all lots in this account.
void xaccAccountRecomputeBalance(Account *)
The following recompute the partial balances (stored with the transaction) and the total balance...
GList * gnc_account_imap_get_info_bayes(Account *acc)
Returns a GList of structure imap_info of all Bayesian mappings for required Account.
GList * gnc_account_imap_get_info(Account *acc, const char *category)
Returns a GList of structure imap_info of all Non Bayesian mappings for required Account.
Account * gnc_account_lookup_by_full_name(const Account *any_account, const gchar *name)
The gnc_account_lookup_full_name() subroutine works like gnc_account_lookup_by_name, but uses fully-qualified names using the given separator.
gboolean gnc_account_get_defer_bal_computation(Account *acc)
Get the account's flag for deferred balance computation.
void xaccAccountSetReconcilePostponeDate(Account *account, time64 postpone_date)
DOCUMENT ME!
const char * xaccAccountGetTaxUSCode(const Account *account)
DOCUMENT ME!
gboolean xaccAccountIsAPARType(GNCAccountType t)
Convenience function to check if the account is a valid business account type (meaning an Accounts Pa...
bank account type – don't use this for now, see NUM_ACCOUNT_TYPES
gboolean xaccAccountStringToType(const char *str, GNCAccountType *type)
Conversion routines for the account types to/from strings that are used in persistent storage...
void xaccAccountSetIsOpeningBalance(Account *account, gboolean val)
Set the "opening-balance" flag for an account.
void xaccAccountSetReconcilePostponeBalance(Account *account, gnc_numeric balance)
DOCUMENT ME!
gboolean xaccAccountEqual(const Account *a, const Account *b, gboolean check_guids)
Compare two accounts for equality - this is a deep compare.
gboolean xaccAccountGetTaxRelated(const Account *account)
DOCUMENT ME!
void gnc_account_set_start_cleared_balance(Account *acc, const gnc_numeric start_baln)
This function will set the starting cleared commodity balance for this account.
Account * xaccCloneAccount(const Account *source, QofBook *book)
The xaccCloneAccount() routine makes a simple copy of the indicated account, placing it in the indica...
gnc_numeric xaccAccountGetReconciledBalance(const Account *account)
Get the current balance of the account, only including reconciled transactions.
asset (and liability) accounts indicate generic, generalized accounts that are none of the above...
gint gnc_account_n_children(const Account *account)
Return the number of children of the specified account.
void gnc_account_join_children(Account *to_parent, Account *from_parent)
The gnc_account_join_children() subroutine will move (reparent) all child accounts from the from_pare...
gnc_numeric xaccAccountGetBalanceAsOfDate(Account *account, time64 date)
Get the balance of the account at the end of the day before the date specified.
All type declarations for the whole Gnucash engine.
gnc_numeric xaccAccountGetBalance(const Account *account)
Get the current balance of the account, which may include future splits.
gboolean xaccAccountGetReconcileLastDate(const Account *account, time64 *last_date)
DOCUMENT ME!
void dxaccAccountSetQuoteTZ(Account *account, const char *tz)
Set the timezone to be used when interpreting the results from a given Finance::Quote backend...
The currency account type indicates that the account is a currency trading account.
void xaccAccountSetCommoditySCU(Account *account, int frac)
Set the SCU for the account.
GNCAccountType
The account types are used to determine how the transaction data in the account is displayed...
gnc_commodity * gnc_account_get_currency_or_parent(const Account *account)
Returns a gnc_commodity that is a currency, suitable for being a Transaction's currency.
Account * xaccAccountGetAssociatedAccount(const Account *acc, const char *tag)
Get the account's associated account e.g.
gboolean xaccAccountGetHidden(const Account *acc)
Get the "hidden" flag for an account.
void xaccAccountSetAppendText(Account *account, gboolean val)
Set the "import-append-text" flag for an account.
gboolean gnc_account_insert_split(Account *acc, Split *s)
Insert the given split from an account.
GList * gnc_account_get_descendants(const Account *account)
This routine returns a flat list of all of the accounts that are descendants of the specified account...
void xaccAccountSetAutoInterest(Account *acc, gboolean val)
Set the "auto interest" flag for an account.
void xaccAccountSetTaxUSCode(Account *account, const char *code)
DOCUMENT ME!
GNCPlaceholderType
DOCUMENT ME!
gboolean xaccAccountGetIsOpeningBalance(const Account *account)
Get the "opening-balance" flag for an account.
guint32 xaccParentAccountTypesCompatibleWith(GNCAccountType type)
Return the bitmask of parent account types compatible with a given type.
gboolean xaccAccountGetReconcileChildrenStatus(const Account *account)
DOCUMENT ME!
gboolean xaccAccountGetReconcileLastInterval(const Account *account, int *months, int *days)
DOCUMENT ME!
gboolean xaccAccountGetIncludeSubAccountBalances(const Account *account)
Get whether to include balances of sub accounts.
const char * dxaccAccountGetPriceSrc(const Account *account)
Get a string that identifies the Finance::Quote backend that should be used to retrieve online prices...
liability (and asset) accounts indicate generic, generalized accounts that are none of the above...
const char * gnc_account_get_credit_string(GNCAccountType acct_type)
Get the credit string associated with this account type.
void xaccAccountDestroyAllTransactions(Account *acc)
Destroy all of the transactions that parent splits in an account.
GList * gnc_account_get_children(const Account *account)
This routine returns a GList of all children accounts of the specified account.
void xaccAccountSetHidden(Account *acc, gboolean val)
Set the "hidden" flag for an account.
void xaccAccountBeginEdit(Account *account)
The xaccAccountBeginEdit() subroutine is the first phase of a two-phase-commit wrapper for account up...
gboolean xaccAccountHasAncestor(const Account *acc, const Account *ancestor)
Returns true if the account is 'ancestor' or has 'ancestor' as an ancestor.
gnc_commodity * xaccAccountGetCommodity(const Account *account)
Get the account's commodity.
gboolean xaccAccountGetPlaceholder(const Account *account)
Get the "placeholder" flag for an account.
gint gnc_account_get_current_depth(const Account *account)
Return the number of levels of this account below the root account.
void xaccAccountSetSortReversed(Account *account, gboolean sortreversed)
Set the account's Sort Order direction.
bank account type – don't use this for now, see NUM_ACCOUNT_TYPES
void xaccAccountSetLowerBalanceLimit(Account *account, gnc_numeric balance)
Set the lower balance limit for the account.
Account * xaccAccountGainsAccount(Account *acc, gnc_commodity *curr)
Retrieve the gains account used by this account for the indicated currency, creating and recording a ...
gboolean xaccAccountGetHigherBalanceLimit(const Account *account, gnc_numeric *balance)
Get the higher balance limit for the account.
Account * gnc_account_nth_child(const Account *parent, gint num)
Return the n'th child account of the specified parent account.
Account * xaccMallocAccount(QofBook *book)
Constructor.
gint gnc_account_child_index(const Account *parent, const Account *child)
Return the index of the specified child within the list of the parent's children. ...
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
void xaccAccountSetTaxUSPayerNameSource(Account *account, const char *source)
DOCUMENT ME!
void xaccAccountSetDescription(Account *account, const char *desc)
Set the account's description.
void DxaccAccountSetCurrency(Account *account, gnc_commodity *currency)
void gnc_account_set_start_balance(Account *acc, const gnc_numeric start_baln)
This function will set the starting commodity balance for this account.
void xaccAccountSetNonStdSCU(Account *account, gboolean flag)
Set the flag indicating that this account uses a non-standard SCU.
LotList * xaccAccountFindOpenLots(const Account *acc, gboolean(*match_func)(GNCLot *lot, gpointer user_data), gpointer user_data, GCompareFunc sort_func)
Find a list of open lots that match the match_func.
Account * gnc_account_get_root(Account *account)
This routine returns the root account of the account tree that the specified account belongs to...
Account * gnc_account_lookup_by_opening_balance(Account *account, gnc_commodity *commodity)
Find the opening balance account for the currency.
void xaccAccountClearHigherBalanceLimit(Account *account)
Clear the higher balance limit for the account.
void gnc_account_set_defer_bal_computation(Account *acc, gboolean defer)
Set the defer balance flag.
const char * xaccAccountGetName(const Account *account)
Get the account's name.
Equity account is used to balance the balance sheet.
const char * xaccAccountGetTypeStr(GNCAccountType type)
The xaccAccountGetTypeStr() routine returns a string suitable for use in the GUI/Interface.
const char * xaccAccountGetSortOrder(const Account *account)
Get the account's Sort Order.
The type used to store guids in C.
int xaccAccountStagedTransactionTraversal(const Account *a, unsigned int stage, TransactionCallback thunk, void *data)
xaccAccountStagedTransactionTraversal() calls thunk on each transaction in account a whose current ma...
void xaccAccountCommitEdit(Account *account)
ThexaccAccountCommitEdit() subroutine is the second phase of a two-phase-commit wrapper for account u...
void xaccClearMark(Account *account, short val)
Get the mark set by xaccAccountSetMark short xaccAccountGetMark (const Account *account);.
void xaccAccountSetName(Account *account, const char *name)
Set the account's name.
The hidden root account of an account tree.
GNCPolicy * gnc_account_get_policy(Account *account)
Get the account's lot order policy.
void gnc_account_merge_children(Account *parent)
The gnc_account_merge_children() subroutine will go through an account, merging all child accounts th...
gboolean xaccAccountIsEquityType(GNCAccountType t)
Convenience function to check if the account is a valid Equity type.
void xaccAccountSetReconcileChildrenStatus(Account *account, gboolean status)
DOCUMENT ME!
The Credit card account is used to denote credit (e.g.
const gchar * gnc_get_account_separator_string(void)
Returns the account separation character chosen by the user.
void xaccAccountSetCommodity(Account *account, gnc_commodity *comm)
Set the account's commodity.
GList * gnc_account_lookup_by_type_and_commodity(Account *root, const char *name, GNCAccountType acctype, gnc_commodity *commodity)
Find a direct child account matching name, GNCAccountType, and/or commodity.
const char * xaccAccountGetNotes(const Account *account)
Get the account's notes.
gboolean xaccAccountGetReconcilePostponeBalance(const Account *account, gnc_numeric *balance)
DOCUMENT ME!
gint gnc_account_get_tree_depth(const Account *account)
Return the number of levels of descendants accounts below the specified account.
Account * gnc_account_imap_find_account_bayes(Account *acc, GList *tokens)
Look up an Account in the map using Baysian.
Account * xaccAccountLookup(const GncGUID *guid, QofBook *book)
The xaccAccountLookup() subroutine will return the account associated with the given id...
void xaccAccountSetTaxUSCopyNumber(Account *account, gint64 copy_number)
Saves copy_number in KVP if it is greater than 1; if copy_number is zero, deletes KVP...