GnuCash 2.4.99
gnc-ui-balances.h
00001 /********************************************************************\
00002  * gnc-ui-balances.c -- utility functions for calculating           *
00003  *                      account and owner balances used in the      *
00004  *                      the GnuCash UI                              *
00005  * Copyright (C) 2000 Dave Peticolas <dave@krondo.com>              *
00006  * Copyright (C) 2011 Geert Janssens <geert@kobaltwit.be>           *
00007  *                                                                  *
00008  * This program is free software; you can redistribute it and/or    *
00009  * modify it under the terms of the GNU General Public License as   *
00010  * published by the Free Software Foundation; either version 2 of   *
00011  * the License, or (at your option) any later version.              *
00012  *                                                                  *
00013  * This program is distributed in the hope that it will be useful,  *
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
00016  * GNU General Public License for more details.                     *
00017  *                                                                  *
00018  * You should have received a copy of the GNU General Public License*
00019  * along with this program; if not, contact:                        *
00020  *                                                                  *
00021  * Free Software Foundation           Voice:  +1-617-542-5942       *
00022  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
00023  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
00024 \********************************************************************/
00025 
00026 
00027 
00028 #ifndef GNC_UI_BALANCES_H_
00029 #define GNC_UI_BALANCES_H_
00030 
00031 #include <glib.h>
00032 
00033 #include "Account.h"
00034 #include "gncOwner.h"
00035 #include "qof.h"
00036 
00037 /********************************************************************
00038  * Balance calculations related to accounts
00039  ********************************************************************/
00040 
00041 gnc_numeric
00042 gnc_ui_account_get_balance_full (xaccGetBalanceInCurrencyFn fn,
00043                                  const Account *account,
00044                                  gboolean recurse,
00045                                  gboolean *negative,
00046                                  const gnc_commodity *commodity);
00047 
00055 gnc_numeric gnc_ui_account_get_balance (const Account *account,
00056                                         gboolean include_children);
00057 
00058 // gnc_numeric gnc_ui_account_get_balance_in_currency (const Account *account,
00059 //         const gnc_commodity *currency,
00060 //         gboolean recurse);
00068 gnc_numeric gnc_ui_account_get_reconciled_balance(const Account *account,
00069         gboolean include_children);
00070 
00084 gchar *
00085 gnc_ui_account_get_print_balance (xaccGetBalanceInCurrencyFn fn,
00086                                   const Account *account,
00087                                   gboolean recurse,
00088                                   gboolean *negative);
00089 
00104 gchar *
00105 gnc_ui_account_get_print_report_balance (xaccGetBalanceInCurrencyFn fn,
00106         const Account *account,
00107         gboolean recurse,
00108         gboolean *negative);
00109 
00110 gnc_numeric gnc_ui_account_get_balance_as_of_date (Account *account,
00111         time_t date,
00112         gboolean include_children);
00113 
00114 /********************************************************************
00115  * Balance calculations related to owners
00116  ********************************************************************/
00117 
00123 gnc_numeric gnc_ui_owner_get_balance_full (GncOwner *owner,
00124         gboolean *negative,
00125         const gnc_commodity *commodity);
00126 
00133 gchar * gnc_ui_owner_get_print_balance (GncOwner *owner,
00134                                         gboolean *negative);
00135 
00142 gchar * gnc_ui_owner_get_print_report_balance (GncOwner *owner,
00143         gboolean *negative);
00144 
00145 
00146 #endif /* GNC_UI_BALANCES_H_ */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines