r21166 - gnucash/trunk/src/business/business-gnome - Bug #542020 invoice/bill payment dialogue: automatic account as
Geert Janssens
gjanssens at code.gnucash.org
Thu Aug 11 16:35:32 EDT 2011
Author: gjanssens
Date: 2011-08-11 16:35:31 -0400 (Thu, 11 Aug 2011)
New Revision: 21166
Trac: http://svn.gnucash.org/trac/changeset/21166
Modified:
gnucash/trunk/src/business/business-gnome/dialog-payment.c
Log:
Bug #542020 invoice/bill payment dialogue: automatic account as
default
Modified: gnucash/trunk/src/business/business-gnome/dialog-payment.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-payment.c 2011-08-11 20:35:22 UTC (rev 21165)
+++ gnucash/trunk/src/business/business-gnome/dialog-payment.c 2011-08-11 20:35:31 UTC (rev 21166)
@@ -546,6 +546,18 @@
/* 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);
More information about the gnucash-changes
mailing list