GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-ui-balances.h
1 /********************************************************************\
2  * gnc-ui-balances.c -- utility functions for calculating *
3  * account and owner balances used in the *
4  * the GnuCash UI *
5  * Copyright (C) 2000 Dave Peticolas <[email protected]> *
6  * Copyright (C) 2011 Geert Janssens <[email protected]> *
7  * *
8  * This program is free software; you can redistribute it and/or *
9  * modify it under the terms of the GNU General Public License as *
10  * published by the Free Software Foundation; either version 2 of *
11  * the License, or (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License*
19  * along with this program; if not, contact: *
20  * *
21  * Free Software Foundation Voice: +1-617-542-5942 *
22  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
23  * Boston, MA 02110-1301, USA [email protected] *
24 \********************************************************************/
25 
26 
27 
28 #ifndef GNC_UI_BALANCES_H_
29 #define GNC_UI_BALANCES_H_
30 
31 #include <glib.h>
32 
33 #include "Account.h"
34 #include "gncOwner.h"
35 #include "qof.h"
36 
37 /********************************************************************
38  * Balance calculations related to accounts
39  ********************************************************************/
40 
42 gnc_ui_account_get_balance_full (xaccGetBalanceInCurrencyFn fn,
43  const Account *account,
44  gboolean recurse,
45  gboolean *negative,
46  const gnc_commodity *commodity);
47 
55 gnc_numeric gnc_ui_account_get_balance (const Account *account,
56  gboolean include_children);
57 
58 // gnc_numeric gnc_ui_account_get_balance_in_currency (const Account *account,
59 // const gnc_commodity *currency,
60 // gboolean recurse);
68 gnc_numeric gnc_ui_account_get_reconciled_balance(const Account *account,
69  gboolean include_children);
70 
84 gchar *
85 gnc_ui_account_get_print_balance (xaccGetBalanceInCurrencyFn fn,
86  const Account *account,
87  gboolean recurse,
88  gboolean *negative);
89 
104 gchar *
105 gnc_ui_account_get_print_report_balance (xaccGetBalanceInCurrencyFn fn,
106  const Account *account,
107  gboolean recurse,
108  gboolean *negative);
109 
110 gnc_numeric gnc_ui_account_get_balance_as_of_date (Account *account,
111  time64 date,
112  gboolean include_children);
113 
114 /********************************************************************
115  * Balance calculations related to owners
116  ********************************************************************/
117 
123 gnc_numeric gnc_ui_owner_get_balance_full (GncOwner *owner,
124  gboolean *negative,
125  const gnc_commodity *commodity);
126 
133 gchar * gnc_ui_owner_get_print_balance (GncOwner *owner,
134  gboolean *negative);
135 
142 gchar * gnc_ui_owner_get_print_report_balance (GncOwner *owner,
143  gboolean *negative);
144 
145 
146 #endif /* GNC_UI_BALANCES_H_ */
Business Interface: Object OWNERs.
Account handling public routines.
gint64 time64
Definition: gnc-date.h:83