Bug #542020 invoice/bill payment dialogue: automatic account as

default

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21166 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens
2011-08-11 20:35:31 +00:00
parent 36d1fcfd69
commit 177a1fd07b

View File

@@ -546,6 +546,18 @@ new_payment_window (GncOwner *owner, QofBook *book, GncInvoice *invoice)
/* Fill in the post_combo and account_tree widgets */
gnc_fill_account_select_combo (pw->post_combo, pw->book, pw->acct_types, pw->acct_commodities);
if (invoice)
{
Account *postacct = gncInvoiceGetPostedAcc (invoice);
if (postacct)
{
gchar *acct_string = gnc_account_get_full_name (postacct);
gnc_cbe_set_by_string(GTK_COMBO_BOX_ENTRY(pw->post_combo), acct_string);
g_free(acct_string);
}
}
/* Show it all */
gtk_widget_show_all (pw->dialog);