r21251 - gnucash/trunk/src/plugins/bi_import - Open invoice in a new tab only if it has not been posted yet.
Geert Janssens
gjanssens at code.gnucash.org
Sun Sep 11 10:24:31 EDT 2011
Author: gjanssens
Date: 2011-09-11 10:24:31 -0400 (Sun, 11 Sep 2011)
New Revision: 21251
Trac: http://svn.gnucash.org/trac/changeset/21251
Modified:
gnucash/trunk/src/plugins/bi_import/bi_import.c
Log:
Open invoice in a new tab only if it has not been posted yet.
Modified: gnucash/trunk/src/plugins/bi_import/bi_import.c
===================================================================
--- gnucash/trunk/src/plugins/bi_import/bi_import.c 2011-09-11 14:24:23 UTC (rev 21250)
+++ gnucash/trunk/src/plugins/bi_import/bi_import.c 2011-09-11 14:24:31 UTC (rev 21251)
@@ -597,9 +597,12 @@
//if (g_ascii_strcasecmp(type,"INVOICE"))gncInvoiceSetBillTo( invoice, billto );
(*n_invoices_created)++;
update = YES;
- // Open the newly created invoice(s) in a tab. Could be made optional?
- iw = gnc_ui_invoice_edit (invoice);
- new_page = gnc_plugin_page_invoice_new (iw);
+ // If the invoice has not been posted yet, open it in a tab.
+ if (strlen(date_posted) == 0)
+ {
+ iw = gnc_ui_invoice_edit (invoice);
+ new_page = gnc_plugin_page_invoice_new (iw);
+ }
}
// I want to warn the user that an existing billvoice exists, but not every
// time.
More information about the gnucash-changes
mailing list