GnuCash c935c2f+
Loading...
Searching...
No Matches
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
38extern "C" {
39#endif
40
41/********************************************************************
42 * Balance calculations related to accounts
43 ********************************************************************/
44
45gnc_numeric
46gnc_ui_account_get_balance_full (xaccGetBalanceInCurrencyFn fn,
47 const Account *account,
48 gboolean recurse,
49 gboolean *negative,
50 const gnc_commodity *commodity);
51
59gnc_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);
72gnc_numeric gnc_ui_account_get_reconciled_balance(const Account *account,
73 gboolean include_children);
74
88gchar *
89gnc_ui_account_get_print_balance (xaccGetBalanceInCurrencyFn fn,
90 const Account *account,
91 gboolean recurse,
92 gboolean *negative);
93
108gchar *
109gnc_ui_account_get_print_report_balance (xaccGetBalanceInCurrencyFn fn,
110 const Account *account,
111 gboolean recurse,
112 gboolean *negative);
113
114gnc_numeric gnc_ui_account_get_balance_as_of_date (Account *account,
115 time64 date,
116 gboolean include_children);
117gnc_numeric
118gnc_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
131gnc_numeric gnc_ui_owner_get_balance_full (GncOwner *owner,
132 gboolean *negative,
133 const gnc_commodity *commodity);
134
141gchar * gnc_ui_owner_get_print_balance (GncOwner *owner,
142 gboolean *negative);
143
150gchar * gnc_ui_owner_get_print_report_balance (GncOwner *owner,
151 gboolean *negative);
152
162gboolean gnc_ui_account_is_higher_balance_limit_reached (const Account *account, gboolean *is_zero);
163
173gboolean gnc_ui_account_is_lower_balance_limit_reached (const Account *account, gboolean *is_zero);
174
182gchar * gnc_ui_account_get_balance_limit_icon_name (const Account *account);
183
184
193gchar * gnc_ui_account_get_balance_limit_explanation (const Account *account);
194
195#ifdef __cplusplus
196}
197#endif
198
199#endif /* GNC_UI_BALANCES_H_ */
Account handling public routines.
Business Interface: Object OWNERs.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
Definition gnc-date.h:87
STRUCTS.