GnuCash  4.901
Account.h
Go to the documentation of this file.
1 /********************************************************************\
2  * This program is free software; you can redistribute it and/or *
3  * modify it under the terms of the GNU General Public License as *
4  * published by the Free Software Foundation; either version 2 of *
5  * the License, or (at your option) any later version. *
6  * *
7  * This program is distributed in the hope that it will be useful, *
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
10  * GNU General Public License for more details. *
11  * *
12  * You should have received a copy of the GNU General Public License*
13  * along with this program; if not, contact: *
14  * *
15  * Free Software Foundation Voice: +1-617-542-5942 *
16  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
17  * Boston, MA 02110-1301, USA gnu@gnu.org *
18  * *
19 \********************************************************************/
45 #ifndef XACC_ACCOUNT_H
46 #define XACC_ACCOUNT_H
47 #include "qof.h"
48 #include "gnc-engine.h"
49 #include "policy.h"
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 typedef gnc_numeric (*xaccGetBalanceFn)( const Account *account );
55 
56 typedef gnc_numeric (*xaccGetBalanceInCurrencyFn) (
57  const Account *account, const gnc_commodity *report_commodity,
58  gboolean include_children);
59 
60 typedef gnc_numeric (*xaccGetBalanceAsOfDateFn) (
61  Account *account, time64 date);
62 
63 typedef void (*AccountCb)(Account *a, gpointer data);
64 typedef gpointer (*AccountCb2)(Account *a, gpointer data);
65 
66 typedef struct
67 {
68  QofInstanceClass parent_class;
69 } AccountClass;
70 
71 /* --- type macros --- */
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))
83 
87 GType gnc_account_get_type(void);
88 
98 #ifdef __cplusplus
99 enum GNCAccountType
100 #else
101 typedef enum
102 #endif
103 {
164  /* bank account types */
173  ACCT_TYPE_LAST
174 #ifdef __cplusplus
175 };
176 #else
178 #endif
179 
180 
185  Account * xaccMallocAccount (QofBook *book);
186 
188  Account * gnc_account_create_root (QofBook *book);
189 
198  Account * xaccCloneAccount (const Account *source, QofBook *book);
199 
202  void xaccAccountBeginEdit (Account *account);
203 
206  void xaccAccountCommitEdit (Account *account);
207 
211  void xaccAccountDestroy (Account *account);
212 
214  gboolean xaccAccountEqual(const Account *a, const Account* b,
215  gboolean check_guids);
216 
226  int xaccAccountOrder (const Account *account_1, const Account *account_2);
227 
230  /* ------------------ */
231 
239  const gchar *gnc_get_account_separator_string (void);
240  gunichar gnc_get_account_separator (void);
241  void gnc_set_account_separator (const gchar *separator);
242 
243  /*@ dependent @*/
244  Account *gnc_book_get_root_account(QofBook *book);
245  void gnc_book_set_root_account(QofBook *book, Account *root);
246 
248 #define xaccAccountGetGUID(X) qof_entity_get_guid(QOF_INSTANCE(X))
249 #define xaccAccountReturnGUID(X) (X ? *(qof_entity_get_guid(QOF_INSTANCE(X))) : *(guid_null()))
250 
254  /*@ dependent @*/ Account * xaccAccountLookup (const GncGUID *guid, QofBook *book);
255 #define xaccAccountLookupDirect(g,b) xaccAccountLookup(&(g),b)
256 
259  /* Tests account and descendants -- if all have no splits then return TRUE.
260  * Otherwise if any account or its descendants have split return FALSE.
261  */
262 
263  gboolean gnc_account_and_descendants_empty (Account *acc);
264 
277  gchar *gnc_account_name_violations_errmsg (const gchar *separator, GList* invalid_account_names);
278 
289  GList *gnc_account_list_name_violations (QofBook *book, const gchar *separator);
290 
291  /* ------------------ */
292 
296  QofBook *gnc_account_get_book(const Account *account);
298  void xaccAccountSetType (Account *account, GNCAccountType);
300  void xaccAccountSetName (Account *account, const char *name);
302  void xaccAccountSetCode (Account *account, const char *code);
304  void xaccAccountSetDescription (Account *account, const char *desc);
306  void xaccAccountSetColor (Account *account, const char *color);
308  void xaccAccountSetFilter (Account *account, const char *filter);
310  void xaccAccountSetSortOrder (Account *account, const char *sortorder);
312  void xaccAccountSetSortReversed (Account *account, gboolean sortreversed);
314  void xaccAccountSetNotes (Account *account, const char *notes);
316  void xaccAccountSetLastNum (Account *account, const char *num);
318  void gnc_account_set_policy (Account *account, GNCPolicy *policy);
323  GNCAccountType xaccAccountGetType (const Account *account);
326  gboolean xaccAccountIsPriced(const Account *acc);
327 
336  const gnc_numeric start_baln);
337 
346  const gnc_numeric start_baln);
347 
356  const gnc_numeric start_baln);
357 
363 
369 
379  void gnc_account_set_defer_bal_computation (Account *acc, gboolean defer);
380 
390  gboolean gnc_account_insert_split (Account *acc, Split *s);
391 
401  gboolean gnc_account_remove_split (Account *acc, Split *s);
402 
404  const char * xaccAccountGetName (const Account *account);
406  const char * xaccAccountGetCode (const Account *account);
408  const char * xaccAccountGetDescription (const Account *account);
410  const char * xaccAccountGetColor (const Account *account);
412  const char * xaccAccountGetFilter (const Account *account);
414  const char * xaccAccountGetSortOrder (const Account *account);
416  gboolean xaccAccountGetSortReversed (const Account *account);
418  const char * xaccAccountGetNotes (const Account *account);
420  const char * xaccAccountGetLastNum (const Account *account);
422  GNCPolicy *gnc_account_get_policy (Account *account);
425 
430 
435  void xaccAccountSortSplits (Account *acc, gboolean force);
436 
450  gchar * gnc_account_get_full_name (const Account *account);
451 
462  Account * xaccAccountGainsAccount (Account *acc, gnc_commodity *curr);
469  void dxaccAccountSetPriceSrc (Account *account, const char *src);
476  const char * dxaccAccountGetPriceSrc (const Account *account);
511  void xaccAccountSetCommodity (Account *account, gnc_commodity *comm);
512 
514  /*@ dependent @*/
515  gnc_commodity * xaccAccountGetCommodity (const Account *account);
516 
523  gnc_commodity * gnc_account_get_currency_or_parent(const Account* account);
524 
529  int xaccAccountGetCommoditySCU (const Account *account);
530 
533  int xaccAccountGetCommoditySCUi (const Account *account);
534 
539  void xaccAccountSetCommoditySCU (Account *account, int frac);
540 
542  void xaccAccountSetNonStdSCU (Account *account, gboolean flag);
543 
546  gboolean xaccAccountGetNonStdSCU (const Account *account);
555  gnc_numeric xaccAccountGetBalance (const Account *account);
558  gnc_numeric xaccAccountGetClearedBalance (const Account *account);
561  gnc_numeric xaccAccountGetReconciledBalance (const Account *account);
562  gnc_numeric xaccAccountGetPresentBalance (const Account *account);
563  gnc_numeric xaccAccountGetProjectedMinimumBalance (const Account *account);
565  gnc_numeric xaccAccountGetBalanceAsOfDate (Account *account,
566  time64 date);
567 
569  gnc_numeric xaccAccountGetReconciledBalanceAsOfDate (Account *account, time64 date);
570 
571  /* These two functions convert a given balance from one commodity to
572  another. The account argument is only used to get the Book, and
573  may have nothing to do with the supplied balance. Likewise, the
574  date argument is only used for commodity conversion and may have
575  nothing to do with supplied balance.
576 
577  Since they really have nothing to do with Accounts, there's
578  probably some better place for them, but where? gnc-commodity.h?
579  */
580  gnc_numeric xaccAccountConvertBalanceToCurrency(
581  const Account *account, /* for book */
582  gnc_numeric balance,
583  const gnc_commodity *balance_currency,
584  const gnc_commodity *new_currency);
585  gnc_numeric xaccAccountConvertBalanceToCurrencyAsOfDate(
586  const Account *account, /* for book */
587  gnc_numeric balance, const gnc_commodity *balance_currency,
588  const gnc_commodity *new_currency, time64 date);
589 
590  /* These functions get some type of balance in the desired commodity.
591  'report_commodity' may be NULL to use the account's commodity. */
592  gnc_numeric xaccAccountGetBalanceInCurrency (
593  const Account *account, const gnc_commodity *report_commodity,
594  gboolean include_children);
595  gnc_numeric xaccAccountGetClearedBalanceInCurrency (
596  const Account *account, const gnc_commodity *report_commodity,
597  gboolean include_children);
598  gnc_numeric xaccAccountGetReconciledBalanceInCurrency (
599  const Account *account, const gnc_commodity *report_commodity,
600  gboolean include_children);
601  gnc_numeric xaccAccountGetPresentBalanceInCurrency (
602  const Account *account, const gnc_commodity *report_commodity,
603  gboolean include_children);
604  gnc_numeric xaccAccountGetProjectedMinimumBalanceInCurrency (
605  const Account *account, const gnc_commodity *report_commodity,
606  gboolean include_children);
607 
611  Account *acc, time64 date, gnc_commodity *report_commodity,
612  gboolean include_children);
616  Account *account, time64 date, gnc_commodity *report_commodity,
617  gboolean include_children);
618 
619  gnc_numeric xaccAccountGetNoclosingBalanceChangeForPeriod (
620  Account *acc, time64 date1, time64 date2, gboolean recurse);
621  gnc_numeric xaccAccountGetBalanceChangeForPeriod (
622  Account *acc, time64 date1, time64 date2, gboolean recurse);
623 
654  void gnc_account_append_child (Account *new_parent, Account *child);
655 
666  void gnc_account_remove_child (Account *parent, Account *child);
667 
676  /*@ dependent @*/
677  Account * gnc_account_get_parent (const Account *account);
678 
688  Account * gnc_account_get_root (Account *account);
689 
696  gboolean gnc_account_is_root (const Account *account);
697 
712  GList *gnc_account_get_children (const Account *account);
713 
717  GList *gnc_account_get_children_sorted (const Account *account);
718 
725  gint gnc_account_n_children (const Account *account);
726 
738  gint gnc_account_child_index (const Account *parent, const Account *child);
739 
750  Account *gnc_account_nth_child (const Account *parent, gint num);
751 
767  GList * gnc_account_get_descendants (const Account *account);
768 
787  GList *gnc_account_get_descendants_sorted (const Account *account);
788 
795  gint gnc_account_n_descendants (const Account *account);
796 
803  gint gnc_account_get_current_depth (const Account *account);
804 
812  gint gnc_account_get_tree_depth (const Account *account);
813 
830  void gnc_account_foreach_child (const Account *account,
831  AccountCb func, /*@ null @*/ gpointer user_data);
832 
846  void gnc_account_foreach_descendant (const Account *account,
847  AccountCb func, /*@ null @*/ gpointer user_data);
848 
864  gpointer gnc_account_foreach_descendant_until (const Account *account,
865  AccountCb2 func, /*@ null @*/ gpointer user_data);
866 
867 
880  void gnc_account_join_children (Account *to_parent, Account *from_parent);
881 
887  void gnc_account_merge_children (Account *parent);
888 
892  void xaccAccountSetReconcileChildrenStatus(Account *account, gboolean status);
893 
895  gboolean xaccAccountGetReconcileChildrenStatus(const Account *account);
896 
902  gboolean xaccAccountHasAncestor(const Account *acc, const Account *ancestor);
903 
918  Account *gnc_account_lookup_by_name (const Account *parent, const char *name);
919 
924  Account *gnc_account_lookup_by_full_name (const Account *any_account,
925  const gchar *name);
926 
931  const char *code);
932 
939  Account *gnc_account_lookup_by_opening_balance (Account *account, gnc_commodity *commodity);
940 
956  const char* name,
957  GNCAccountType acctype,
958  gnc_commodity* commodity);
961  /* ------------------ */
962 
971  const char * xaccAccountTypeEnumAsString (GNCAccountType type);
977  gboolean xaccAccountStringToType (const char* str, GNCAccountType *type);
983  GNCAccountType xaccAccountStringToEnum (const char* str);
984 
988  const char * xaccAccountGetTypeStr (GNCAccountType type);
989 
994 
997 
1000  gboolean xaccAccountTypesCompatible (GNCAccountType parent_type,
1001  GNCAccountType child_type);
1002 
1005  guint32 xaccAccountTypesValid(void);
1006 
1011 
1015 
1016 
1021 
1025 
1026 
1029  /* ------------------ */
1030 
1038 #define xaccAccountInsertSplit(acc, s) xaccSplitSetAccount((s), (acc))
1039 
1051  SplitList* xaccAccountGetSplitList (const Account *account);
1052 
1055  void xaccAccountMoveAllSplits (Account *accfrom, Account *accto);
1056 
1085  gint xaccAccountForEachTransaction(const Account *account,
1086  TransactionCallback proc,
1087  void *data);
1088 
1090  Transaction * xaccAccountFindTransByDesc(const Account *account,
1091  const char *description);
1092 
1094  Split * xaccAccountFindSplitByDesc(const Account *account,
1095  const char *description);
1096 
1099  /* ------------------ */
1100 
1109  void xaccAccountInsertLot (Account *, GNCLot *);
1110  void xaccAccountRemoveLot (Account *, GNCLot *);
1111 
1120  LotList* xaccAccountGetLotList (const Account *account);
1121 
1128  gpointer xaccAccountForEachLot(
1129  const Account *acc,
1130  gpointer (*proc)(GNCLot *lot, gpointer user_data), /*@ null @*/ gpointer user_data);
1131 
1132 
1138  LotList * xaccAccountFindOpenLots (const Account *acc,
1139  gboolean (*match_func)(GNCLot *lot,
1140  gpointer user_data),
1141  /*@ null @*/ gpointer user_data, GCompareFunc sort_func);
1142 
1144  /* ------------------ */
1145 
1150  gboolean xaccAccountGetReconcileLastDate (const Account *account,
1151  time64 *last_date);
1153  void xaccAccountSetReconcileLastDate (Account *account, time64 last_date);
1154 
1156  gboolean xaccAccountGetReconcileLastInterval (const Account *account,
1157  int *months, int *days);
1160  int months, int days);
1162  gboolean xaccAccountGetReconcilePostponeDate (const Account *account,
1163  time64 *postpone_date);
1166  time64 postpone_date);
1167 
1169  gboolean xaccAccountGetReconcilePostponeBalance (const Account *account,
1170  gnc_numeric *balance);
1173  gnc_numeric balance);
1174 
1190  gboolean xaccAccountGetHigherBalanceLimit (const Account *account,
1191  gnc_numeric *balance);
1192 
1199  void xaccAccountSetHigherBalanceLimit (Account *account, gnc_numeric balance);
1200 
1206 
1214  gboolean xaccAccountGetLowerBalanceLimit (const Account *account,
1215  gnc_numeric *balance);
1216 
1223  void xaccAccountSetLowerBalanceLimit (Account *account, gnc_numeric balance);
1224 
1230 
1237  gboolean xaccAccountGetIncludeSubAccountBalances (const Account *account);
1238 
1245  void xaccAccountSetIncludeSubAccountBalances (Account *account, gboolean include);
1249  typedef enum
1250  {
1251  PLACEHOLDER_NONE,
1252  PLACEHOLDER_THIS,
1253  PLACEHOLDER_CHILD,
1255 
1266  gboolean xaccAccountGetPlaceholder (const Account *account);
1267 
1274  void xaccAccountSetPlaceholder (Account *account, gboolean val);
1275 
1288  gboolean xaccAccountGetAppendText (const Account *account);
1289 
1298  void xaccAccountSetAppendText (Account *account, gboolean val);
1299 
1306  gboolean xaccAccountGetIsOpeningBalance (const Account *account);
1307 
1314  void xaccAccountSetIsOpeningBalance (Account *account, gboolean val);
1315 
1335  gboolean xaccAccountGetHidden (const Account *acc);
1336 
1344  void xaccAccountSetHidden (Account *acc, gboolean val);
1345 
1355  gboolean xaccAccountIsHidden (const Account *acc);
1368  gboolean xaccAccountGetAutoInterest (const Account *acc);
1369 
1376  void xaccAccountSetAutoInterest (Account *acc, gboolean val);
1377 
1386  gboolean xaccAccountGetTaxRelated (const Account *account);
1388  void xaccAccountSetTaxRelated (Account *account, gboolean tax_related);
1390  const char * xaccAccountGetTaxUSCode (const Account *account);
1392  void xaccAccountSetTaxUSCode (Account *account, const char *code);
1394  const char * xaccAccountGetTaxUSPayerNameSource (const Account *account);
1396  void xaccAccountSetTaxUSPayerNameSource (Account *account, const char *source);
1398  gint64 xaccAccountGetTaxUSCopyNumber (const Account *account);
1400  void xaccAccountSetTaxUSCopyNumber (Account *account, gint64 copy_number);
1408  const char *gnc_account_get_debit_string (GNCAccountType acct_type);
1410  const char *gnc_account_get_credit_string (GNCAccountType acct_type);
1411 
1424  void xaccAccountSetMark (Account *account, short mark);
1425 
1431  void xaccClearMark (Account *account, short val);
1432 
1435  void xaccClearMarkDown (Account *account, short val);
1483 
1489 
1495 
1501  gboolean xaccTransactionTraverse(Transaction *trans, int stage);
1502 
1517  unsigned int stage,
1518  TransactionCallback thunk,
1519  void *data);
1520 
1535  unsigned int stage,
1536  TransactionCallback thunk,
1537  void *data);
1538 
1571  TransactionCallback proc, void *data);
1572 
1573  /* Look up an Account in the map non-Baysian
1574  */
1575  Account* gnc_account_imap_find_account (Account* acc, const char* category,
1576  const char *key);
1577 
1578  /* Store an Account in the map non Baysian
1579  */
1580  void gnc_account_imap_add_account (Account* acc, const char *category,
1581  const char *key, Account *added_acc);
1582 
1583  /* Remove a reference to an Account in the map non Baysian
1584  */
1585  void gnc_account_imap_delete_account(Account* acc, const char* category, const char* key);
1586 
1589  Account* gnc_account_imap_find_account_bayes (Account* acc, GList* tokens);
1590 
1593  void gnc_account_imap_add_account_bayes (Account* acc, GList* tokens,
1594  Account *added_acc);
1595 
1596  typedef struct imap_info
1597  {
1598  Account *source_account;
1599  Account *map_account;
1600  GList *list;
1601  char *head;
1602  char *category;
1603  char *match_string;
1604  char *count;
1605  }GncImapInfo;
1606 
1611 
1615  GList *gnc_account_imap_get_info (Account *acc, const char *category);
1616 
1620  gchar *gnc_account_get_map_entry (Account *acc, const char *head, const char *category);
1621 
1625  void gnc_account_delete_map_entry (Account *acc, char *head, char *category,
1626  char *match_string, gboolean empty);
1627 
1631 
1636 
1649  void DxaccAccountSetCurrency (Account *account, gnc_commodity *currency);
1650 
1654  gnc_commodity * DxaccAccountGetCurrency (const Account *account);
1655 
1663  void dxaccAccountSetQuoteTZ (Account *account, const char *tz);
1671  const char * dxaccAccountGetQuoteTZ (const Account *account);
1674  GList * gnc_accounts_and_all_descendants (GList *accounts);
1675 
1679 #define ACCOUNT_KVP "kvp"
1680 #define ACCOUNT_NAME_ "name"
1681 #define ACCOUNT_CODE_ "code"
1682 #define ACCOUNT_DESCRIPTION_ "desc"
1683 #define ACCOUNT_COLOR_ "color"
1684 #define ACCOUNT_FILTER_ "filter"
1685 #define ACCOUNT_SORT_ORDER_ "sort-order"
1686 #define ACCOUNT_SORT_REVERSED_ "sort-reversed"
1687 #define ACCOUNT_NOTES_ "notes"
1688 #define ACCOUNT_BALANCE_ "balance"
1689 #define ACCOUNT_NOCLOSING_ "noclosing"
1690 #define ACCOUNT_OPENING_BALANCE_ "opening-balance"
1691 #define ACCOUNT_CLEARED_ "cleared"
1692 #define ACCOUNT_RECONCILED_ "reconciled"
1693 #define ACCOUNT_PRESENT_ "present"
1694 #define ACCOUNT_FUTURE_MINIMUM_ "future-minimum"
1695 #define ACCOUNT_TAX_RELATED "tax-related-p"
1696 #define ACCOUNT_TYPE_ "account-type"
1697 #define ACCOUNT_SCU "smallest-commodity-unit"
1698 #define ACCOUNT_NSCU "non-standard-scu"
1699 #define ACCOUNT_PARENT "parent-account"
1700 
1705 #define ACCOUNT_MATCH_ALL_TYPE "account-match-all"
1706 
1707 #ifdef __cplusplus
1708  } /* extern "C" */
1709 #endif
1710 
1711 #endif /* XACC_ACCOUNT_H */
1712 
void xaccAccountSetType(Account *account, GNCAccountType)
Set the account's type.
Definition: Account.cpp:2435
Account * gnc_account_get_parent(const Account *account)
This routine returns a pointer to the parent of the specified account.
Definition: Account.cpp:2908
void xaccAccountSetFilter(Account *account, const char *filter)
Set the account's Filter.
Definition: Account.cpp:2585
void xaccAccountSetSortOrder(Account *account, const char *sortorder)
Set the account's Sort Order.
Definition: Account.cpp:2595
gint xaccAccountForEachTransaction(const Account *account, TransactionCallback proc, void *data)
The xaccAccountForEachTransaction() routine will traverse all of the transactions in account and call...
Definition: Account.cpp:5692
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...
Definition: Account.cpp:5635
gboolean xaccAccountGetAutoInterest(const Account *acc)
Get the "auto interest" flag for an account.
Definition: Account.cpp:4324
const char * xaccAccountGetLastNum(const Account *account)
Get the last num field of an Account.
Definition: Account.cpp:4921
GNCAccountType xaccAccountTypeGetFundamental(GNCAccountType t)
Convenience function to return the fundamental type asset/liability/income/expense/equity given an ac...
Definition: Account.cpp:4644
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...
Definition: Account.cpp:6277
GList LotList
GList of GNCLots.
Definition: gnc-engine.h:205
gboolean xaccAccountGetSortReversed(const Account *account)
Get the account's Sort Order direction.
Definition: Account.cpp:3409
guint32 xaccAccountTypesCompatibleWith(GNCAccountType type)
Return the bitmask of account types compatible with a given type.
Definition: Account.cpp:4516
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.
Definition: Account.cpp:2810
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.
Definition: Account.cpp:3053
gint gnc_account_n_descendants(const Account *account)
Return the number of descendants of the specified account.
Definition: Account.cpp:2990
gint64 xaccAccountGetTaxUSCopyNumber(const Account *account)
DOCUMENT ME!
Definition: Account.cpp:4184
gboolean gnc_account_is_root(const Account *account)
This routine indicates whether the specified account is the root node of an account tree...
Definition: Account.cpp:2932
SplitList * xaccAccountGetSplitList(const Account *account)
The xaccAccountGetSplitList() routine returns a pointer to a GList of the splits in the account...
Definition: Account.cpp:4016
gboolean xaccAccountGetNonStdSCU(const Account *account)
Return boolean, indicating whether this account uses a non-standard SCU.
Definition: Account.cpp:2739
int xaccAccountGetCommoditySCUi(const Account *account)
Return the 'internal' SCU setting.
Definition: Account.cpp:2703
gnc_commodity * DxaccAccountGetCurrency(const Account *account)
Definition: Account.cpp:3435
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...
Definition: Account.cpp:3254
void xaccAccountSetNotes(Account *account, const char *notes)
Set the account's notes.
Definition: Account.cpp:2631
gboolean xaccAccountIsPriced(const Account *acc)
Returns true if the account is a stock, mutual fund or currency, otherwise false. ...
Definition: Account.cpp:4700
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 ...
Definition: Account.cpp:6287
Expense accounts are used to denote expenses.
Definition: Account.h:143
const char * xaccAccountGetFilter(const Account *account)
Get the account's filter.
Definition: Account.cpp:3389
GNCAccountType xaccAccountGetType(const Account *account)
Returns the account's account type.
Definition: Account.cpp:3288
void xaccAccountSetMark(Account *account, short mark)
Set a mark on the account.
Definition: Account.cpp:2071
int xaccAccountGetCommoditySCU(const Account *account)
Return the SCU for the account.
Definition: Account.cpp:2710
const char * xaccAccountGetCode(const Account *account)
Get the account's accounting code.
Definition: Account.cpp:3365
gboolean xaccAccountGetAppendText(const Account *account)
Get the "import-append-text" flag for an account.
Definition: Account.cpp:4262
void xaccAccountSetReconcileLastDate(Account *account, time64 last_date)
DOCUMENT ME!
Definition: Account.cpp:4740
Account * gnc_account_create_root(QofBook *book)
Create a new root level account.
Definition: Account.cpp:1251
void xaccAccountSetTaxRelated(Account *account, gboolean tax_related)
DOCUMENT ME!
Definition: Account.cpp:4140
Mutual Fund accounts will typically be shown in registers which show three columns: price...
Definition: Account.h:125
void xaccAccountSortSplits(Account *acc, gboolean force)
The xaccAccountSortSplits() routine will resort the account's splits if the sort is dirty...
Definition: Account.cpp:2013
void xaccAccountSetCode(Account *account, const char *code)
Set the account's accounting code.
Definition: Account.cpp:2476
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...
Definition: Account.cpp:3262
void gnc_account_set_policy(Account *account, GNCPolicy *policy)
Set the account's lot order policy.
Definition: Account.cpp:2120
void xaccAccountSetReconcileLastInterval(Account *account, int months, int days)
DOCUMENT ME!
Definition: Account.cpp:4792
gboolean gnc_account_remove_split(Account *acc, Split *s)
Remove the given split from an account.
Definition: Account.cpp:1988
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.
Definition: Account.cpp:3959
guint32 xaccAccountTypesValid(void)
Returns the bitmask of the account type enums that are valid.
Definition: Account.cpp:4621
const char * xaccAccountTypeEnumAsString(GNCAccountType type)
Conversion routines for the account types to/from strings that are used in persistent storage...
Definition: Account.cpp:4396
stop here; the following types just aren't ready for prime time
Definition: Account.h:161
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...
Definition: Account.cpp:272
void xaccAccountSetHigherBalanceLimit(Account *account, gnc_numeric balance)
Set the higher balance limit for the account.
Definition: Account.cpp:5074
void xaccAccountInsertLot(Account *, GNCLot *)
The xaccAccountInsertLot() method will register the indicated lot with this account.
Definition: Account.cpp:2152
void xaccAccountMoveAllSplits(Account *accfrom, Account *accto)
The xaccAccountMoveAllSplits() routine reassigns each of the splits in accfrom to accto...
Definition: Account.cpp:2212
void gnc_account_set_sort_dirty(Account *acc)
Tell the account believes that the splits may be incorrectly sorted and need to be resorted...
Definition: Account.cpp:1898
The cash account type is used to denote a shoe-box or pillowcase stuffed with * cash.
Definition: Account.h:110
const char * gnc_account_get_debit_string(GNCAccountType acct_type)
Get the debit string associated with this account type.
Definition: Account.cpp:4222
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.
Definition: Account.cpp:6126
void xaccAccountSetLastNum(Account *account, const char *num)
Set the last num field of an Account.
Definition: Account.cpp:4933
gnc_numeric xaccAccountGetClearedBalance(const Account *account)
Get the current balance of the account, only including cleared transactions.
Definition: Account.cpp:3545
gboolean xaccAccountGetReconcilePostponeDate(const Account *account, time64 *postpone_date)
DOCUMENT ME!
Definition: Account.cpp:4816
Account used to record multiple commodity transactions.
Definition: Account.h:155
gboolean xaccAccountGetLowerBalanceLimit(const Account *account, gnc_numeric *balance)
Get the lower balance limit for the account.
Definition: Account.cpp:4988
void xaccAccountDestroy(Account *account)
The xaccAccountDestroy() routine can be used to get rid of an account.
Definition: Account.cpp:1578
gboolean xaccAccountIsHidden(const Account *acc)
Should this account be "hidden".
Definition: Account.cpp:4351
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...
Definition: Account.cpp:3092
void gnc_account_remove_child(Account *parent, Account *child)
This function will remove the specified child account from the specified parent account.
Definition: Account.cpp:2872
int xaccAccountOrder(const Account *account_1, const Account *account_2)
The xaccAccountOrder() subroutine defines a sorting order on accounts.
Definition: Account.cpp:2371
Stock accounts will typically be shown in registers which show three columns: price, number of shares, and value.
Definition: Account.h:122
const char * xaccAccountGetColor(const Account *account)
Get the account's color.
Definition: Account.cpp:3379
Split * xaccAccountFindSplitByDesc(const Account *account, const char *description)
Returns a pointer to the split, not a copy.
Definition: Account.cpp:5407
gboolean xaccAccountIsAssetLiabType(GNCAccountType t)
Convenience function to check if the account is a valid Asset or Liability type, but not a business a...
Definition: Account.cpp:4630
void xaccClearMarkDown(Account *account, short val)
The xaccClearMarkDown will clear the mark only in this and in sub-accounts.
Definition: Account.cpp:2093
GList SplitList
GList of Split.
Definition: gnc-engine.h:207
GNCAccountType xaccAccountStringToEnum(const char *str)
Conversion routines for the account types to/from strings that are used in persistent storage...
Definition: Account.cpp:4467
bank account type – don't use this for now, see NUM_ACCOUNT_TYPES
Definition: Account.h:165
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...
Definition: Account.cpp:3317
gnc_numeric xaccAccountGetReconciledBalanceAsOfDate(Account *account, time64 date)
Get the reconciled balance of the account at the end of the day of the date specified.
Definition: Account.cpp:3641
void xaccAccountSetPlaceholder(Account *account, gboolean val)
Set the "placeholder" flag for an account.
Definition: Account.cpp:4256
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...
Definition: Account.cpp:4603
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.
Definition: Account.cpp:3969
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...
Definition: Account.cpp:234
void xaccAccountClearLowerBalanceLimit(Account *account)
Clear the lower balance limit for the account.
Definition: Account.cpp:5137
gboolean xaccTransactionTraverse(Transaction *trans, int stage)
xaccTransactionTraverse() checks the stage of the given transaction.
Definition: Account.cpp:5558
void xaccAccountSetColor(Account *account, const char *color)
Set the account's Color.
Definition: Account.cpp:2575
Transaction * xaccAccountFindTransByDesc(const Account *account, const char *description)
Returns a pointer to the transaction, not a copy.
Definition: Account.cpp:5422
void xaccAccountSetIncludeSubAccountBalances(Account *account, gboolean include)
Set whether to include balances of sub accounts.
Definition: Account.cpp:5161
void gnc_account_set_balance_dirty(Account *acc)
Tell the account that the running balances may be incorrect and need to be recomputed.
Definition: Account.cpp:1912
Income accounts are used to denote income.
Definition: Account.h:140
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...
Definition: Account.cpp:3236
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.
Definition: Account.cpp:3105
void gnc_account_tree_begin_staged_transaction_traversals(Account *acc)
gnc_account_tree_begin_staged_transaction_traversals() resets the traversal marker inside every trans...
Definition: Account.cpp:5585
void dxaccAccountSetPriceSrc(Account *account, const char *src)
Set a string that identifies the Finance::Quote backend that should be used to retrieve online prices...
Definition: Account.cpp:5274
void xaccAccountBeginStagedTransactionTraversals(const Account *account)
xaccAccountBeginStagedTransactionTraversals() resets the traversal marker for each transaction which ...
Definition: Account.cpp:5547
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...
Definition: Account.cpp:4300
const char * xaccAccountGetDescription(const Account *account)
Get the account's description.
Definition: Account.cpp:3372
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.
Definition: Account.cpp:3525
void gnc_account_delete_all_bayes_maps(Account *acc)
Delete all bayes entries for Account.
Definition: Account.cpp:6314
const char * dxaccAccountGetQuoteTZ(const Account *account)
Get the timezone to be used when interpreting the results from a given Finance::Quote backend...
Definition: Account.cpp:5313
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
Definition: Account.h:171
void xaccAccountClearReconcilePostpone(Account *account)
DOCUMENT ME!
Definition: Account.cpp:4907
const char * xaccAccountGetTaxUSPayerNameSource(const Account *account)
DOCUMENT ME!
Definition: Account.cpp:4165
void xaccSplitsBeginStagedTransactionTraversals(SplitList *splits)
xaccSplitsBeginStagedTransactionTraversals() resets the traversal marker for each transaction which i...
Definition: Account.cpp:5531
void gnc_account_reset_convert_bayes_to_flat(void)
Reset the flag that indicates the function imap_convert_bayes_to_flat has been run.
Definition: Account.cpp:6030
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...
Definition: Account.cpp:2946
The bank account type denotes a savings or checking account held at a bank.
Definition: Account.h:107
LotList * xaccAccountGetLotList(const Account *account)
The xaccAccountGetLotList() routine returns a list of all lots in this account.
Definition: Account.cpp:4038
void xaccAccountRecomputeBalance(Account *)
The following recompute the partial balances (stored with the transaction) and the total balance...
Definition: Account.cpp:2290
GList * gnc_account_imap_get_info_bayes(Account *acc)
Returns a GList of structure imap_info of all Bayesian mappings for required Account.
Definition: Account.cpp:6237
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.
Definition: Account.cpp:6248
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.
Definition: Account.cpp:3172
gboolean gnc_account_get_defer_bal_computation(Account *acc)
Get the account's flag for deferred balance computation.
Definition: Account.cpp:1938
void xaccAccountSetReconcilePostponeDate(Account *account, time64 postpone_date)
DOCUMENT ME!
Definition: Account.cpp:4841
A/P account type.
Definition: Account.h:151
const char * xaccAccountGetTaxUSCode(const Account *account)
DOCUMENT ME!
Definition: Account.cpp:4146
gboolean xaccAccountIsAPARType(GNCAccountType t)
Convenience function to check if the account is a valid business account type (meaning an Accounts Pa...
Definition: Account.cpp:4676
bank account type – don't use this for now, see NUM_ACCOUNT_TYPES
Definition: Account.h:167
gboolean xaccAccountStringToType(const char *str, GNCAccountType *type)
Conversion routines for the account types to/from strings that are used in persistent storage...
Definition: Account.cpp:4433
void xaccAccountSetIsOpeningBalance(Account *account, gboolean val)
Set the "opening-balance" flag for an account.
Definition: Account.cpp:4290
void xaccAccountSetReconcilePostponeBalance(Account *account, gnc_numeric balance)
DOCUMENT ME!
Definition: Account.cpp:4887
gboolean xaccAccountEqual(const Account *a, const Account *b, gboolean check_guids)
Compare two accounts for equality - this is a deep compare.
Definition: Account.cpp:1653
gboolean xaccAccountGetTaxRelated(const Account *account)
DOCUMENT ME!
Definition: Account.cpp:4134
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.
Definition: Account.cpp:3512
Account * xaccCloneAccount(const Account *source, QofBook *book)
The xaccCloneAccount() routine makes a simple copy of the indicated account, placing it in the indica...
Definition: Account.cpp:1268
gnc_numeric xaccAccountGetReconciledBalance(const Account *account)
Get the current balance of the account, only including reconciled transactions.
Definition: Account.cpp:3552
asset (and liability) accounts indicate generic, generalized accounts that are none of the above...
Definition: Account.h:116
gint gnc_account_n_children(const Account *account)
Return the number of children of the specified account.
Definition: Account.cpp:2961
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...
Definition: Account.cpp:5435
gnc_numeric xaccAccountGetBalanceAsOfDate(Account *account, time64 date)
Get the balance of the account at the end of the day before the date specified.
Definition: Account.cpp:3629
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.
Definition: Account.cpp:3538
gboolean xaccAccountGetReconcileLastDate(const Account *account, time64 *last_date)
DOCUMENT ME!
Definition: Account.cpp:4715
void dxaccAccountSetQuoteTZ(Account *account, const char *tz)
Set the timezone to be used when interpreting the results from a given Finance::Quote backend...
Definition: Account.cpp:5302
The currency account type indicates that the account is a currency trading account.
Definition: Account.h:129
void xaccAccountSetCommoditySCU(Account *account, int frac)
Set the SCU for the account.
Definition: Account.cpp:2687
GNCAccountType
The account types are used to determine how the transaction data in the account is displayed...
Definition: Account.h:101
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.
Definition: Account.cpp:3464
gboolean xaccAccountGetHidden(const Account *acc)
Get the "hidden" flag for an account.
Definition: Account.cpp:4339
void xaccAccountSetAppendText(Account *account, gboolean val)
Set the "import-append-text" flag for an account.
Definition: Account.cpp:4268
gboolean gnc_account_insert_split(Account *acc, Split *s)
Insert the given split from an account.
Definition: Account.cpp:1952
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...
Definition: Account.cpp:3045
void xaccAccountSetAutoInterest(Account *acc, gboolean val)
Set the "auto interest" flag for an account.
Definition: Account.cpp:4330
void xaccAccountSetTaxUSCode(Account *account, const char *code)
DOCUMENT ME!
Definition: Account.cpp:4155
GNCPlaceholderType
DOCUMENT ME!
Definition: Account.h:1249
gboolean xaccAccountGetIsOpeningBalance(const Account *account)
Get the "opening-balance" flag for an account.
Definition: Account.cpp:4274
guint32 xaccParentAccountTypesCompatibleWith(GNCAccountType type)
Return the bitmask of parent account types compatible with a given type.
Definition: Account.cpp:4556
gboolean xaccAccountGetReconcileChildrenStatus(const Account *account)
DOCUMENT ME!
Definition: Account.cpp:5350
gboolean xaccAccountGetReconcileLastInterval(const Account *account, int *months, int *days)
DOCUMENT ME!
Definition: Account.cpp:4758
gboolean xaccAccountGetIncludeSubAccountBalances(const Account *account)
Get whether to include balances of sub accounts.
Definition: Account.cpp:5145
Not a type.
Definition: Account.h:104
const char * dxaccAccountGetPriceSrc(const Account *account)
Get a string that identifies the Finance::Quote backend that should be used to retrieve online prices...
Definition: Account.cpp:5286
liability (and asset) accounts indicate generic, generalized accounts that are none of the above...
Definition: Account.h:119
const char * gnc_account_get_credit_string(GNCAccountType acct_type)
Get the credit string associated with this account type.
Definition: Account.cpp:4234
GList * gnc_account_get_children(const Account *account)
This routine returns a GList of all children accounts of the specified account.
Definition: Account.cpp:2939
void xaccAccountSetHidden(Account *acc, gboolean val)
Set the "hidden" flag for an account.
Definition: Account.cpp:4345
void xaccAccountBeginEdit(Account *account)
The xaccAccountBeginEdit() subroutine is the first phase of a two-phase-commit wrapper for account up...
Definition: Account.cpp:1458
gboolean xaccAccountHasAncestor(const Account *acc, const Account *ancestor)
Returns true if the account is 'ancestor' or has 'ancestor' as an ancestor.
Definition: Account.cpp:4373
gnc_commodity * xaccAccountGetCommodity(const Account *account)
Get the account's commodity.
Definition: Account.cpp:3457
gboolean xaccAccountGetPlaceholder(const Account *account)
Get the "placeholder" flag for an account.
Definition: Account.cpp:4250
gint gnc_account_get_current_depth(const Account *account)
Return the number of levels of this account below the root account.
Definition: Account.cpp:2998
A/R account type.
Definition: Account.h:149
void xaccAccountSetSortReversed(Account *account, gboolean sortreversed)
Set the account's Sort Order direction.
Definition: Account.cpp:2605
bank account type – don't use this for now, see NUM_ACCOUNT_TYPES
Definition: Account.h:169
void xaccAccountSetLowerBalanceLimit(Account *account, gnc_numeric balance)
Set the lower balance limit for the account.
Definition: Account.cpp:5085
Account * xaccAccountGainsAccount(Account *acc, gnc_commodity *curr)
Retrieve the gains account used by this account for the indicated currency, creating and recording a ...
Definition: Account.cpp:5234
gboolean xaccAccountGetHigherBalanceLimit(const Account *account, gnc_numeric *balance)
Get the higher balance limit for the account.
Definition: Account.cpp:4947
Account * gnc_account_nth_child(const Account *parent, gint num)
Return the n'th child account of the specified parent account.
Definition: Account.cpp:2976
Account * xaccMallocAccount(QofBook *book)
Constructor.
Definition: Account.cpp:1237
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. ...
Definition: Account.cpp:2968
gint64 time64
Many systems, including Microsoft Windows and BSD-derived Unixes like Darwin, are retaining the int-3...
Definition: gnc-date.h:87
void xaccAccountSetTaxUSPayerNameSource(Account *account, const char *source)
DOCUMENT ME!
Definition: Account.cpp:4174
void xaccAccountSetDescription(Account *account, const char *desc)
Set the account's description.
Definition: Account.cpp:2495
void DxaccAccountSetCurrency(Account *account, gnc_commodity *currency)
Definition: Account.cpp:2750
void gnc_account_set_start_balance(Account *acc, const gnc_numeric start_baln)
This function will set the starting commodity balance for this account.
Definition: Account.cpp:3500
void xaccAccountSetNonStdSCU(Account *account, gboolean flag)
Set the flag indicating that this account uses a non-standard SCU.
Definition: Account.cpp:2723
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.
Definition: Account.cpp:4045
Account * gnc_account_get_root(Account *account)
This routine returns the root account of the account tree that the specified account belongs to...
Definition: Account.cpp:2915
Account * gnc_account_lookup_by_opening_balance(Account *account, gnc_commodity *commodity)
Find the opening balance account for the currency.
Definition: Account.cpp:3120
void xaccAccountClearHigherBalanceLimit(Account *account)
Clear the higher balance limit for the account.
Definition: Account.cpp:5129
void gnc_account_set_defer_bal_computation(Account *acc, gboolean defer)
Set the defer balance flag.
Definition: Account.cpp:1925
const char * xaccAccountGetName(const Account *account)
Get the account's name.
Definition: Account.cpp:3310
Equity account is used to balance the balance sheet.
Definition: Account.h:146
const char * xaccAccountGetTypeStr(GNCAccountType type)
The xaccAccountGetTypeStr() routine returns a string suitable for use in the GUI/Interface.
Definition: Account.cpp:4506
const char * xaccAccountGetSortOrder(const Account *account)
Get the account's Sort Order.
Definition: Account.cpp:3399
Not a type.
Definition: Account.h:105
The type used to store guids in C.
Definition: guid.h:75
int xaccAccountStagedTransactionTraversal(const Account *a, unsigned int stage, TransactionCallback thunk, void *data)
xaccAccountStagedTransactionTraversal() calls thunk on each transaction in account a whose current ma...
Definition: Account.cpp:5595
void xaccAccountCommitEdit(Account *account)
ThexaccAccountCommitEdit() subroutine is the second phase of a two-phase-commit wrapper for account u...
Definition: Account.cpp:1499
void xaccClearMark(Account *account, short val)
Get the mark set by xaccAccountSetMark short xaccAccountGetMark (const Account *account);.
Definition: Account.cpp:2082
void xaccAccountSetName(Account *account, const char *name)
Set the account's name.
Definition: Account.cpp:2456
The hidden root account of an account tree.
Definition: Account.h:153
GNCPolicy * gnc_account_get_policy(Account *account)
Get the account's lot order policy.
Definition: Account.cpp:2112
void gnc_account_merge_children(Account *parent)
The gnc_account_merge_children() subroutine will go through an account, merging all child accounts th...
Definition: Account.cpp:5460
gboolean xaccAccountIsEquityType(GNCAccountType t)
Convenience function to check if the account is a valid Equity type.
Definition: Account.cpp:4688
void xaccAccountSetReconcileChildrenStatus(Account *account, gboolean status)
DOCUMENT ME!
Definition: Account.cpp:5327
The Credit card account is used to denote credit (e.g.
Definition: Account.h:113
const gchar * gnc_get_account_separator_string(void)
Returns the account separation character chosen by the user.
Definition: Account.cpp:204
void xaccAccountSetCommodity(Account *account, gnc_commodity *comm)
Set the account's commodity.
Definition: Account.cpp:2641
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.
Definition: Account.cpp:3197
const char * xaccAccountGetNotes(const Account *account)
Get the account's notes.
Definition: Account.cpp:3425
gboolean xaccAccountGetReconcilePostponeBalance(const Account *account, gnc_numeric *balance)
DOCUMENT ME!
Definition: Account.cpp:4860
gint gnc_account_get_tree_depth(const Account *account)
Return the number of levels of descendants accounts below the specified account.
Definition: Account.cpp:3017
Account * gnc_account_imap_find_account_bayes(Account *acc, GList *tokens)
Look up an Account in the map using Baysian.
Definition: Account.cpp:6062
Account * xaccAccountLookup(const GncGUID *guid, QofBook *book)
The xaccAccountLookup() subroutine will return the account associated with the given id...
Definition: Account.cpp:2059
void xaccAccountSetTaxUSCopyNumber(Account *account, gint64 copy_number)
DOCUMENT ME!
Definition: Account.cpp:4198