GnuCash  5.6-150-g038405b370+
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 <dave@krondo.com> *
6  * Copyright (C) 2011 Geert Janssens <geert@kobaltwit.be> *
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 gnu@gnu.org *
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 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /********************************************************************
42  * Balance calculations related to accounts
43  ********************************************************************/
44 
45 gnc_numeric
46 gnc_ui_account_get_balance_full (xaccGetBalanceInCurrencyFn fn,
47  const Account *account,
48  gboolean recurse,
49  gboolean *negative,
50  const gnc_commodity *commodity);
51 
59 gnc_numeric gnc_ui_account_get_balance (const Account *account,
60  gboolean include_children);
61 
62 // gnc_numeric gnc_ui_account_get_balance_in_currency (const Account *account,
63 // const gnc_commodity *currency,
64 // gboolean recurse);
72 gnc_numeric gnc_ui_account_get_reconciled_balance(const Account *account,
73  gboolean include_children);
74 
88 gchar *
89 gnc_ui_account_get_print_balance (xaccGetBalanceInCurrencyFn fn,
90  const Account *account,
91  gboolean recurse,
92  gboolean *negative);
93 
108 gchar *
109 gnc_ui_account_get_print_report_balance (xaccGetBalanceInCurrencyFn fn,
110  const Account *account,
111  gboolean recurse,
112  gboolean *negative);
113 
114 gnc_numeric gnc_ui_account_get_balance_as_of_date (Account *account,
115  time64 date,
116  gboolean include_children);
117 gnc_numeric
118 gnc_ui_account_get_reconciled_balance_as_of_date (Account *account,
119  time64 date,
120  gboolean include_children);
121 
122 /********************************************************************
123  * Balance calculations related to owners
124  ********************************************************************/
125 
131 gnc_numeric gnc_ui_owner_get_balance_full (GncOwner *owner,
132  gboolean *negative,
133  const gnc_commodity *commodity);
134 
141 gchar * gnc_ui_owner_get_print_balance (GncOwner *owner,
142  gboolean *negative);
143 
150 gchar * gnc_ui_owner_get_print_report_balance (GncOwner *owner,
151  gboolean *negative);
152 
159 GList * gnc_account_get_autoclear_splits (Account *account, gnc_numeric toclear_value,
160  gchar **errmsg);
161 
171 gboolean gnc_ui_account_is_higher_balance_limit_reached (const Account *account, gboolean *is_zero);
172 
182 gboolean gnc_ui_account_is_lower_balance_limit_reached (const Account *account, gboolean *is_zero);
183 
191 gchar * gnc_ui_account_get_balance_limit_icon_name (const Account *account);
192 
193 
202 gchar * gnc_ui_account_get_balance_limit_explanation (const Account *account);
203 
204 #ifdef __cplusplus
205 }
206 #endif
207 
208 #endif /* GNC_UI_BALANCES_H_ */
Business Interface: Object OWNERs.
STRUCTS.
Account handling public routines.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
Definition: gnc-date.h:87