/usr/include/gnucash/gnc-ui-balances.h is in gnucash-common 1:2.6.12-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | /********************************************************************\
* gnc-ui-balances.c -- utility functions for calculating *
* account and owner balances used in the *
* the GnuCash UI *
* Copyright (C) 2000 Dave Peticolas <dave@krondo.com> *
* Copyright (C) 2011 Geert Janssens <geert@kobaltwit.be> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
* Boston, MA 02110-1301, USA gnu@gnu.org *
\********************************************************************/
#ifndef GNC_UI_BALANCES_H_
#define GNC_UI_BALANCES_H_
#include <glib.h>
#include "Account.h"
#include "gncOwner.h"
#include "qof.h"
/********************************************************************
* Balance calculations related to accounts
********************************************************************/
gnc_numeric
gnc_ui_account_get_balance_full (xaccGetBalanceInCurrencyFn fn,
const Account *account,
gboolean recurse,
gboolean *negative,
const gnc_commodity *commodity);
/**
* This routine retrieves the total balance in an account, possibly
* including all sub-accounts under the specified account.
*
* @param account The account to retrieve data about.
* @param include_children Include all sub-accounts of this account.
*/
gnc_numeric gnc_ui_account_get_balance (const Account *account,
gboolean include_children);
// gnc_numeric gnc_ui_account_get_balance_in_currency (const Account *account,
// const gnc_commodity *currency,
// gboolean recurse);
/**
* This routine retrieves the reconciled balance in an account,
* possibly including all sub-accounts under the specified account.
*
* @param account The account to retrieve data about.
* @param include_children Include all sub-accounts of this account.
*/
gnc_numeric gnc_ui_account_get_reconciled_balance(const Account *account,
gboolean include_children);
/**
* Wrapper around gnc_ui_account_get_balance_internal that converts
* the resulting number to a character string. The number is
* formatted according to the specification of the account currency.
*
* @param fn The underlying function in Account.c to call to retrieve
* a specific balance from the account.
* @param account The account to retrieve data about.
* @param recurse Include all sub-accounts of this account.
* @param negative An indication of whether or not the returned value
* is negative. This can be used by the caller to
* easily decode whether or not to color the output.
*/
gchar *
gnc_ui_account_get_print_balance (xaccGetBalanceInCurrencyFn fn,
const Account *account,
gboolean recurse,
gboolean *negative);
/**
* Wrapper around gnc_ui_account_get_balance_internal that converts
* the resulting number to a character string. The number is
* formatted according to the specification of the default reporting
* currency.
*
* @param fn The underlying function in Account.c to call to retrieve
* a specific balance from the account.
* @param account The account to retrieve data about.
* @param recurse Include all sub-accounts of this account.
* @param negative An indication of whether or not the returned value
* is negative. This can be used by the caller to
* easily decode whether or not to color the output.
*/
gchar *
gnc_ui_account_get_print_report_balance (xaccGetBalanceInCurrencyFn fn,
const Account *account,
gboolean recurse,
gboolean *negative);
gnc_numeric gnc_ui_account_get_balance_as_of_date (Account *account,
time64 date,
gboolean include_children);
/********************************************************************
* Balance calculations related to owners
********************************************************************/
/** Get the balance for the underlying owner object.
* The returned value is always positive,
* intended to be displayed to a user. However the real sign
* of the balance is indicated via the "negative" parameter.
*/
gnc_numeric gnc_ui_owner_get_balance_full (GncOwner *owner,
gboolean *negative,
const gnc_commodity *commodity);
/** Get the balance for the underlying owner object in string format
* and the owner's native currency.
* The returned value is always positive,
* intended to be displayed to a user. However the real sign
* of the balance is indicated via the "negative" parameter.
*/
gchar * gnc_ui_owner_get_print_balance (GncOwner *owner,
gboolean *negative);
/** Get the balance for the underlying owner object in string format
* and in the default report currency.
* The returned value is always positive,
* intended to be displayed to a user. However the real sign
* of the balance is indicated via the "negative" parameter.
*/
gchar * gnc_ui_owner_get_print_report_balance (GncOwner *owner,
gboolean *negative);
#endif /* GNC_UI_BALANCES_H_ */
|