Create opening balance accounts only when there are opening balances.

This commit is contained in:
John Ralls 2021-01-24 12:57:48 -08:00
parent b66eab2583
commit 267a7cb75d
2 changed files with 0 additions and 11 deletions

View File

@ -899,9 +899,6 @@ gnc_common_ok (AccountWindow *aw)
return FALSE;
}
/* update opening balance account */
gnc_find_or_create_equity_account (root, EQUITY_OPENING_BALANCE, commodity);
LEAVE("passed");
return TRUE;
}

View File

@ -1668,10 +1668,6 @@ gnc_plugin_page_account_tree_cmd_delete_account (GtkAction *action, GncPluginPag
if (!(xaccAccountGetSplitList (account) != NULL ||
gnc_account_n_children (account)))
{
/* update opening balance account */
gnc_find_or_create_equity_account (gnc_account_get_root(account),
EQUITY_OPENING_BALANCE,
xaccAccountGetCommodity (account));
do_delete_account (account, NULL, NULL, NULL);
return;
}
@ -1708,10 +1704,6 @@ gnc_plugin_page_account_tree_cmd_delete_account (GtkAction *action, GncPluginPag
adopt.subacct.new_account,
adopt.delete_res) == GTK_RESPONSE_ACCEPT)
{
/* update opening balance account */
gnc_find_or_create_equity_account (gnc_account_get_root(account),
EQUITY_OPENING_BALANCE,
xaccAccountGetCommodity (account));
do_delete_account (account, adopt.subacct.new_account,
adopt.subtrans.new_account, adopt.trans.new_account);
}