mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2001-06-09 Dave Peticolas <dave@krondo.com>
* src/gnc-ui-util.c (gnc_find_or_create_equity_account): allow group to be specified (gnc_account_create_opening_balance): search in given account's group git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4565 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2001-06-09 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/gnc-ui-util.c (gnc_find_or_create_equity_account): allow
|
||||
group to be specified
|
||||
(gnc_account_create_opening_balance): search in given account's
|
||||
group
|
||||
|
||||
2001-06-08 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/gnc-ui-util.c (gnc_find_or_create_equity_account): first
|
||||
|
||||
@@ -470,12 +470,12 @@ equity_base_name (GNCEquityType equity_type)
|
||||
}
|
||||
|
||||
Account *
|
||||
gnc_find_or_create_equity_account (GNCEquityType equity_type,
|
||||
gnc_find_or_create_equity_account (AccountGroup *group,
|
||||
GNCEquityType equity_type,
|
||||
gnc_commodity *currency)
|
||||
{
|
||||
Account *parent;
|
||||
Account *account;
|
||||
AccountGroup *group;
|
||||
gboolean name_exists;
|
||||
gboolean base_name_exists;
|
||||
const char *base_name;
|
||||
@@ -485,7 +485,8 @@ gnc_find_or_create_equity_account (GNCEquityType equity_type,
|
||||
g_return_val_if_fail (equity_type < NUM_EQUITY_TYPES, NULL);
|
||||
g_return_val_if_fail (currency != NULL, NULL);
|
||||
|
||||
group = gncGetCurrentGroup ();
|
||||
if (!group)
|
||||
group = gncGetCurrentGroup ();
|
||||
|
||||
base_name = equity_base_name (equity_type);
|
||||
|
||||
@@ -578,7 +579,8 @@ gnc_account_create_opening_balance (Account *account,
|
||||
g_return_val_if_fail (account != NULL, FALSE);
|
||||
|
||||
equity_account =
|
||||
gnc_find_or_create_equity_account (EQUITY_OPENING_BALANCE,
|
||||
gnc_find_or_create_equity_account (xaccGetAccountRoot (account),
|
||||
EQUITY_OPENING_BALANCE,
|
||||
xaccAccountGetCurrency (account));
|
||||
if (!equity_account)
|
||||
return FALSE;
|
||||
|
||||
@@ -85,7 +85,8 @@ typedef enum
|
||||
NUM_EQUITY_TYPES
|
||||
} GNCEquityType;
|
||||
|
||||
Account * gnc_find_or_create_equity_account (GNCEquityType equity_type,
|
||||
Account * gnc_find_or_create_equity_account (AccountGroup *group,
|
||||
GNCEquityType equity_type,
|
||||
gnc_commodity *currency);
|
||||
gboolean gnc_account_create_opening_balance (Account *account,
|
||||
gnc_numeric balance,
|
||||
|
||||
Reference in New Issue
Block a user