[Gnucash-changes] Convert the invoice dialog over to a GncPluginPage.

David Hampton hampton at cvs.gnucash.org
Thu Jul 7 22:53:04 EDT 2005


Log Message:
-----------
Convert the invoice dialog over to a GncPluginPage.  Move the
logic to call the bills due dialog at startup into C code.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash/src/business/business-gnome:
        Makefile.am
        business-gnome.scm
        businessmod-gnome.c
        dialog-invoice.c
        dialog-invoice.h
        gnc-plugin-business.c
        gnc-plugin-business.h
        gw-business-gnome-spec.scm
    gnucash/src/business/business-gnome/glade:
        invoice.glade
    gnucash/src/business/business-gnome/ui:
        Makefile.am
        gnc-plugin-business-ui.xml

Added Files:
-----------
    gnucash/src/business/business-gnome:
        gnc-plugin-page-invoice.c
        gnc-plugin-page-invoice.h
    gnucash/src/business/business-gnome/ui:
        gnc-plugin-page-invoice-ui.xml

Revision Data
-------------
Index: businessmod-gnome.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/businessmod-gnome.c,v
retrieving revision 1.13.4.3
retrieving revision 1.13.4.4
diff -Lsrc/business/business-gnome/businessmod-gnome.c -Lsrc/business/business-gnome/businessmod-gnome.c -u -r1.13.4.3 -r1.13.4.4
--- src/business/business-gnome/businessmod-gnome.c
+++ src/business/business-gnome/businessmod-gnome.c
@@ -31,6 +31,7 @@
 #include <libguile.h>
 #include <glib.h>
 
+#include "gnc-hooks.h"
 #include "gnc-module.h"
 #include "gnc-module-api.h"
 #include "gw-business-gnome.h"
@@ -108,6 +109,9 @@
 
     gnc_plugin_manager_add_plugin (gnc_plugin_manager_get (),
 				   gnc_plugin_business_new ());
+
+    gnc_hook_add_dangler(HOOK_UI_POST_STARTUP,
+			 (GFunc)gnc_invoice_remind_bills_due, NULL);
   }
 
   return TRUE;
Index: dialog-invoice.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-invoice.h,v
retrieving revision 1.8.4.2
retrieving revision 1.8.4.3
diff -Lsrc/business/business-gnome/dialog-invoice.h -Lsrc/business/business-gnome/dialog-invoice.h -u -r1.8.4.2 -r1.8.4.3
--- src/business/business-gnome/dialog-invoice.h
+++ src/business/business-gnome/dialog-invoice.h
@@ -28,11 +28,23 @@
 typedef struct _invoice_window InvoiceWindow;
 
 #include "qofbook.h"
+#include "qofsession.h"
 #include "gncInvoice.h"
 #include "gncOwner.h"
 #include "dialog-search.h"
 #include "dialog-query-list.h"
 
+typedef enum
+{
+  BY_STANDARD = 0,
+  BY_DATE,
+  BY_DATE_ENTERED,
+  BY_DESC,
+  BY_QTY,
+  BY_PRICE
+} invoice_sort_type_t;
+
+
 /* Create and edit an invoice */
 InvoiceWindow * gnc_ui_invoice_edit (GncInvoice *invoice);
 InvoiceWindow * gnc_ui_invoice_new (GncOwner *owner, QofBook *book);
@@ -51,6 +63,39 @@
 
 void gnc_business_call_owner_report (GncOwner *owner, Account *acc);
 
+void gnc_invoice_window_sort (InvoiceWindow *iw, invoice_sort_type_t sort_code);
+
+GtkWidget * gnc_invoice_window_create_summary_bar (InvoiceWindow *iw);
+
+void gnc_invoice_window_changed (InvoiceWindow *iw, GtkWidget *window);;
+
+gchar *gnc_invoice_get_help (InvoiceWindow *iw);
+
+gchar *gnc_invoice_get_title (InvoiceWindow *iw);
+
+GtkWidget * gnc_invoice_create_page (InvoiceWindow *iw, gpointer page);
+
 DialogQueryList *gnc_invoice_show_bills_due (QofBook *book, double days_in_advance);
 
+GtkWidget *gnc_invoice_get_register(InvoiceWindow *iw);
+
+/* definitions for CB functions */
+void gnc_invoice_window_destroy_cb (GtkWidget *widget, gpointer data);
+
+void gnc_invoice_window_new_invoice_cb (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_printCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_cut_cb (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_copy_cb (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_paste_cb (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_editCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_postCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_unpostCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_recordCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_cancelCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_deleteCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_blankCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_duplicateCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_payment_cb (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_report_owner_cb (GtkWidget *widget, gpointer data);
+
 #endif /* GNC_DIALOG_INVOICE_H_ */
Index: dialog-invoice.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-invoice.c,v
retrieving revision 1.81.4.17
retrieving revision 1.81.4.18
diff -Lsrc/business/business-gnome/dialog-invoice.c -Lsrc/business/business-gnome/dialog-invoice.c -u -r1.81.4.17 -r1.81.4.18
--- src/business/business-gnome/dialog-invoice.c
+++ src/business/business-gnome/dialog-invoice.c
@@ -40,7 +40,6 @@
 #include "gnc-ui-util.h"
 #include "gnc-engine-util.h"
 #include "gnc-date-edit.h"
-#include "gnc-menu-extensions.h"
 #include "gnc-amount-edit.h"
 #include "gnucash-sheet.h"
 #include "window-report.h"
@@ -65,6 +64,11 @@
 
 #include "dialog-query-list.h"
 
+#include "gnc-plugin-business.h"
+#include "gnc-plugin-page.h"
+#include "gnc-plugin-page-invoice.h"
+#include "gnc-main-window.h"
+
 #define DIALOG_NEW_INVOICE_CM_CLASS "dialog-new-invoice"
 #define DIALOG_VIEW_INVOICE_CM_CLASS "dialog-view-invoice"
 
@@ -76,7 +80,6 @@
 void gnc_invoice_window_ok_cb (GtkWidget *widget, gpointer data);
 void gnc_invoice_window_cancel_cb (GtkWidget *widget, gpointer data);
 void gnc_invoice_window_help_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_destroy_cb (GtkWidget *widget, gpointer data);
 void gnc_invoice_id_changed_cb (GtkWidget *widget, gpointer data);
 
 typedef enum
@@ -87,16 +90,6 @@
   VIEW_INVOICE
 } InvoiceDialogType;
 
-typedef enum
-{
-  BY_STANDARD = 0,
-  BY_DATE,
-  BY_DATE_ENTERED,
-  BY_DESC,
-  BY_QTY,
-  BY_PRICE
-} sort_type_t;
-
 struct _invoice_select_window {
   GNCBook *	book;
   GncOwner *	owner;
@@ -104,43 +97,25 @@
   GncOwner	owner_def;
 };
 
+
+/** This data structure does double duty.  It is used to maintain
+ *  information for the "New Invoice" dialog, and it is also used to
+ *  maintain information for the "Invoice Entry" page that is embedded
+ *  into a main window.  Beware, as not all fields are used by both windows.
+ */
 struct _invoice_window {
   GladeXML *	xml;
 
-  GtkWidget *	dialog;
-
-  GtkWidget *	statusbar;
-
-  /* Popup Menu */
-  GtkWidget *	popup_menu;
-
-  /* Toolbar Widgets */
-  GtkWidget *	toolbar_dock;
-  GtkWidget *	edit_button;
-  GtkWidget *	enter_button;
-  GtkWidget *	cancel_button;
-  GtkWidget *	delete_button;
-  GtkWidget *	duplicate_button;
-  GtkWidget *	blank_button;
-  GtkWidget *	print_button;
-  GtkWidget *	post_button;
-  GtkWidget *	unpost_button;
+  GtkWidget *	dialog;		/* Used by 'New Invoice Window' */
+  GncPluginPage *page;		/* Used by 'Edit Invoice' Page */
 
   /* Summary Bar Widgets */
-  GtkWidget *	summarybar_dock;
   GtkWidget *	total_label;
   GtkWidget *	total_cash_label;
   GtkWidget *	total_charge_label;
   GtkWidget *	total_subtotal_label;
   GtkWidget *	total_tax_label;
 
-  /* Menu Widgets */
-  GtkWidget *	menu_print;
-  GtkWidget *	menu_cut;
-  GtkWidget *	menu_paste;
-  GtkWidget *	menu_edit_invoice;
-  GtkWidget *	menu_actions;
-
   /* Data Widgets */
   GtkWidget *	id_entry;
   GtkWidget *	notes_text;
@@ -169,14 +144,13 @@
   GtkWidget *	to_charge_frame;
   GtkWidget *	to_charge_edit;
 
-  gboolean	width_inited;
   gint		width;
 
   GncBillTerm *	terms;
   GnucashRegister *	reg;
   GncEntryLedger *	ledger;
 
-  sort_type_t	last_sort;
+  invoice_sort_type_t	last_sort;
 
   InvoiceDialogType	dialog_type;
   GUID		invoice_guid;
@@ -195,38 +169,6 @@
 
 /* Forward definitions for CB functions */
 void gnc_invoice_window_closeCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_editCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_recordCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_cancelCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_deleteCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_duplicateCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_blankCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_printCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_postCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_unpostCB (GtkWidget *widget, gpointer data);
-
-void gnc_invoice_window_cut_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_copy_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_paste_cb (GtkWidget *widget, gpointer data);
-
-void gnc_invoice_window_new_account_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_new_invoice_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_report_owner_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_taxtable_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_billterm_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_payment_cb (GtkWidget *widget, gpointer data);
-
-void gnc_invoice_window_sort_standard_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_sort_date_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_sort_date_entered_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_sort_description_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_sort_quantity_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_sort_price_cb (GtkWidget *widget, gpointer data);
-
-void gnc_invoice_window_toolbar_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_statusbar_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_summarybar_cb (GtkWidget *widget, gpointer data);
-
 void gnc_invoice_window_active_toggled_cb (GtkWidget *widget, gpointer data);
 void gnc_invoice_window_leave_notes_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data);
 
@@ -234,10 +176,29 @@
 #define BILL_WIDTH_PREFIX "bill_reg"
 #define VOUCHER_WIDTH_PREFIX "voucher_reg"
 
-static void gnc_invoice_update_window (InvoiceWindow *iw);
+static void gnc_invoice_update_window (InvoiceWindow *iw, GtkWidget *widget);
 static InvoiceWindow * gnc_ui_invoice_modify (GncInvoice *invoice);
 
 /*******************************************************************************/
+/* FUNCTIONS FOR ACCESSING DATA STRUCTURE FIELDS */
+
+static GtkWidget *
+iw_get_window (InvoiceWindow *iw)
+{
+  if (iw->page)
+    return gnc_plugin_page_get_window(iw->page);
+  return iw->dialog;
+}
+
+GtkWidget *
+gnc_invoice_get_register(InvoiceWindow *iw)
+{
+  if (iw)
+    return (GtkWidget *)iw->reg;
+  return NULL;
+}
+
+/*******************************************************************************/
 /* FUNCTIONS FOR UNPOSTING */
 
 static gboolean
@@ -253,7 +214,8 @@
   toggle = glade_xml_get_widget (xml, "yes_tt_reset");
   pixmap = glade_xml_get_widget (xml, "q_pixmap");
 
-  gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(iw->dialog));
+  gtk_window_set_transient_for (GTK_WINDOW(dialog),
+				GTK_WINDOW(iw_get_window(iw)));
 
   iw->reset_tax_tables = FALSE;
 
@@ -358,14 +320,14 @@
   gchar *string;
 
   /* save the current entry in the ledger? */
-  if (!gnc_entry_ledger_check_close (iw->dialog, iw->ledger))
+  if (!gnc_entry_ledger_check_close (iw_get_window(iw), iw->ledger))
     return FALSE;
 
   /* Check the Owner */
   gnc_owner_get_owner (iw->owner_choice, &(iw->owner));
   res = gncOwnerGetName (&(iw->owner));
   if (res == NULL || safe_strcmp (res, "") == 0) {
-    gnc_error_dialog (iw->dialog,
+    gnc_error_dialog (iw_get_window(iw),
 		      /* Translators: In this context,
 		       * 'Billing information' maps to the
 		       * label in the frame and means
@@ -537,7 +499,7 @@
     else
       msg = g_strdup (message);
 
-    result = gnc_verify_dialog (iw->dialog, FALSE, msg);
+    result = gnc_verify_dialog (iw_get_window(iw), FALSE, msg);
     g_free (msg);
 
     if (!result)
@@ -634,7 +596,7 @@
   /* Check that there is at least one Entry */
   invoice = iw_get_invoice (iw);
   if (gncInvoiceGetEntries (invoice) == NULL) {
-    gnc_error_dialog (iw->dialog,
+    gnc_error_dialog (iw_get_window(iw),
 		      _("The Invoice must have at least one Entry."));
     return;
   }
@@ -659,7 +621,7 @@
   /* Get the default for the accumulate option */
   accumulate = gnc_lookup_boolean_option("Business", "Accumulate splits on Post?", TRUE);
 
-  if (!gnc_dialog_dates_acct_question_parented (iw->dialog, message, ddue_label,
+  if (!gnc_dialog_dates_acct_question_parented (iw_get_window(iw), message, ddue_label,
 				       post_label, acct_label, question_label, TRUE,
 				       acct_types, iw->book, iw->terms,
 				       &ddue, &postdate, &memo, &acc, &accumulate))
@@ -686,7 +648,7 @@
   gnc_entry_ledger_set_readonly (iw->ledger, TRUE);
 
   /* ... and redisplay here. */
-  gnc_invoice_update_window (iw);
+  gnc_invoice_update_window (iw, NULL);
   gnc_table_refresh_gui (gnc_entry_ledger_get_table (iw->ledger), FALSE);
 }
 
@@ -714,7 +676,7 @@
   /* if we get here, we succeeded in unposting -- reset the ledger and redisplay */
   iw->dialog_type = EDIT_INVOICE;
   gnc_entry_ledger_set_readonly (iw->ledger, FALSE);
-  gnc_invoice_update_window (iw);
+  gnc_invoice_update_window (iw, NULL);
   gnc_table_refresh_gui (gnc_entry_ledger_get_table (iw->ledger), FALSE);
 }
 
@@ -736,11 +698,6 @@
   gnucash_register_paste_clipboard (iw->reg);
 }
 
-void gnc_invoice_window_new_account_cb (GtkWidget *widget, gpointer data)
-{
-  gnc_ui_new_account_window (NULL);
-}
-
 void gnc_invoice_window_new_invoice_cb (GtkWidget *widget, gpointer data)
 {
   InvoiceWindow *iw = data;
@@ -799,18 +756,6 @@
   gnc_business_call_owner_report (&iw->owner, NULL);
 }
 
-void gnc_invoice_window_taxtable_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_ui_tax_table_window_new (iw->book);
-}
-
-void gnc_invoice_window_billterm_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_ui_billterms_window_new (iw->book);
-}
-
 void gnc_invoice_window_payment_cb (GtkWidget *widget, gpointer data)
 {
   InvoiceWindow *iw = data;
@@ -826,8 +771,8 @@
 
 /* Sorting callbacks */
 
-static void
-gnc_invoice_window_sort (InvoiceWindow *iw, sort_type_t sort_code)
+void
+gnc_invoice_window_sort (InvoiceWindow *iw, invoice_sort_type_t sort_code)
 {
   QueryNew *query = gnc_entry_ledger_get_query (iw->ledger);
   GSList *p1 = NULL, *p2 = NULL, *p3 = NULL, *standard;
@@ -873,90 +818,8 @@
   gnc_entry_ledger_display_refresh (iw->ledger);
 }
 
-void
-gnc_invoice_window_sort_standard_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_invoice_window_sort (iw, BY_STANDARD);
-}
-
-void
-gnc_invoice_window_sort_date_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_invoice_window_sort (iw, BY_DATE);
-}
-
-void
-gnc_invoice_window_sort_date_entered_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_invoice_window_sort (iw, BY_DATE_ENTERED);
-}
-
-void
-gnc_invoice_window_sort_description_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_invoice_window_sort (iw, BY_DESC);
-}
-
-void
-gnc_invoice_window_sort_quantity_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_invoice_window_sort (iw, BY_QTY);
-}
-
-void
-gnc_invoice_window_sort_price_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_invoice_window_sort (iw, BY_PRICE);
-}
-
 /* Window configuration callbacks */
 
-void gnc_invoice_window_toolbar_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  GtkCheckMenuItem *checkmenu = GTK_CHECK_MENU_ITEM(widget);
-
-  if (checkmenu->active) {
-    gtk_widget_show(iw->toolbar_dock);
-  } else {
-    gtk_widget_hide(iw->toolbar_dock);
-    gtk_widget_queue_resize(iw->toolbar_dock);
-  }
-}
-
-void gnc_invoice_window_statusbar_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  GtkCheckMenuItem *checkmenu = GTK_CHECK_MENU_ITEM(widget);
-
-  if (checkmenu->active) {
-    gtk_widget_show(iw->statusbar);
-  } else {
-    gtk_widget_hide(iw->statusbar);
-    gtk_widget_queue_resize(iw->statusbar);
-  }
-}
-
-void
-gnc_invoice_window_summarybar_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  GtkCheckMenuItem *checkmenu = GTK_CHECK_MENU_ITEM(widget);
-
-  if (checkmenu->active) {
-    gtk_widget_show(iw->summarybar_dock);
-  } else {
-    gtk_widget_hide(iw->summarybar_dock);
-    gtk_widget_queue_resize(iw->summarybar_dock);
-  }
-}
-
 void
 gnc_invoice_window_active_toggled_cb (GtkWidget *widget, gpointer data)
 {
@@ -975,11 +838,16 @@
 {
   InvoiceWindow *iw = data;
   GncInvoice *invoice = iw_get_invoice(iw);
+  GtkTextBuffer* text_buffer;
+  GtkTextIter start, end;
+  gchar *text;
 
   if (!invoice) return;
 
-  gncInvoiceSetNotes (invoice, gtk_editable_get_chars
-		      (GTK_EDITABLE (widget), 0, -1));
+  text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(iw->notes_text));
+  gtk_text_buffer_get_bounds (text_buffer, &start, &end);
+  text = gtk_text_buffer_get_text (text_buffer, &start, &end, FALSE);
+  gncInvoiceSetNotes (invoice, text);
 }
 
 static void
@@ -1021,7 +889,7 @@
   return label;
 }
 
-static GtkWidget *
+GtkWidget *
 gnc_invoice_window_create_summary_bar (InvoiceWindow *iw)
 {
   GtkWidget *summarybar;
@@ -1052,81 +920,10 @@
     break;
   }
 
+  gtk_widget_show_all(summarybar);
   return summarybar;
 }
 
-static GtkWidget *
-gnc_invoice_window_create_popup_menu (InvoiceWindow *iw)
-{
-  GtkWidget *popup;
-  GladeXML *xml;
-
-  xml = gnc_glade_xml_new ("invoice.glade", "Invoice Window Popup Menu");
-
-  popup = glade_xml_get_widget (xml, "Invoice Window Popup Menu");
-
-  glade_xml_signal_autoconnect_full (xml, gnc_glade_autoconnect_full_func, iw);
-
-  /* Glade insists on making this a tearoff menu. */
-  if (gnc_gconf_menus_have_tearoff()) {
-    GtkMenuShell *ms = GTK_MENU_SHELL (popup);
-    GtkWidget *tearoff;
-
-    tearoff = g_list_nth_data (ms->children, 0);
-    ms->children = g_list_remove (ms->children, tearoff);
-    gtk_widget_destroy (tearoff);
-  }
-
-  iw->popup_menu = popup;
-
-  return popup;
-}
-
-static char *
-gnc_invoice_get_gconf_section (InvoiceWindow *iw)
-{
-  switch (gncOwnerGetType (&iw->owner)) {
-  case GNC_OWNER_CUSTOMER:
-    return GCONF_SECTION_INVOICE;
-  case GNC_OWNER_VENDOR:
-    return GCONF_SECTION_BILL;
-  case GNC_OWNER_EMPLOYEE:
-    return GCONF_SECTION_VOUCHER;
-  default:
-    g_warning ("invalid owner");
-    return NULL;
-  }
-}
-
-static void
-gnc_invoice_save_size (InvoiceWindow *iw)
-{
-  const gchar *section = gnc_invoice_get_gconf_section(iw);
-  
-  if (!section)
-    return;
-  gnc_save_window_size( section, GTK_WINDOW(iw->dialog) );
-}
-
-static void
-gnc_invoice_size_allocate (GtkWidget *widget,
-			   GtkAllocation *allocation,
-			   gpointer user_data)
-{
-  InvoiceWindow *iw = user_data;
-
-  /* HACK ALERT. this seems to be the only thing to get the
-   * freekin register window to stop freekin resizing itself
-   * all the freekin time.
-   */
-
-  if (iw->width == allocation->width)
-    return;
-
-  iw->width = allocation->width;
-  gtk_window_set_default_size (GTK_WINDOW(iw->dialog), iw->width, 0);
-}
-
 static int
 gnc_invoice_job_changed_cb (GtkWidget *widget, gpointer data)
 {
@@ -1370,9 +1167,7 @@
   InvoiceWindow *iw = user_data;
 
   if (iw) {
-    gtk_widget_hide (iw->dialog);
     gtk_widget_destroy (iw->dialog);
-    iw->dialog = NULL;
   }
 }
 
@@ -1382,15 +1177,8 @@
   InvoiceWindow *iw = user_data;
 
   if (iw) {
-    switch (iw->dialog_type) {
-    case VIEW_INVOICE:
-    case EDIT_INVOICE:
-      gnc_invoice_save_size (iw);
-      break;
-    default:
-      break;
-    }
-    gtk_widget_destroy (iw->dialog);
+    gnc_main_window_close_page(iw->page);
+    iw->page = NULL;
   }
 }
 
@@ -1416,7 +1204,7 @@
     return;
 
   //  if (iw)
-  //    gnc_invoice_update_window (iw);
+  //    gnc_invoice_update_window (iw, NULL);
 
   invoice = iw_get_invoice (iw);
   if (!invoice)
@@ -1461,20 +1249,19 @@
   }
 }
 
-static void
-gnc_invoice_redraw_help_cb (GnucashRegister *g_reg, gpointer data)
+void
+gnc_invoice_window_changed (InvoiceWindow *iw, GtkWidget *window)
 {
-  InvoiceWindow *iw = data;
-  const char *status;
-  char *help;
+  gnc_entry_ledger_set_parent(iw->ledger, window);
+}
 
+gchar *
+gnc_invoice_get_help (InvoiceWindow *iw)
+{
   if (!iw)
-    return;
+    return NULL;
 
-  help = gnc_table_get_help (gnc_entry_ledger_get_table (iw->ledger));
-  status = help ? help : "";
-  gnome_appbar_set_default (GNOME_APPBAR (iw->statusbar), status);
-  g_free (help);
+  return gnc_table_get_help (gnc_entry_ledger_get_table (iw->ledger));
 }
 
 static void
@@ -1513,7 +1300,7 @@
   gncOwnerInitJob (&iw->proj_job, gncOwnerGetJob (owner));
 
   /* Ok, NOW let's refresh ourselves */
-  gnc_invoice_update_window (iw);
+  gnc_invoice_update_window (iw, NULL);
 }
 
 static void
@@ -1549,8 +1336,18 @@
   gnc_entry_ledger_set_colors (reg_colors);
 }
 
+/** Update the various widgets in the window/page vased upon the data
+ *  in the InvoiceWindow data structure.
+ *
+ *  @param iw A pointer to the InvoiceWindow data structure.
+ *
+ *  @param widget If set, this is the widget that will be used for the
+ *  call to gtk_widget_show_all().  This is needed at window/page
+ *  creation time when all of the iw/page linkages haven't been set up
+ *  yet.
+ */
 static void
-gnc_invoice_update_window (InvoiceWindow *iw)
+gnc_invoice_update_window (InvoiceWindow *iw, GtkWidget *widget)
 {
   GtkWidget *acct_entry;
   GncInvoice *invoice;
@@ -1594,21 +1391,14 @@
     break;
   }
 
+  if (iw->owner_choice)
+    gtk_widget_show_all (iw->owner_choice);
+  if (iw->proj_cust_choice)
+    gtk_widget_show_all (iw->proj_cust_choice);
+
   gnc_invoice_update_job_choice (iw);
   gnc_invoice_update_proj_job (iw);
 
-  gtk_widget_show_all (iw->dialog);
-
-  if (!iw->width_inited)
-  {
-    const gchar *section = gnc_invoice_get_gconf_section (iw);
-
-    if (section)
-      gnc_restore_window_size (section, GTK_WINDOW (iw->dialog));
-
-    iw->width_inited = TRUE;
-  }
-
   /* Hide the project frame for customer invoices */
   if (iw->owner.type == GNC_OWNER_CUSTOMER)
     gtk_widget_hide_all (iw->proj_frame);
@@ -1681,8 +1471,14 @@
 
   } while (FALSE);
 
-  if (iw->dialog_type == NEW_INVOICE || iw->dialog_type == MOD_INVOICE)
+  gnc_invoice_id_changed_cb(NULL, iw);
+  if (iw->dialog_type == NEW_INVOICE || iw->dialog_type == MOD_INVOICE) {
+    if (widget)
+      gtk_widget_show (widget);
+    else
+      gtk_widget_show (iw_get_window(iw));
     return;
+  }
 
   /* Fill in the to_charge amount (only in VIEW/EDIT modes) */
   {
@@ -1703,9 +1499,6 @@
       hide = glade_xml_get_widget (iw->xml, "hide4");
       gtk_widget_hide_all (hide);
 
-      /* Remove the popup menu */
-      gnucash_register_attach_popup (iw->reg, NULL, iw);
-
     } else {			/* ! posted */
       hide = glade_xml_get_widget (iw->xml, "posted_label");
       gtk_widget_hide_all (hide);
@@ -1723,21 +1516,8 @@
   }
 
   /* Set the toolbar widgets sensitivity */
-  gtk_widget_set_sensitive (iw->edit_button, !is_posted);
-  gtk_widget_set_sensitive (iw->enter_button, !is_posted);
-  gtk_widget_set_sensitive (iw->cancel_button, !is_posted);
-  gtk_widget_set_sensitive (iw->delete_button, !is_posted);
-  gtk_widget_set_sensitive (iw->duplicate_button, !is_posted);
-  gtk_widget_set_sensitive (iw->blank_button, !is_posted);
-  gtk_widget_set_sensitive (iw->post_button, !is_posted);
-  gtk_widget_set_sensitive (iw->unpost_button, can_unpost);
-
-  /* Set the menubar widgets sensitivity */
-  gtk_widget_set_sensitive (iw->menu_print, is_posted);
-  gtk_widget_set_sensitive (iw->menu_cut, !is_posted);
-  gtk_widget_set_sensitive (iw->menu_paste, !is_posted);
-  gtk_widget_set_sensitive (iw->menu_edit_invoice, !is_posted);
-  gtk_widget_set_sensitive (iw->menu_actions, !is_posted);
+  if (iw->page)
+    gnc_plugin_page_invoice_update_menus(iw->page, is_posted, can_unpost);
 
   /* Set the to-change widget */
   gtk_widget_set_sensitive (iw->to_charge_edit, !is_posted);
@@ -1761,18 +1541,20 @@
     gtk_widget_set_sensitive (iw->terms_menu, FALSE);
     gtk_widget_set_sensitive (iw->notes_text, FALSE); *//* XXX: should notes remain writable? */
   }  
+
+  if (widget)
+    gtk_widget_show (widget);
+  else
+    gtk_widget_show (iw_get_window(iw));
 }
 
-void
-gnc_invoice_id_changed_cb (GtkWidget *widget, gpointer data)
+gchar *
+gnc_invoice_get_title (InvoiceWindow *iw)
 {
-  InvoiceWindow *iw = data;
-  char *wintitle = NULL, *title;
-  const char *id;
+  char *wintitle = NULL;
+  const char *id = NULL;
 
-  if (!iw) return;
-
-  id = gtk_entry_get_text (GTK_ENTRY (iw->id_entry));
+  if (!iw) return NULL;
 
   switch (gncOwnerGetType (&iw->owner)) 
     {
@@ -1825,11 +1607,30 @@
       break;
     }  
 
-  title = g_strconcat (wintitle, " - ", id, NULL);
-  gtk_window_set_title (GTK_WINDOW (iw->dialog), title);
-  g_free (title);
+  if (iw->id_entry)
+    id = gtk_entry_get_text (GTK_ENTRY (iw->id_entry));
+  if (id && *id)
+    return g_strconcat (wintitle, " - ", id, NULL);
+  return g_strdup (wintitle);
+}
+
+void
+gnc_invoice_id_changed_cb (GtkWidget *unused, gpointer data)
+{
+  InvoiceWindow *iw = data;
+  gchar *title;
+
+  if (!iw) return;
+  if (iw->page) {
+    gnc_plugin_page_invoice_update_title (iw->page);
+  } else {
+    title = gnc_invoice_get_title (iw);
+    gtk_window_set_title (GTK_WINDOW (iw->dialog), title);
+    g_free (title);
+  }
 }
 
+
 static gboolean
 find_handler (gpointer find_data, gpointer user_data)
 {
@@ -1840,16 +1641,12 @@
 }
 
 static InvoiceWindow *
-gnc_invoice_new_window (GNCBook *bookp, InvoiceDialogType type,
-			GncInvoice *invoice, GncOwner *owner)
+gnc_invoice_new_page (GNCBook *bookp, InvoiceDialogType type,
+		      GncInvoice *invoice, GncOwner *owner)
 {
   InvoiceWindow *iw;
-  GladeXML *xml;
-  GtkWidget *hbox;
-  GncEntryLedger *entry_ledger = NULL;
-  GncOwnerType owner_type;
-  GncEntryLedgerType ledger_type;
   GncOwner *billto;
+  GncPluginPage *new_page;
 
   g_assert (type != NEW_INVOICE && type != MOD_INVOICE);
   g_assert (invoice != NULL);
@@ -1865,7 +1662,7 @@
     iw = gnc_find_first_gui_component (DIALOG_VIEW_INVOICE_CM_CLASS,
 				       find_handler, &invoice_guid);
     if (iw) {
-      gtk_window_present (GTK_WINDOW(iw->dialog));
+      gnc_main_window_display_page(iw->page);
       return(iw);
     }
   }
@@ -1878,31 +1675,45 @@
   iw = g_new0 (InvoiceWindow, 1);
   iw->book = bookp;
   iw->dialog_type = type;
+  iw->invoice_guid = *gncInvoiceGetGUID (invoice);
   iw->width = -1;
 
   /* Save this for later */
   gncOwnerCopy (gncOwnerGetEndOwner (owner), &(iw->owner));
   gncOwnerInitJob (&(iw->job), gncOwnerGetJob (owner));
-  owner_type = gncOwnerGetType (&iw->owner);
 
   billto = gncInvoiceGetBillTo (invoice);
   gncOwnerCopy (gncOwnerGetEndOwner (billto), &(iw->proj_cust));
   gncOwnerInitJob (&iw->proj_job, gncOwnerGetJob (billto));
 
+  /* Now create the plugin page for this invoice and display it. */
+  new_page = gnc_plugin_page_invoice_new (iw);
+  gnc_main_window_open_page (gnc_plugin_business_get_window(), new_page);
+
+  return iw;
+}
+
+GtkWidget *
+gnc_invoice_create_page (InvoiceWindow *iw, gpointer page)
+{
+  GncInvoice *invoice;
+  GladeXML *xml;
+  GtkWidget *dialog, *hbox;
+  GncEntryLedger *entry_ledger = NULL;
+  GncOwnerType owner_type;
+  GncEntryLedgerType ledger_type;
+
+  invoice = gncInvoiceLookup(iw->book,&iw->invoice_guid);
+
+  iw->page = page;
+
   /* Find the dialog */
-  iw->xml = xml = gnc_glade_xml_new ("invoice.glade", "Invoice Entry Window");
-  iw->dialog = glade_xml_get_widget (xml, "Invoice Entry Window");
+  iw->xml = xml = gnc_glade_xml_new ("invoice.glade", "invoice_entry_vbox");
+  dialog = glade_xml_get_widget (xml, "invoice_entry_vbox");
 
   /* Autoconnect all the signals */
   glade_xml_signal_autoconnect_full (xml, gnc_glade_autoconnect_full_func, iw);
 
-  /* libglade should do this next line */
-  GNOME_APP(iw->dialog)->menubar = glade_xml_get_widget (xml, "menubar1");
-
-  // FIXME:GNOME2 -- going to have to move this dialog over to using the
-  // GtkActions.
-  //gnc_extensions_menu_setup(GNOME_APP(iw->dialog), WINDOW_NAME_INVOICE);
-
   /* Grab the widgets */
   iw->id_entry = glade_xml_get_widget (xml, "id_entry");
   iw->billing_id_entry = glade_xml_get_widget (xml, "billing_id_entry");
@@ -1919,28 +1730,10 @@
   iw->proj_cust_box = glade_xml_get_widget (xml, "proj_cust_hbox");
   iw->proj_job_box = glade_xml_get_widget (xml, "proj_job_hbox");
 
-  /* grab the toolbar widgets */
-  iw->toolbar_dock = glade_xml_get_widget (xml, "toolbar_dock");
-  iw->edit_button = glade_xml_get_widget (xml, "edit_button");
-  iw->enter_button = glade_xml_get_widget (xml, "enter_button");
-  iw->cancel_button = glade_xml_get_widget (xml, "cancel_button");
-  iw->delete_button = glade_xml_get_widget (xml, "delete_button");
-  iw->duplicate_button = glade_xml_get_widget (xml, "duplicate_button");
-  iw->blank_button = glade_xml_get_widget (xml, "blank_button");
-  iw->print_button = glade_xml_get_widget (xml, "print_button");
-  iw->post_button = glade_xml_get_widget (xml, "post_button");
-  iw->unpost_button = glade_xml_get_widget (xml, "unpost_button");
-
-  /* grab the menu widgets */
-  iw->menu_print = glade_xml_get_widget (xml, "menu_print");
-  iw->menu_cut = glade_xml_get_widget (xml, "menu_cut");
-  iw->menu_paste = glade_xml_get_widget (xml, "menu_paste");
-  iw->menu_edit_invoice = glade_xml_get_widget (xml, "menu_edit_invoice");
-  iw->menu_actions = glade_xml_get_widget (xml, "menu_actions");
-
   /* grab the to_charge widgets */
   {
     GtkWidget *edit;
+
     gnc_commodity *currency = gncInvoiceGetCurrency (invoice);
     GNCPrintAmountInfo print_info;
 
@@ -1956,34 +1749,21 @@
     hbox = glade_xml_get_widget (xml, "to_charge_box");
     gtk_box_pack_start (GTK_BOX (hbox), edit, TRUE, TRUE, 0);
 
-    gtk_signal_connect (GTK_OBJECT(gnc_amount_edit_gtk_entry
-				   (GNC_AMOUNT_EDIT(edit))),
-			"focus-out-event",
-			GTK_SIGNAL_FUNC(gnc_invoice_window_leave_to_charge_cb), iw);
-    gtk_signal_connect (GTK_OBJECT (edit), "amount_changed",
-			GTK_SIGNAL_FUNC(gnc_invoice_window_changed_to_charge_cb),
-			iw);
-  }
-
-  /* grab the statusbar */
-  iw->statusbar = glade_xml_get_widget (xml, "status_bar");
-
-  /* grab/build the summarybar */
-  {
-    GtkWidget * summarybar = gnc_invoice_window_create_summary_bar (iw);
-    iw->summarybar_dock = glade_xml_get_widget (xml, "summarybar_dock");
-    if (summarybar) {
-      gtk_widget_show_all (summarybar);
-      gtk_container_add (GTK_CONTAINER (iw->summarybar_dock), summarybar);
-    }
+    g_signal_connect(G_OBJECT(gnc_amount_edit_gtk_entry(GNC_AMOUNT_EDIT(edit))),
+		     "focus-out-event",
+		     G_CALLBACK(gnc_invoice_window_leave_to_charge_cb), iw);
+    g_signal_connect(G_OBJECT(edit), "amount_changed",
+		     G_CALLBACK(gnc_invoice_window_changed_to_charge_cb), iw);
   }
 
   hbox = glade_xml_get_widget (xml, "date_opened_hbox");
   iw->opened_date = gnc_date_edit_new (time(NULL), FALSE, FALSE);
+  gtk_widget_show(iw->opened_date);
   gtk_box_pack_start (GTK_BOX(hbox), iw->opened_date, TRUE, TRUE, 0);
 
   iw->posted_date_hbox = glade_xml_get_widget (xml, "date_posted_hbox");
   iw->posted_date = gnc_date_edit_new (time(NULL), FALSE, FALSE);
+  gtk_widget_show(iw->posted_date);
   gtk_box_pack_start (GTK_BOX(iw->posted_date_hbox), iw->posted_date,
 		      TRUE, TRUE, 0);
 
@@ -1993,7 +1773,8 @@
 
   /* Build the ledger */
   ledger_type = GNCENTRY_INVOICE_VIEWER;
-  switch (type) {
+  owner_type = gncOwnerGetType (&iw->owner);
+  switch (iw->dialog_type) {
   case EDIT_INVOICE:
     switch (owner_type) {
     case GNC_OWNER_CUSTOMER:
@@ -2029,14 +1810,12 @@
 
   /* Save the ledger... */
   iw->ledger = entry_ledger;
-  gnc_entry_ledger_set_parent (entry_ledger, iw->dialog);
+  /* window will be updated in a callback */
 
   /* Set the entry_ledger's invoice */
   gnc_entry_ledger_set_default_invoice (entry_ledger, invoice);
 
   /* Setup initial values */
-  iw->invoice_guid = *gncInvoiceGetGUID (invoice);
-
   iw->component_id =
     gnc_register_gui_component (DIALOG_VIEW_INVOICE_CM_CLASS,
 				gnc_invoice_window_refresh_handler,
@@ -2047,17 +1826,12 @@
 				       GNC_INVOICE_MODULE_NAME,
 				       GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
 
-  g_signal_connect (G_OBJECT (iw->dialog), "destroy",
+  g_signal_connect (G_OBJECT (dialog), "destroy",
 		    G_CALLBACK (gnc_invoice_window_destroy_cb), iw);
-  g_signal_connect (G_OBJECT (iw->dialog), "size-allocate",
-		    G_CALLBACK (gnc_invoice_size_allocate), iw);
-  g_signal_connect (GTK_OBJECT (iw->id_entry), "changed",
-		    G_CALLBACK (gnc_invoice_id_changed_cb), iw);
 
   /* Create the register */
   {
-    GtkWidget *regWidget, *frame;
-    GtkWidget *popup;
+    GtkWidget *regWidget, *frame, *window;
     guint num_rows;
 
     num_rows = (guint) gnc_lookup_number_option ("Business",
@@ -2067,38 +1841,34 @@
     /* Watch the order of operations, here... */
     regWidget = gnucash_register_new (gnc_entry_ledger_get_table
 				      (entry_ledger));
+    gtk_widget_show(regWidget);
     gnc_table_init_gui( regWidget, entry_ledger );
 
     frame = glade_xml_get_widget (xml, "ledger_frame");
     gtk_container_add (GTK_CONTAINER (frame), regWidget);
     
     iw->reg = GNUCASH_REGISTER (regWidget);
-    GNUCASH_SHEET (iw->reg->sheet)->window = iw->dialog;
+    window = gnc_plugin_page_get_window(iw->page);
+    GNUCASH_SHEET (iw->reg->sheet)->window = window;
 
     g_signal_connect (G_OBJECT (regWidget), "activate_cursor",
 		      G_CALLBACK (gnc_invoice_window_recordCB), iw);
     g_signal_connect (G_OBJECT (regWidget), "redraw_all",
 		      G_CALLBACK (gnc_invoice_redraw_all_cb), iw);
-    g_signal_connect (G_OBJECT (regWidget), "redraw_help",
-		      G_CALLBACK (gnc_invoice_redraw_help_cb), iw);
-
-    popup = gnc_invoice_window_create_popup_menu (iw);
-    gnucash_register_attach_popup (GNUCASH_REGISTER (regWidget), popup, iw);
   }
 
   gnc_table_realize_gui (gnc_entry_ledger_get_table (entry_ledger));
  
-  /* Show the dialog */
-  gtk_widget_show_all (iw->dialog);
-
   /* Now fill in a lot of the pieces and display properly */
   gnc_ui_billterms_optionmenu (iw->terms_menu, iw->book, TRUE, &iw->terms);
-  gnc_invoice_update_window (iw);
+  gnc_invoice_update_window (iw, dialog);
 
   gnc_table_refresh_gui (gnc_entry_ledger_get_table (iw->ledger), TRUE);
-  gnc_window_adjust_for_screen (GTK_WINDOW(iw->dialog));
 
-  return iw;
+  /* Show the dialog */
+  //  gtk_widget_show_all (dialog);
+
+  return dialog;
 }
 
 static InvoiceWindow *
@@ -2151,11 +1921,11 @@
   gncOwnerCopy (gncOwnerGetEndOwner (billto), &(iw->proj_cust));
   gncOwnerInitJob (&iw->proj_job, gncOwnerGetJob (billto));
 
-  /* Find the dialog */
+  /* Find the glade page layout */
   iw->xml = xml = gnc_glade_xml_new ("invoice.glade", "New Invoice Dialog");
   iw->dialog = glade_xml_get_widget (xml, "New Invoice Dialog");
 
-  gtk_object_set_data (GTK_OBJECT (iw->dialog), "dialog_info", iw);
+  g_object_set_data (G_OBJECT (iw->dialog), "dialog_info", iw);
 
   /* Grab the widgets */
   iw->id_entry = glade_xml_get_widget (xml, "id_entry");
@@ -2174,11 +1944,11 @@
 
   hbox = glade_xml_get_widget (xml, "date_opened_hbox");
   iw->opened_date = gnc_date_edit_new (time(NULL), FALSE, FALSE);
+  gtk_widget_show(iw->opened_date);
   gtk_box_pack_start (GTK_BOX(hbox), iw->opened_date, TRUE, TRUE, 0);
 
   /* If this is a New Invoice, reset the Notes file to read/write */
-  if (iw->dialog_type == NEW_INVOICE)
-    gtk_text_view_set_editable (GTK_TEXT_VIEW (iw->notes_text), TRUE);
+  gtk_widget_set_sensitive (iw->notes_text, (iw->dialog_type == NEW_INVOICE));
 
   /* Setup signals */
   glade_xml_signal_autoconnect_full( xml,
@@ -2199,7 +1969,7 @@
 
   /* Now fill in a lot of the pieces and display properly */
   gnc_ui_billterms_optionmenu (iw->terms_menu, iw->book, TRUE, &iw->terms);
-  gnc_invoice_update_window (iw);
+  gnc_invoice_update_window (iw, iw->dialog);
   gnc_table_refresh_gui (gnc_entry_ledger_get_table (iw->ledger), TRUE);
 
   return iw;
@@ -2219,8 +1989,8 @@
   else
     type = EDIT_INVOICE;
 
-  iw = gnc_invoice_new_window (gncInvoiceGetBook(invoice), type,
-			       invoice, gncInvoiceGetOwner (invoice));
+  iw = gnc_invoice_new_page (gncInvoiceGetBook(invoice), type,
+			     invoice, gncInvoiceGetOwner (invoice));
 
   return iw;
 }
Index: gw-business-gnome-spec.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/gw-business-gnome-spec.scm,v
retrieving revision 1.23.4.1
retrieving revision 1.23.4.2
diff -Lsrc/business/business-gnome/gw-business-gnome-spec.scm -Lsrc/business/business-gnome/gw-business-gnome-spec.scm -u -r1.23.4.1 -r1.23.4.2
--- src/business/business-gnome/gw-business-gnome-spec.scm
+++ src/business/business-gnome/gw-business-gnome-spec.scm
@@ -163,14 +163,6 @@
    "Dialog: Select a GncInvoice.  Either start_selection or "
    "owner may be NULL.")
   
-  (gw:wrap-function
-   ws
-   'gnc:invoice-show-bills-due
-   '<gw:void>
-   "gnc_invoice_show_bills_due"
-   '((<gnc:Book*> book) (<gw:double> days_in_advance))
-   "Dialog: display the bills due within the next \"days\"")
-
   ;;
   ;; dialog-job.h
   ;;
Index: business-gnome.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/business-gnome.scm,v
retrieving revision 1.47.4.6
retrieving revision 1.47.4.7
diff -Lsrc/business/business-gnome/business-gnome.scm -Lsrc/business/business-gnome/business-gnome.scm -u -r1.47.4.6 -r1.47.4.7
--- src/business/business-gnome/business-gnome.scm
+++ src/business/business-gnome/business-gnome.scm
@@ -18,30 +18,9 @@
 (define new-label (N_ "New"))
 (define find-label (N_ "Find"))
 
-(define ui-started #f)
-
-(define (remind-bills-due session)
-  (define (option-value name)
-    (gnc:option-value (gnc:lookup-global-option gnc:*business-label* name)))
-
-  (let ((check-bills? (option-value "Notify Bills Due?")))
-    (if (and session check-bills?)
-	(let* ((book (gnc:session-get-book session))
-	       (days (option-value "Bills Due Days")))
-	  (gnc:invoice-show-bills-due book days)))))
-
 (define (business-report-function)
   (gnc:add-extension
    (gnc:make-menu gnc:menuname-business-reports
 		  (list gnc:menuname-reports))))
 
-(define (business-book-opened session)
-  (remind-bills-due session))
-
-(define (business-ui-started)
-  (set! ui-started #t)
-  (remind-bills-due (gnc:get-current-session)))
-
 (gnc:hook-add-dangler gnc:*report-hook* business-report-function)
-;(gnc:hook-add-dangler gnc:*ui-post-startup-hook* business-ui-started)
-(gnc:hook-add-dangler gnc:*book-opened-hook* business-book-opened)
--- /dev/null
+++ src/business/business-gnome/gnc-plugin-page-invoice.c
@@ -0,0 +1,749 @@
+/* 
+ * gnc-plugin-page-invoice.c -- 
+ *
+ * Copyright (C) 2003 Jan Arne Petersen <jpetersen at uni-bonn.de>
+ * Copyright (C) 2003 David Hampton <hampton at employees.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, contact:
+ *
+ * Free Software Foundation           Voice:  +1-617-542-5942
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
+ * Boston, MA  02111-1307,  USA       gnu at gnu.org
+ */
+
+#include "config.h"
+
+#include "gnc-plugin.h"
+#include "dialog-invoice.h"
+#include "gnc-plugin-page-invoice.h"
+
+#include "dialog-account.h"
+#include "gnc-gobject-utils.h"
+#include "gnc-gnome-utils.h"
+#include "gnc-icons.h"
+#include "gnucash-sheet.h"
+#include "gnc-ui-util.h"
+#include "gnc-window.h"
+
+/* This static indicates the debugging module that this .o belongs to.  */
+static short module = MOD_GUI;
+
+static void gnc_plugin_page_invoice_class_init (GncPluginPageInvoiceClass *klass);
+static void gnc_plugin_page_invoice_init (GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_finalize (GObject *object);
+
+static GtkWidget *gnc_plugin_page_invoice_create_widget (GncPluginPage *plugin_page);
+static void gnc_plugin_page_invoice_destroy_widget (GncPluginPage *plugin_page);
+static void gnc_plugin_page_invoice_window_changed (GncPluginPage *plugin_page, GtkWidget *window);
+static void gnc_plugin_page_invoice_merge_actions (GncPluginPage *plugin_page, GtkUIManager *ui_merge);
+static void gnc_plugin_page_invoice_unmerge_actions (GncPluginPage *plugin_page, GtkUIManager *ui_merge);
+
+
+/* Callbacks */
+static gboolean gnc_plugin_page_invoice_button_press_cb (GtkWidget *widget,
+							      GdkEventButton *event,
+			       				      GncPluginPageInvoice *page);
+
+void gnc_plugin_page_invoice_start_toggle_cb(GtkToggleButton *toggle, gpointer data);
+void gnc_plugin_page_invoice_end_toggle_cb(GtkToggleButton *toggle, gpointer data);
+void gnc_plugin_page_invoice_today_cb(GtkButton *buttontoggle, gpointer data);
+
+/* Command callbacks */
+static void gnc_plugin_page_invoice_cmd_new_invoice (GtkAction *action, GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_cmd_new_account (GtkAction *action, GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_cmd_print (GtkAction *action, GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_cmd_cut (GtkAction *action, GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_cmd_copy (GtkAction *action, GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_cmd_paste (GtkAction *action, GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_cmd_edit (GtkAction *action, GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_cmd_post (GtkAction *action, GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_cmd_unpost (GtkAction *action, GncPluginPageInvoice *plugin_page);
+
+static void gnc_plugin_page_invoice_cmd_sort_changed (GtkAction *action,
+						      GtkRadioAction *current,
+						      GncPluginPageInvoice *plugin_page);
+
+static void gnc_plugin_page_invoice_cmd_enter (GtkAction *action, GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_cmd_cancel (GtkAction *action, GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_cmd_delete (GtkAction *action, GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_cmd_blank (GtkAction *action, GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_cmd_duplicate (GtkAction *action, GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_cmd_pay_invoice (GtkAction *action, GncPluginPageInvoice *plugin_page);
+static void gnc_plugin_page_invoice_cmd_company_report (GtkAction *action, GncPluginPageInvoice *plugin_page);
+
+static void gnc_plugin_page_redraw_help_cb( GnucashRegister *gsr, GncPluginPageInvoice *invoice_page );
+
+/************************************************************
+ *                          Actions                         *
+ ************************************************************/
+
+static GtkActionEntry gnc_plugin_page_invoice_actions [] =
+{
+	/* Toplevel */
+	{ "FakeToplevel", NULL, "", NULL, NULL, NULL },
+	{ "SortOrderAction", NULL, N_("Sort _Order"), NULL, NULL, NULL },
+
+	/* File menu */
+	{ "FileNewInvoiceAction", GTK_STOCK_NEW, N_("New _Invoice"), "",
+	  N_("Create a new invoice"),
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_new_invoice) },
+	{ "FileNewAccountAction", GNC_STOCK_NEW_ACCOUNT, N_("New _Account..."), NULL,
+	  N_("Create a new account"),
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_new_account) },
+	{ "FilePrintAction", GTK_STOCK_PRINT, N_("Print Invoice"), NULL,
+	  N_("Make a printable invoice"),
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_print) },
+
+	/* Edit menu */
+	{ "EditCutAction", GTK_STOCK_CUT, N_("_Cut"), NULL,
+	  NULL,
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_cut) },
+	{ "EditCopyAction", GTK_STOCK_COPY, N_("Copy"), NULL,
+	  NULL,
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_copy) },
+	{ "EditPasteAction", GTK_STOCK_PASTE, N_("_Paste"), NULL,
+	  NULL,
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_paste) },
+	{ "EditEditInvoiceAction", GTK_STOCK_MISSING_IMAGE, N_("_Edit Invoice"), NULL,
+	  N_("Edit this invoice"),
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_edit) },
+	{ "EditPostInvoiceAction", GTK_STOCK_JUMP_TO, N_("_Post Invoice"), NULL,
+	  N_("Post this Invoice to your Chart of Accounts"),
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_post) },
+	{ "EditUnpostInvoiceAction", GTK_STOCK_CONVERT, N_("_Unpost Invoice"), NULL,
+	  N_("Unpost this Invoice and make it editable"),
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_unpost) },
+
+	/* Actions menu */
+	{ "RecordEntryAction", GTK_STOCK_ADD, N_("_Enter"), NULL,
+	  N_("Record the current entry"),
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_enter) },
+	{ "CancelEntryAction", GTK_STOCK_CANCEL, N_("_Cancel"), NULL,
+	  N_("_Cancel the current entry"),
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_cancel) },
+	{ "DeleteEntryAction", GTK_STOCK_DELETE, N_("_Delete"), NULL,
+	  N_("Delete the current entry"),
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_delete) },
+	{ "BlankEntryAction", GTK_STOCK_MISSING_IMAGE, N_("_Blank"), NULL,
+	  N_("Move to the blank entry at the bottom of the Invoice"),
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_blank) },
+	{ "DuplicateEntryAction", GTK_STOCK_COPY, N_("Dup_licate Entry"), NULL,
+	  N_("Make a copy of the current entry"),
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_duplicate) },
+
+	/* Business menu */
+	{ "ToolsProcessPaymentAction", NULL, N_("_Pay Invoice"), NULL,
+	  N_("Enter a payment for the owner of this Invoice"),
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_pay_invoice) },
+
+	/* Reports menu */
+	{ "ReportsCompanyReportAction", NULL, N_("_Company Report"), NULL,
+	  N_("Open a company report window for the owner of this Invoice"),
+	  G_CALLBACK (gnc_plugin_page_invoice_cmd_company_report) },
+};
+static guint gnc_plugin_page_invoice_n_actions = G_N_ELEMENTS (gnc_plugin_page_invoice_actions);
+
+static GtkRadioActionEntry radio_entries [] =
+{
+	{ "SortStandardAction", NULL, N_("_Standard"), NULL, "Keep normal invoice order", BY_STANDARD },
+	{ "SortDateAction", NULL, N_("_Date"), NULL, "Sort by date", BY_DATE },
+	{ "SortDateEntryAction", NULL, N_("Date of _Entry"), NULL, "Sort by the date of entry", BY_DATE_ENTERED },
+	{ "SortQuantityAction", NULL, N_("_Quantity"), NULL, "Sort by quantity", BY_QTY },
+	{ "SortPriceAction", NULL, N_("_Price"), NULL, "Sort by price", BY_PRICE },
+	{ "SortDescriptionAction", NULL, N_("Descri_ption"), NULL, "Sort by description", BY_DESC },
+};
+static guint n_radio_entries = G_N_ELEMENTS (radio_entries);
+
+static const gchar *posted_actions[] = {
+	"FilePrintAction",
+	NULL
+};
+
+static const gchar *unposted_actions[] = {
+	"EditCutAction",
+	"EditPasteAction",
+	"EditEditInvoiceAction",
+	"EditPostInvoiceAction",
+	"RecordEntryAction",
+	"CancelEntryAction",
+	"DeleteEntryAction",
+	"DuplicateEntryAction",
+	"BlankEntryAction",
+	NULL
+};
+
+static const gchar *can_unpost_actions[] = {
+	"EditUnpostInvoiceAction",
+	NULL
+};
+
+/* Short labels: Used on toolbar buttons. */
+static action_short_labels short_labels[] = {
+  { "RecordEntryAction", 	  N_("Enter") },
+  { "CancelEntryAction", 	  N_("Cancel") },
+  { "DeleteEntryAction", 	  N_("Delete") },
+  { "DuplicateEntryAction",       N_("Duplicate") },
+  { "BlankEntryAction",           N_("Blank") },
+  { "EditPostInvoiceAction",      N_("Post") },
+  { "EditUnpostInvoiceAction",    N_("Unpost") },
+  { NULL, NULL },
+};
+
+
+/************************************************************/
+/*                      Data Structures                     */
+/************************************************************/
+
+struct GncPluginPageInvoicePrivate
+{
+	GtkActionGroup *action_group;
+	guint merge_id;
+	GtkUIManager *ui_merge;
+
+	InvoiceWindow *iw;
+
+	GtkWidget *widget;
+};
+
+static GObjectClass *parent_class = NULL;
+
+/************************************************************/
+/*                      Implementation                      */
+/************************************************************/
+
+GType
+gnc_plugin_page_invoice_get_type (void)
+{
+	static GType gnc_plugin_page_invoice_type = 0;
+
+	if (gnc_plugin_page_invoice_type == 0) {
+		static const GTypeInfo our_info = {
+			sizeof (GncPluginPageInvoiceClass),
+			NULL,
+			NULL,
+			(GClassInitFunc) gnc_plugin_page_invoice_class_init,
+			NULL,
+			NULL,
+			sizeof (GncPluginPageInvoice),
+			0,
+			(GInstanceInitFunc) gnc_plugin_page_invoice_init
+		};
+		
+		gnc_plugin_page_invoice_type = g_type_register_static (GNC_TYPE_PLUGIN_PAGE,
+									"GncPluginPageInvoice",
+									&our_info, 0);
+	}
+
+	return gnc_plugin_page_invoice_type;
+}
+
+GncPluginPage *
+gnc_plugin_page_invoice_new (InvoiceWindow *iw)
+{
+	GncPluginPageInvoice *invoice_page;
+	GncPluginPage *plugin_page;
+	const GList *item;
+
+	/* Is there an existing page? */
+	item = gnc_gobject_tracking_get_list(GNC_PLUGIN_PAGE_INVOICE_NAME);
+	for ( ; item; item = g_list_next(item)) {
+	  invoice_page = (GncPluginPageInvoice *)item->data;
+	  if (invoice_page->priv->iw == iw)
+	    return GNC_PLUGIN_PAGE(invoice_page);
+	}
+
+	invoice_page = g_object_new (GNC_TYPE_PLUGIN_PAGE_INVOICE, NULL);
+	invoice_page->priv->iw = iw;
+
+	plugin_page = GNC_PLUGIN_PAGE(invoice_page);
+	gnc_plugin_page_invoice_update_title(plugin_page);
+	gnc_plugin_page_set_uri(plugin_page, "default:");
+
+	return plugin_page;
+}
+
+static void
+gnc_plugin_page_invoice_class_init (GncPluginPageInvoiceClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+	GncPluginPageClass *gnc_plugin_class = GNC_PLUGIN_PAGE_CLASS(klass);
+
+	parent_class = g_type_class_peek_parent (klass);
+
+	object_class->finalize = gnc_plugin_page_invoice_finalize;
+
+	gnc_plugin_class->tab_icon        = NULL;
+	gnc_plugin_class->plugin_name     = GNC_PLUGIN_PAGE_INVOICE_NAME;
+	gnc_plugin_class->create_widget   = gnc_plugin_page_invoice_create_widget;
+	gnc_plugin_class->destroy_widget  = gnc_plugin_page_invoice_destroy_widget;
+	gnc_plugin_class->window_changed  = gnc_plugin_page_invoice_window_changed;
+	gnc_plugin_class->merge_actions   = gnc_plugin_page_invoice_merge_actions;
+	gnc_plugin_class->unmerge_actions = gnc_plugin_page_invoice_unmerge_actions;
+}
+
+static void
+gnc_plugin_page_invoice_init (GncPluginPageInvoice *plugin_page)
+{
+	GncPluginPageInvoicePrivate *priv;
+	GncPluginPage *parent;
+	GtkActionGroup *action_group;
+
+	priv = g_new0 (GncPluginPageInvoicePrivate, 1);
+	plugin_page->priv = priv;
+
+	/* Init parent declared variables */
+	parent = GNC_PLUGIN_PAGE(plugin_page);
+	gnc_plugin_page_set_title(parent, _("Invoice"));
+	gnc_plugin_page_set_tab_name(parent, _("Incoice"));
+	gnc_plugin_page_set_uri(parent, "default:");
+
+	/* change me when the system supports multiple books */
+	gnc_plugin_page_add_book(parent, gnc_get_current_book());
+
+	/* Create menu and toolbar information */
+	action_group = gtk_action_group_new ("GncPluginPageInvoiceActions");
+	priv->action_group = action_group;
+	gtk_action_group_add_actions (action_group, gnc_plugin_page_invoice_actions,
+				      gnc_plugin_page_invoice_n_actions, plugin_page);
+	gtk_action_group_add_radio_actions (action_group,
+					    radio_entries, n_radio_entries,
+					    REG_STYLE_LEDGER,
+					    G_CALLBACK(gnc_plugin_page_invoice_cmd_sort_changed),
+					    plugin_page);
+
+	gnc_plugin_init_short_names (action_group, short_labels);
+}
+
+static void
+gnc_plugin_page_invoice_finalize (GObject *object)
+{
+	GncPluginPageInvoice *page;
+
+	ENTER("object %p", object);
+	page = GNC_PLUGIN_PAGE_INVOICE (object);
+
+	g_return_if_fail (GNC_IS_PLUGIN_PAGE_INVOICE (page));
+	g_return_if_fail (page->priv != NULL);
+
+	g_free (page->priv);
+
+	G_OBJECT_CLASS (parent_class)->finalize (object);
+	LEAVE(" ");
+}
+
+
+void
+gnc_plugin_page_invoice_update_menus (GncPluginPage *page, gboolean is_posted, gboolean can_unpost)
+{ 
+  GncPluginPageInvoice *invoice_page;
+  GtkActionGroup *action_group;
+
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(page));
+
+  invoice_page = GNC_PLUGIN_PAGE_INVOICE(page);
+  action_group = invoice_page->priv->action_group;
+  gnc_plugin_update_actions (action_group, posted_actions,
+			     "sensitive", is_posted);
+  gnc_plugin_update_actions (action_group, unposted_actions,
+			     "sensitive", !is_posted);
+  gnc_plugin_update_actions (action_group, can_unpost_actions,
+			     "sensitive", can_unpost);
+}
+
+
+/* Virtual Functions */
+
+static GtkWidget *
+gnc_plugin_page_invoice_create_widget (GncPluginPage *plugin_page)
+{
+	GncPluginPageInvoice *page;
+	GncPluginPageInvoicePrivate *priv;
+	GtkWidget *regWidget;
+
+	ENTER("page %p", plugin_page);
+	page = GNC_PLUGIN_PAGE_INVOICE (plugin_page);
+	priv = page->priv;
+	if (priv->widget != NULL)
+		return priv->widget;
+
+	priv->widget = gnc_invoice_create_page(priv->iw, page);
+	gtk_widget_show (priv->widget);
+
+	plugin_page->summarybar = gnc_invoice_window_create_summary_bar(priv->iw);
+	gtk_widget_show(plugin_page->summarybar);
+
+	regWidget = gnc_invoice_get_register(priv->iw);
+	if (regWidget) {
+	  g_signal_connect (G_OBJECT (regWidget), "redraw-help",
+			    G_CALLBACK (gnc_plugin_page_redraw_help_cb), page);
+	  g_signal_connect (G_OBJECT (regWidget), "button-press-event",
+			    G_CALLBACK (gnc_plugin_page_invoice_button_press_cb), page);
+	}
+
+	return priv->widget;
+}
+
+static void
+gnc_plugin_page_invoice_destroy_widget (GncPluginPage *plugin_page)
+{
+	GncPluginPageInvoice *page;
+	GncPluginPageInvoicePrivate *priv;
+
+	ENTER("page %p", plugin_page);
+	page = GNC_PLUGIN_PAGE_INVOICE (plugin_page);
+	priv = page->priv;
+
+	if (priv->widget == NULL)
+		return;
+
+	gtk_widget_hide(priv->widget);
+	gnc_invoice_window_destroy_cb(priv->widget, priv->iw);
+	priv->widget = NULL;
+}
+
+static void
+gnc_plugin_page_invoice_window_changed (GncPluginPage *plugin_page,
+					GtkWidget *window)
+{
+	GncPluginPageInvoice *page;
+	
+	g_return_if_fail (GNC_IS_PLUGIN_PAGE_INVOICE (plugin_page));
+
+	page = GNC_PLUGIN_PAGE_INVOICE(plugin_page);
+	gnc_invoice_window_changed (page->priv->iw, window);
+}
+	
+static void
+gnc_plugin_page_invoice_merge_actions (GncPluginPage *plugin_page,
+					GtkUIManager *ui_merge)
+{
+	GncPluginPageInvoice *invoice_page;
+	GncPluginPageInvoicePrivate *priv;
+	
+	g_return_if_fail (GNC_IS_PLUGIN_PAGE_INVOICE (plugin_page));
+
+	invoice_page = GNC_PLUGIN_PAGE_INVOICE(plugin_page);
+	priv = invoice_page->priv;
+
+	priv->ui_merge = ui_merge;
+	priv->merge_id =
+	  gnc_plugin_add_actions (priv->ui_merge,
+				  priv->action_group,
+				  "gnc-plugin-page-invoice-ui.xml");
+}
+	
+static void
+gnc_plugin_page_invoice_unmerge_actions (GncPluginPage *plugin_page,
+					      GtkUIManager *ui_merge)
+{
+	GncPluginPageInvoice *plugin_page_register = GNC_PLUGIN_PAGE_INVOICE(plugin_page);
+	
+	g_return_if_fail (GNC_IS_PLUGIN_PAGE_INVOICE (plugin_page_register));
+	g_return_if_fail (plugin_page_register->priv->merge_id != 0);
+	g_return_if_fail (plugin_page_register->priv->action_group != NULL);
+
+	gtk_ui_manager_remove_ui (ui_merge, plugin_page_register->priv->merge_id);
+	gtk_ui_manager_remove_action_group (ui_merge, plugin_page_register->priv->action_group);
+
+	plugin_page_register->priv->ui_merge = NULL;
+}
+
+
+/* Callbacks */
+static gboolean
+gnc_plugin_page_invoice_button_press_cb (GtkWidget *widget,
+					 GdkEventButton *event,
+					 GncPluginPageInvoice *page)
+{
+	GtkWidget *menu;
+
+	if (event->button == 3 && page->priv->ui_merge != NULL) {
+		/* Maybe show a different popup menu if no account is selected. */
+		menu = gtk_ui_manager_get_widget (page->priv->ui_merge, "/RegisterPopup");
+		if (menu)
+		  gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
+				  event->button, event->time);
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
+/************************************************************/
+/*                     Command callbacks                    */
+/************************************************************/
+
+static void
+gnc_plugin_page_invoice_cmd_new_invoice (GtkAction *action,
+					 GncPluginPageInvoice *plugin_page)
+{
+  GncPluginPageInvoicePrivate *priv;
+
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  priv = plugin_page->priv;
+  gnc_invoice_window_new_invoice_cb(NULL, priv->iw);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_new_account (GtkAction *action,
+					 GncPluginPageInvoice *plugin_page)
+{
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  gnc_ui_new_account_window (NULL);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_print (GtkAction *action,
+				   GncPluginPageInvoice *plugin_page)
+{
+  GncPluginPageInvoicePrivate *priv;
+
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  priv = plugin_page->priv;
+  gnc_invoice_window_printCB(NULL, priv->iw);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_cut (GtkAction *action,
+				 GncPluginPageInvoice *plugin_page)
+{
+  GncPluginPageInvoicePrivate *priv;
+
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  priv = plugin_page->priv;
+  gnc_invoice_window_cut_cb(NULL, priv->iw);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_copy (GtkAction *action,
+				  GncPluginPageInvoice *plugin_page)
+{
+  GncPluginPageInvoicePrivate *priv;
+
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  priv = plugin_page->priv;
+  gnc_invoice_window_copy_cb(NULL, priv->iw);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_paste (GtkAction *action,
+				   GncPluginPageInvoice *plugin_page)
+{
+  GncPluginPageInvoicePrivate *priv;
+
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  priv = plugin_page->priv;
+  gnc_invoice_window_paste_cb(NULL, priv->iw);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_edit (GtkAction *action,
+				  GncPluginPageInvoice *plugin_page)
+{
+  GncPluginPageInvoicePrivate *priv;
+
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  priv = plugin_page->priv;
+  gnc_invoice_window_editCB(NULL, priv->iw);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_post (GtkAction *action,
+				  GncPluginPageInvoice *plugin_page)
+{
+  GncPluginPageInvoicePrivate *priv;
+
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  priv = plugin_page->priv;
+  gnc_invoice_window_postCB(NULL, priv->iw);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_unpost (GtkAction *action,
+				    GncPluginPageInvoice *plugin_page)
+{
+  GncPluginPageInvoicePrivate *priv;
+
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  priv = plugin_page->priv;
+  gnc_invoice_window_unpostCB(NULL, priv->iw);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_sort_changed (GtkAction *action,
+					  GtkRadioAction *current,
+					  GncPluginPageInvoice *plugin_page)
+{
+  GncPluginPageInvoicePrivate *priv;
+  invoice_sort_type_t value;
+
+  ENTER("(action %p, radio action %p, plugin_page %p)",
+	action, current, plugin_page);
+
+  g_return_if_fail(GTK_IS_ACTION(action));
+  g_return_if_fail(GTK_IS_RADIO_ACTION(current));
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  priv = plugin_page->priv;
+  value = gtk_radio_action_get_current_value(current);
+  gnc_invoice_window_sort (priv->iw, value);
+  LEAVE(" ");
+}
+
+
+static void
+gnc_plugin_page_invoice_cmd_enter (GtkAction *action,
+				   GncPluginPageInvoice *plugin_page)
+{
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  gnc_invoice_window_recordCB(NULL, plugin_page->priv->iw);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_cancel (GtkAction *action,
+				    GncPluginPageInvoice *plugin_page)
+{
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  gnc_invoice_window_cancelCB(NULL, plugin_page->priv->iw);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_delete (GtkAction *action,
+				    GncPluginPageInvoice *plugin_page)
+{
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  gnc_invoice_window_deleteCB(NULL, plugin_page->priv->iw);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_blank (GtkAction *action,
+				   GncPluginPageInvoice *plugin_page)
+{
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  gnc_invoice_window_blankCB(NULL, plugin_page->priv->iw);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_duplicate (GtkAction *action,
+				       GncPluginPageInvoice *plugin_page)
+{
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  gnc_invoice_window_duplicateCB(NULL, plugin_page->priv->iw);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_pay_invoice (GtkAction *action,
+					 GncPluginPageInvoice *plugin_page)
+{
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  gnc_invoice_window_payment_cb(NULL, plugin_page->priv->iw);
+  LEAVE(" ");
+}
+
+static void
+gnc_plugin_page_invoice_cmd_company_report (GtkAction *action,
+					    GncPluginPageInvoice *plugin_page)
+{
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  ENTER("(action %p, plugin_page %p)", action, plugin_page);
+  gnc_invoice_window_report_owner_cb(NULL, plugin_page->priv->iw);
+  LEAVE(" ");
+}
+
+/************************************************************/
+/*                    Auxiliary functions                   */
+/************************************************************/
+
+static void
+gnc_plugin_page_redraw_help_cb (GnucashRegister *g_reg,
+				GncPluginPageInvoice *invoice_page)
+{
+  GncPluginPageInvoicePrivate *priv;
+  GncWindow *window;
+  const char *status;
+  char *help;
+
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(invoice_page));
+
+  window = GNC_WINDOW(GNC_PLUGIN_PAGE(invoice_page)->window);
+
+  /* Get the text from the ledger */
+  priv = invoice_page->priv;
+  help = gnc_invoice_get_help(priv->iw);
+  status = help ? help : g_strdup("");
+  gnc_window_set_status(window, GNC_PLUGIN_PAGE(invoice_page), status);
+  g_free(help);
+}
+
+
+void
+gnc_plugin_page_invoice_update_title (GncPluginPage *plugin_page)
+{
+  GncPluginPageInvoice *page;
+  gchar *title;
+
+  g_return_if_fail(GNC_IS_PLUGIN_PAGE_INVOICE(plugin_page));
+
+  page = GNC_PLUGIN_PAGE_INVOICE(plugin_page);
+  title = gnc_invoice_get_title(page->priv->iw);
+  plugin_page = GNC_PLUGIN_PAGE(page);
+  gnc_plugin_page_set_tab_name(plugin_page, title);
+  gnc_plugin_page_set_title(plugin_page, title);
+  g_free(title);
+}
Index: gnc-plugin-business.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/Attic/gnc-plugin-business.h,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -Lsrc/business/business-gnome/gnc-plugin-business.h -Lsrc/business/business-gnome/gnc-plugin-business.h -u -r1.1.2.2 -r1.1.2.3
--- src/business/business-gnome/gnc-plugin-business.h
+++ src/business/business-gnome/gnc-plugin-business.h
@@ -61,4 +61,7 @@
 
 G_END_DECLS
 
+GncMainWindow *gnc_plugin_business_get_window (void);
+void gnc_invoice_remind_bills_due (void);
+
 #endif /* __GNC_PLUGIN_BUSINESS_H */
Index: gnc-plugin-business.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/Attic/gnc-plugin-business.c,v
retrieving revision 1.1.2.12
retrieving revision 1.1.2.13
diff -Lsrc/business/business-gnome/gnc-plugin-business.c -Lsrc/business/business-gnome/gnc-plugin-business.c -u -r1.1.2.12 -r1.1.2.13
--- src/business/business-gnome/gnc-plugin-business.c
+++ src/business/business-gnome/gnc-plugin-business.c
@@ -133,6 +133,14 @@
 #define PLUGIN_ACTIONS_NAME "gnc-plugin-business-actions"
 #define PLUGIN_UI_FILENAME  "gnc-plugin-business-ui.xml"
 
+/** This variable maintains a pointer to the last window where a
+ *  Business command was executed.  It is used to determine where new
+ *  invoices will be placed.  This is a HACK done instead of trudging
+ *  through several layers of dialog (search dialog, new invoice
+ *  dialog) forcing them to track the original parent window.
+ */
+static GncMainWindow *last_window = NULL;
+
 static GtkActionEntry gnc_plugin_actions [] = 
 {
 	/* Toplevel */
@@ -140,25 +148,25 @@
 
 	/* Customer submenu */
 	{ "CustomerMenuAction", NULL, N_("_Customer"), NULL, NULL, NULL },
-	{ "CustomerNewCustomerOpenAction", NULL, N_("New Customer"), NULL,
+	{ "CustomerNewCustomerOpenAction", NULL, N_("_New Customer"), NULL,
 	  N_("Open the New Customer dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_customer_new_customer) },
-	{ "CustomerFindCustomerOpenAction", NULL, N_("Find Customer"), NULL,
+	{ "CustomerFindCustomerOpenAction", NULL, N_("_Find Customer"), NULL,
 	  N_("Open the Find Customer dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_customer_find_customer) },
-	{ "CustomerNewInvoiceOpenAction", NULL, N_("New Invoice"), NULL,
+	{ "CustomerNewInvoiceOpenAction", NULL, N_("New _Invoice"), NULL,
 	  N_("Open the New Invoice dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_customer_new_invoice) },
-	{ "CustomerFindInvoiceOpenAction", NULL, N_("Find Invoice"), NULL,
+	{ "CustomerFindInvoiceOpenAction", NULL, N_("Find In_voice"), NULL,
 	  N_("Open the Find Invoice dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_customer_find_invoice) },
-	{ "CustomerNewJobOpenAction", NULL, N_("New Job"), NULL,
+	{ "CustomerNewJobOpenAction", NULL, N_("New _Job"), NULL,
 	  N_("Open the New Job dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_customer_new_job) },
-	{ "CustomerFindJobOpenAction", NULL, N_("Find Job"), NULL,
+	{ "CustomerFindJobOpenAction", NULL, N_("Find Jo_b"), NULL,
 	  N_("Open the Find Job dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_customer_find_job) },
-	{ "CustomerProcessPaymentAction", NULL, N_("Process Payment"), NULL,
+	{ "CustomerProcessPaymentAction", NULL, N_("_Process Payment"), NULL,
 	  N_("Open the Process Payment dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_customer_process_payment) },
 
@@ -170,16 +178,16 @@
 	{ "VendorFindVendorOpenAction", NULL, N_("_Find Vendor"), NULL,
 	  N_("Open the Find Vendor dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_vendor_find_vendor) },
-	{ "VendorNewBillOpenAction", NULL, N_("New Bill"), NULL,
+	{ "VendorNewBillOpenAction", NULL, N_("New _Bill"), NULL,
 	  N_("Open the New Bill dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_vendor_new_bill) },
-	{ "VendorFindBillOpenAction", NULL, N_("Find Bill"), NULL,
+	{ "VendorFindBillOpenAction", NULL, N_("Find Bi_ll"), NULL,
 	  N_("Open the Find Bill dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_vendor_find_bill) },
-	{ "VendorNewJobOpenAction", NULL, N_("New Job"), NULL,
+	{ "VendorNewJobOpenAction", NULL, N_("New _Job"), NULL,
 	  N_("Open the New Job dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_vendor_new_job) },
-	{ "VendorFindJobOpenAction", NULL, N_("Find Job"), NULL,
+	{ "VendorFindJobOpenAction", NULL, N_("Find Jo_b"), NULL,
 	  N_("Open the Find Job dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_vendor_find_job) },
 	{ "VendorProcessPaymentAction", NULL, N_("_Process Payment"), NULL,
@@ -194,10 +202,10 @@
 	{ "EmployeeFindEmployeeOpenAction", NULL, N_("_Find Employee"), NULL,
 	  N_("Open the Find Employee dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_employee_find_employee) },
-	{ "EmployeeNewExpenseVoucherOpenAction", NULL, N_("New Expense Voucher"), NULL,
+	{ "EmployeeNewExpenseVoucherOpenAction", NULL, N_("New _Expense Voucher"), NULL,
 	  N_("Open the New Expense Voucher dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_employee_new_expense_voucher) },
-	{ "EmployeeFindExpenseVoucherOpenAction", NULL, N_("Find Expense Voucher"), NULL,
+	{ "EmployeeFindExpenseVoucherOpenAction", NULL, N_("Find Expense _Voucher"), NULL,
 	  N_("Open the Find Expense Voucher dialog"),
 	  G_CALLBACK (gnc_plugin_business_cmd_employee_find_expense_voucher) },
 	{ "EmployeeProcessPaymentAction", NULL, N_("_Process Payment"), NULL,
@@ -205,11 +213,11 @@
 	  G_CALLBACK (gnc_plugin_business_cmd_employee_process_payment) },
 
 	/* Other menu items */
-	{ "TaxTablesOpenAction", NULL, N_("_Tax Tables"), NULL,
-	  N_("Open the Tax Tables dialog"),
+	{ "TaxTablesOpenAction", NULL, N_("_Tax Table Editor"), NULL,
+	  N_("View and edit the list of Tax Tables"),
 	  G_CALLBACK (gnc_plugin_business_cmd_tax_tables) },
-	{ "BillingTermsOpenAction", NULL, N_("_Billing Terms"), NULL,
-	  N_("Open the Billing Terms dialog"),
+	{ "BillingTermsOpenAction", NULL, N_("_Billing Terms Editor"), NULL,
+	  N_("View and edit the list of Billing Terms"),
 	  G_CALLBACK (gnc_plugin_business_cmd_billing_terms) },
 	{ "BillsDueReminderOpenAction", NULL, N_("Bills _Due Reminder"), NULL,
 	  N_("Open the Bills Due Reminder dialog"),
@@ -249,6 +257,10 @@
 static guint gnc_plugin_n_actions = G_N_ELEMENTS (gnc_plugin_actions);
 
 
+/************************************************************
+ *              Plugin Function Implementation              *
+ ************************************************************/
+
 struct GncPluginBusinessPrivate
 {
 	GncOwner *last_customer;
@@ -349,9 +361,33 @@
 }
 
 /************************************************************
- *              Plugin Function Implementation              *
+ *                     Helper Functions                     *
  ************************************************************/
 
+GncMainWindow*
+gnc_plugin_business_get_window()
+{
+  return last_window;
+}
+
+
+void
+gnc_invoice_remind_bills_due (void)
+{
+  GNCBook *book;
+  gint days;
+
+//if (!gnc_gconf_get_bool(GCONF_SECTION_BILL, "notify_when_due", NULL))
+  if (!gnc_lookup_boolean_option("Business", "Notify Bills Due?", FALSE))
+    return;
+
+  book = qof_session_get_book(qof_session_get_current_session());
+//days = gnc_gconf_get_int(GCONF_SECTION_BILL, "days_in_advance", NULL);
+  days = gnc_lookup_number_option("Business", "Bills Due Days", 7.0);
+
+  gnc_invoice_show_bills_due(book, days);
+}
+
 /************************************************************
  *                    Command Callbacks                     *
  ************************************************************/
@@ -394,6 +430,7 @@
 	g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
 
 	priv = GNC_PLUGIN_BUSINESS (mw->data)->priv;
+	last_window = mw->window;
 	gnc_ui_invoice_new (priv->last_customer, gnc_get_current_book());
 }
 
@@ -407,6 +444,7 @@
 	g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
 
 	priv = GNC_PLUGIN_BUSINESS (mw->data)->priv;
+	last_window = mw->window;
 	gnc_invoice_search (NULL, priv->last_customer, gnc_get_current_book());
 }
 
@@ -484,6 +522,7 @@
 	g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
 
 	priv = GNC_PLUGIN_BUSINESS (mw->data)->priv;
+	last_window = mw->window;
 	gnc_ui_invoice_new (priv->last_vendor, gnc_get_current_book());
 }
 
@@ -497,6 +536,7 @@
 	g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
 
 	priv = GNC_PLUGIN_BUSINESS (mw->data)->priv;
+	last_window = mw->window;
 	gnc_invoice_search (NULL, priv->last_vendor, gnc_get_current_book());
 }
 
@@ -574,6 +614,7 @@
 	g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
 
 	priv = GNC_PLUGIN_BUSINESS (mw->data)->priv;
+	last_window = mw->window;
 	gnc_ui_invoice_new (priv->last_employee, gnc_get_current_book());
 }
 
@@ -587,6 +628,7 @@
 	g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
 
 	priv = GNC_PLUGIN_BUSINESS (mw->data)->priv;
+	last_window = mw->window;
 	gnc_invoice_search (NULL, priv->last_employee, gnc_get_current_book());
 }
 
@@ -629,19 +671,15 @@
 	gnc_ui_billterms_window_new (gnc_get_current_book());
 }
 
+
 static void
 gnc_plugin_business_cmd_bills_due_reminder (GtkAction *action,
 					    GncMainWindowActionData *mw)
 {
-#if 0
-	GncPluginBusinessPrivate *priv;
-
 	g_return_if_fail (mw != NULL);
 	g_return_if_fail (GNC_IS_PLUGIN_BUSINESS (mw->data));
 
-	priv = GNC_PLUGIN_BUSINESS (mw->data)->priv;
-	gnc_remind_bills_due gnc_ui_payment_new (priv->last_employee, gnc_get_current_book());
-#endif
+	gnc_invoice_remind_bills_due();
 }
 
 /**************************************************************
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/Makefile.am,v
retrieving revision 1.31.4.10
retrieving revision 1.31.4.11
diff -Lsrc/business/business-gnome/Makefile.am -Lsrc/business/business-gnome/Makefile.am -u -r1.31.4.10 -r1.31.4.11
--- src/business/business-gnome/Makefile.am
+++ src/business/business-gnome/Makefile.am
@@ -44,6 +44,7 @@
   dialog-payment.c \
   dialog-vendor.c \
   gnc-plugin-business.c \
+  gnc-plugin-page-invoice.c \
   search-owner.c
 
 noinst_HEADERS = \
--- /dev/null
+++ src/business/business-gnome/gnc-plugin-page-invoice.h
@@ -0,0 +1,99 @@
+/* 
+ * gnc-plugin-page-invoice.h -- 
+ *
+ * Copyright (C) 2003 Jan Arne Petersen <jpetersen at uni-bonn.de>
+ * Copyright (C) 2003 David Hampton <hampton at employees.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, contact:
+ *
+ * Free Software Foundation           Voice:  +1-617-542-5942
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
+ * Boston, MA  02111-1307,  USA       gnu at gnu.org
+ */
+
+/** @addtogroup GUI
+    @{ */
+/** @addtogroup GuiUtility
+    @{ */
+/** @file gnc-plugin-register-tree.h 
+    @brief  utility functions for the GnuCash UI
+    @author Copyright (C) 2003 Jan Arne Petersen <jpetersen at uni-bonn.de>
+    @author Copyright (C) 2003 David Hampton <hampton at employees.org>
+*/
+
+#ifndef __GNC_PLUGIN_PAGE_INVOICE_H
+#define __GNC_PLUGIN_PAGE_INVOICE_H
+
+#include <gtk/gtkwindow.h>
+
+#include "Account.h"
+#include "gnc-ledger-display.h"
+#include "gnc-plugin-page.h"
+
+G_BEGIN_DECLS
+
+/* type macros */
+#define GNC_TYPE_PLUGIN_PAGE_INVOICE            (gnc_plugin_page_invoice_get_type ())
+#define GNC_PLUGIN_PAGE_INVOICE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_PLUGIN_PAGE_INVOICE, GncPluginPageInvoice))
+#define GNC_PLUGIN_PAGE_INVOICE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_PLUGIN_PAGE_INVOICE, GncPluginPageInvoiceClass))
+#define GNC_IS_PLUGIN_PAGE_INVOICE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_PLUGIN_PAGE_INVOICE))
+#define GNC_IS_PLUGIN_PAGE_INVOICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_PLUGIN_PAGE_INVOICE))
+#define GNC_PLUGIN_PAGE_INVOICE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_PLUGIN_PAGE_INVOICE, GncPluginPageInvoiceClass))
+
+#define GNC_PLUGIN_PAGE_INVOICE_NAME "gnc-plugin-page-invoice"
+
+/* typedefs & structures */
+typedef struct GncPluginPageInvoicePrivate GncPluginPageInvoicePrivate;
+
+typedef struct {
+	GncPluginPage parent;
+
+	GncPluginPageInvoicePrivate *priv;
+} GncPluginPageInvoice;
+
+typedef struct {
+	GncPluginPageClass parent;
+} GncPluginPageInvoiceClass;
+
+/* function prototypes */
+
+/** Retrieve the type number for an "account tree" plugin page.
+ *
+ *  @return The type number.
+ */
+GType gnc_plugin_page_invoice_get_type (void);
+
+
+/** Create a new "register" plugin page, given a pointer to an
+ *  account.
+ *
+ *  @param account The pointer to the account to embed in the
+ *  register.
+ *
+ *  @param subaccounts TRUE if all the sub-accounts of the specified
+ *  account should be included in the register.
+ *
+ *  @return The newly created plugin page.
+ */
+GncPluginPage *gnc_plugin_page_invoice_new (InvoiceWindow *iw);
+
+void gnc_plugin_page_invoice_update_menus (GncPluginPage *page, gboolean is_posted, gboolean can_unpost);
+void gnc_plugin_page_invoice_update_title (GncPluginPage *page);
+
+G_END_DECLS
+/** @} */
+/** @} */
+
+#endif /* __GNC_PLUGIN_PAGE_INVOICE_H */
+
Index: invoice.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/glade/invoice.glade,v
retrieving revision 1.16.4.7
retrieving revision 1.16.4.8
diff -Lsrc/business/business-gnome/glade/invoice.glade -Lsrc/business/business-gnome/glade/invoice.glade -u -r1.16.4.7 -r1.16.4.8
--- src/business/business-gnome/glade/invoice.glade
+++ src/business/business-gnome/glade/invoice.glade
@@ -2,8 +2,6 @@
 <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
 <glade-interface>
-<requires lib="gnome"/>
-<requires lib="bonobo"/>
 
 <widget class="GtkDialog" id="New Invoice Dialog">
   <property name="visible">True</property>
@@ -640,7 +638,7 @@
 		    <widget class="GtkTextView" id="notes_text">
 		      <property name="visible">True</property>
 		      <property name="can_focus">True</property>
-		      <property name="editable">False</property>
+		      <property name="editable">True</property>
 		      <property name="overwrite">False</property>
 		      <property name="accepts_tab">True</property>
 		      <property name="justification">GTK_JUSTIFY_LEFT</property>
@@ -694,7 +692,8 @@
   </child>
 </widget>
 
-<widget class="GnomeApp" id="Invoice Entry Window">
+<widget class="GtkWindow" id="Invoice Entry Window">
+  <property name="visible">True</property>
   <property name="title" translatable="yes">Invoice</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
@@ -706,1157 +705,420 @@
   <property name="skip_pager_hint">False</property>
   <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="enable_layout_config">False</property>
 
-  <child internal-child="dock">
-    <widget class="BonoboDock" id="dock1">
+  <child>
+    <widget class="GtkVBox" id="invoice_entry_vbox">
       <property name="visible">True</property>
-      <property name="allow_floating">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
 
       <child>
-	<widget class="BonoboDockItem" id="menu_dock">
-	  <property name="border_width">2</property>
+	<widget class="GtkHBox" id="hbox1">
 	  <property name="visible">True</property>
-	  <property name="shadow_type">GTK_SHADOW_OUT</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
 	  <child>
-	    <widget class="GtkMenuBar" id="menubar1">
+	    <widget class="GtkFrame" id="frame1">
 	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
 	      <child>
-		<widget class="GtkMenuItem" id="menu_file">
+		<widget class="GtkHBox" id="hbox1">
 		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_File</property>
-		  <property name="use_underline">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
 
 		  <child>
-		    <widget class="GtkMenu" id="menu_file_menu">
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="menu_new_invoice">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Create a new invoice</property>
-			  <property name="label" translatable="yes">_New Invoice</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_new_invoice_cb"/>
-
-			  <child internal-child="image">
-			    <widget class="GtkImage" id="image1">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-new</property>
-			      <property name="icon_size">1</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="menu_new_account">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Create a new Account</property>
-			  <property name="label" translatable="yes">New Account</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_new_account_cb"/>
-
-			  <child internal-child="image">
-			    <widget class="GtkImage" id="image2">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-new</property>
-			      <property name="icon_size">1</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="separator10">
-			  <property name="visible">True</property>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="menu_save">
-			  <property name="visible">True</property>
-			  <property name="stock_item">GNOMEUIINFO_MENU_SAVE_ITEM</property>
-			  <signal name="activate" handler="gnc_main_window_file_save_cb"/>
-			</widget>
-		      </child>
+		    <widget class="GtkVBox" id="vbox2">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
 
 		      <child>
-			<widget class="GtkImageMenuItem" id="menu_saveas">
+			<widget class="GtkLabel" id="label1">
 			  <property name="visible">True</property>
-			  <property name="stock_item">GNOMEUIINFO_MENU_SAVE_AS_ITEM</property>
-			  <signal name="activate" handler="gnc_main_window_file_save_as_cb"/>
+			  <property name="label" translatable="yes">Invoice ID</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkMenuItem" id="separator12">
+			<widget class="GtkLabel" id="label3">
 			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Date Opened</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkImageMenuItem" id="menu_print">
+			<widget class="GtkLabel" id="posted_label">
 			  <property name="visible">True</property>
-			  <property name="stock_item">GNOMEUIINFO_MENU_PRINT_ITEM</property>
-			  <signal name="activate" handler="gnc_invoice_window_printCB"/>
+			  <property name="label" translatable="yes">Date Posted</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkMenuItem" id="separator1">
+			<widget class="GtkLabel" id="acct_label">
 			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Posted Account</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkImageMenuItem" id="menu_close">
+			<widget class="GtkLabel" id="label8">
 			  <property name="visible">True</property>
-			  <property name="stock_item">GNOMEUIINFO_MENU_CLOSE_ITEM</property>
-			  <signal name="activate" handler="gnc_invoice_window_closeCB"/>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkImageMenuItem" id="menu_exit">
+			<widget class="GtkLabel" id="hide3">
 			  <property name="visible">True</property>
-			  <property name="stock_item">GNOMEUIINFO_MENU_EXIT_ITEM</property>
-			  <signal name="activate" handler="gnc_main_window_exit_cb"/>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
 		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkMenuItem" id="menu_edit">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_Edit</property>
-		  <property name="use_underline">True</property>
 
 		  <child>
-		    <widget class="GtkMenu" id="menu_edit_menu">
+		    <widget class="GtkVBox" id="vbox3">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
 
 		      <child>
-			<widget class="GtkImageMenuItem" id="menu_cut">
+			<widget class="GtkEntry" id="id_entry">
 			  <property name="visible">True</property>
-			  <property name="stock_item">GNOMEUIINFO_MENU_CUT_ITEM</property>
-			  <signal name="activate" handler="gnc_invoice_window_cut_cb"/>
+			  <property name="can_focus">True</property>
+			  <property name="editable">False</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkImageMenuItem" id="menu_copy">
+			<widget class="GtkHBox" id="date_opened_hbox">
 			  <property name="visible">True</property>
-			  <property name="stock_item">GNOMEUIINFO_MENU_COPY_ITEM</property>
-			  <signal name="activate" handler="gnc_invoice_window_copy_cb"/>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkImageMenuItem" id="menu_paste">
+			<widget class="GtkHBox" id="date_posted_hbox">
 			  <property name="visible">True</property>
-			  <property name="stock_item">GNOMEUIINFO_MENU_PASTE_ITEM</property>
-			  <signal name="activate" handler="gnc_invoice_window_paste_cb"/>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkMenuItem" id="separator13">
+			<widget class="GtkEntry" id="acct_entry">
 			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">False</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkMenuItem" id="menu_edit_invoice">
+			<widget class="GtkCheckButton" id="active_check">
 			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Edit this Invoice</property>
-			  <property name="label" translatable="yes">_Edit Invoice</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Active</property>
 			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_editCB"/>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <signal name="toggled" handler="gnc_invoice_window_active_toggled_cb"/>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkMenuItem" id="separator11">
+			<widget class="GtkLabel" id="hide4">
 			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
 		  </child>
 		</widget>
 	      </child>
 
 	      <child>
-		<widget class="GtkMenuItem" id="menu_view">
+		<widget class="GtkLabel" id="label25">
 		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_View</property>
-		  <property name="use_underline">True</property>
+		  <property name="label" translatable="yes">Invoice Information</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 
-		  <child>
-		    <widget class="GtkMenu" id="menu_view_menu">
+	  <child>
+	    <widget class="GtkFrame" id="frame3">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-		      <child>
-			<widget class="GtkCheckMenuItem" id="menu_toolbar">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Display the toolbar</property>
-			  <property name="label" translatable="yes">_Toolbar</property>
-			  <property name="use_underline">True</property>
-			  <property name="active">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_toolbar_cb"/>
-			</widget>
-		      </child>
+	      <child>
+		<widget class="GtkHBox" id="hbox2">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
 
-		      <child>
-			<widget class="GtkCheckMenuItem" id="menu_summary_bar">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Display the Summary Bar</property>
-			  <property name="label" translatable="yes">S_ummary Bar</property>
-			  <property name="use_underline">True</property>
-			  <property name="active">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_summarybar_cb"/>
-			</widget>
-		      </child>
+		  <child>
+		    <widget class="GtkVBox" id="vbox8">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
 
 		      <child>
-			<widget class="GtkCheckMenuItem" id="menu_status_bar">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Display the Status Bar</property>
-			  <property name="label" translatable="yes">_Status Bar</property>
-			  <property name="use_underline">True</property>
-			  <property name="active">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_statusbar_cb"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="separator4">
-			  <property name="visible">True</property>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="menu_sort_order">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Sort _Order</property>
-			  <property name="use_underline">True</property>
-
-			  <child>
-			    <widget class="GtkMenu" id="menu_sort_order_menu">
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="menu_sort_standard">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Keep normal invoice order</property>
-				  <property name="label" translatable="yes">_Standard</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">True</property>
-				  <signal name="activate" handler="gnc_invoice_window_sort_standard_cb"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkMenuItem" id="separator5">
-				  <property name="visible">True</property>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="menu_sort_date">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Sort by date</property>
-				  <property name="label" translatable="yes">_Date</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">True</property>
-				  <property name="group">menu_sort_standard</property>
-				  <signal name="activate" handler="gnc_invoice_window_sort_date_cb"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="menu_sort_date_of_entry">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Sort by the date of entry</property>
-				  <property name="label" translatable="yes">Date of _Entry</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">True</property>
-				  <property name="group">menu_sort_standard</property>
-				  <signal name="activate" handler="gnc_invoice_window_sort_date_entered_cb"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="menu_sort_quantity">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Sort by quantity</property>
-				  <property name="label" translatable="yes">_Quantity</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">True</property>
-				  <property name="group">menu_sort_standard</property>
-				  <signal name="activate" handler="gnc_invoice_window_sort_quantity_cb"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="menu_price_quantity">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Sort by price</property>
-				  <property name="label" translatable="yes">_Price</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">True</property>
-				  <property name="group">menu_sort_standard</property>
-				  <signal name="activate" handler="gnc_invoice_window_sort_price_cb"/>
-				</widget>
-			      </child>
-
-			      <child>
-				<widget class="GtkRadioMenuItem" id="menu_sort_description">
-				  <property name="visible">True</property>
-				  <property name="tooltip" translatable="yes">Sort by description</property>
-				  <property name="label" translatable="yes">_Description</property>
-				  <property name="use_underline">True</property>
-				  <property name="active">True</property>
-				  <property name="group">menu_sort_standard</property>
-				  <signal name="activate" handler="gnc_invoice_window_sort_description_cb"/>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkMenuItem" id="menu_actions">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_Actions</property>
-		  <property name="use_underline">True</property>
-
-		  <child>
-		    <widget class="GtkMenu" id="menu_actions_menu">
-
-		      <child>
-			<widget class="GtkMenuItem" id="menu_enter">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Record the current entry</property>
-			  <property name="label" translatable="yes">_Enter</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_recordCB"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="menu_cancel">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Cancel the current entry</property>
-			  <property name="label" translatable="yes">_Cancel</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_cancelCB"/>
-
-			  <child internal-child="image">
-			    <widget class="GtkImage" id="image3">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-cancel</property>
-			      <property name="icon_size">1</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkImageMenuItem" id="menu_delete">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Delete the current entry</property>
-			  <property name="label" translatable="yes">_Delete</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_deleteCB"/>
-
-			  <child internal-child="image">
-			    <widget class="GtkImage" id="image4">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-delete</property>
-			      <property name="icon_size">1</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="separator8">
-			  <property name="visible">True</property>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="menu_duplicate">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Make a copy of the current entry</property>
-			  <property name="label" translatable="yes">Dup_licate</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_duplicateCB"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="menu_blank">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Move to the blank entry at the bottom of the Invoice</property>
-			  <property name="label" translatable="yes">_Blank</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_blankCB"/>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkMenuItem" id="menu_reports">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_Reports</property>
-		  <property name="use_underline">True</property>
-
-		  <child>
-		    <widget class="GtkMenu" id="menu_reports_menu">
-
-		      <child>
-			<widget class="GtkMenuItem" id="menu_report_owner">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Open a company report window for the owner of this Invoice</property>
-			  <property name="label" translatable="yes">_Company Report</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_report_owner_cb"/>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkMenuItem" id="menu_tools">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_Tools</property>
-		  <property name="use_underline">True</property>
-
-		  <child>
-		    <widget class="GtkMenu" id="menu_tools_menu">
-
-		      <child>
-			<widget class="GtkMenuItem" id="menu_general_ledger">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Open a general ledger window</property>
-			  <property name="label" translatable="yes">_General Ledger</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_main_window_gl_cb"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="menu_price_editor">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">View and edit the prices for stocks and mutual funds</property>
-			  <property name="label" translatable="yes">_Price Editor</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_main_window_prices_cb"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="menu_commodity_editor">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">View and edit the commodities for stocks and mutual funds</property>
-			  <property name="label" translatable="yes">_Commodity Editor</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_main_window_commodities_cb"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="menu_fincalc">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Use the financial calculator</property>
-			  <property name="label" translatable="yes">_Financial Calculator</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_main_window_fincalc_cb"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="menu_taxtable">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">View and edit the list of Tax Tables</property>
-			  <property name="label" translatable="yes">_Tax Table Editor</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_taxtable_cb"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="menu_billterm">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">View and edit the list of Billing Terms</property>
-			  <property name="label" translatable="yes">_Billing Terms Editor</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_billterm_cb"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="menu_payment">
-			  <property name="visible">True</property>
-			  <property name="tooltip" translatable="yes">Enter a payment for the owner of this Invoice</property>
-			  <property name="label" translatable="yes">Process Pa_yment</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_invoice_window_payment_cb"/>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkMenuItem" id="menu_help">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_Help</property>
-		  <property name="use_underline">True</property>
-
-		  <child>
-		    <widget class="GtkMenu" id="menu_help_menu">
-
-		      <child>
-			<widget class="GtkMenuItem" id="menu_manual">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">_Gnucash Users Manual</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_main_window_help_cb"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="menu_totd">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">_Tip Of The Day</property>
-			  <property name="use_underline">True</property>
-			  <signal name="activate" handler="gnc_main_window_totd_cb"/>
-			</widget>
-		      </child>
-
-		      <child>
-			<widget class="GtkMenuItem" id="separator9">
+			<widget class="GtkLabel" id="owner_label">
 			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">(owner)</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkImageMenuItem" id="menu_about">
+			<widget class="GtkLabel" id="job_label">
 			  <property name="visible">True</property>
-			  <property name="stock_item">GNOMEUIINFO_MENU_ABOUT_ITEM</property>
-			  <signal name="activate" handler="gnc_main_window_about_cb"/>
+			  <property name="label" translatable="yes">Job</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="placement">BONOBO_DOCK_TOP</property>
-	  <property name="band">0</property>
-	  <property name="position">0</property>
-	  <property name="offset">0</property>
-	  <property name="behavior">BONOBO_DOCK_ITEM_BEH_EXCLUSIVE|BONOBO_DOCK_ITEM_BEH_NEVER_VERTICAL</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="BonoboDockItem" id="toolbar_dock">
-	  <property name="border_width">2</property>
-	  <property name="visible">True</property>
-	  <property name="shadow_type">GTK_SHADOW_OUT</property>
-
-	  <child>
-	    <widget class="GtkToolbar" id="toolbar">
-	      <property name="border_width">2</property>
-	      <property name="visible">True</property>
-	      <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
-	      <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
-	      <property name="tooltips">True</property>
-	      <property name="show_arrow">True</property>
-
-	      <child>
-		<widget class="GtkToolButton" id="close_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Close this invoice window</property>
-		  <property name="label" translatable="yes">Close</property>
-		  <property name="use_underline">True</property>
-		  <property name="stock_id">gtk-close</property>
-		  <property name="visible_horizontal">True</property>
-		  <property name="visible_vertical">True</property>
-		  <property name="is_important">False</property>
-		  <signal name="clicked" handler="gnc_invoice_window_closeCB"/>
-		</widget>
-		<packing>
-		  <property name="expand">False</property>
-		  <property name="homogeneous">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToolButton" id="edit_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Edit this Invoice</property>
-		  <property name="label" translatable="yes">Edit</property>
-		  <property name="use_underline">True</property>
-		  <property name="stock_id">gtk-preferences</property>
-		  <property name="visible_horizontal">True</property>
-		  <property name="visible_vertical">True</property>
-		  <property name="is_important">False</property>
-		  <signal name="clicked" handler="gnc_invoice_window_editCB"/>
-		</widget>
-		<packing>
-		  <property name="expand">False</property>
-		  <property name="homogeneous">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToolItem" id="toolitem1">
-		  <property name="visible">True</property>
-		  <property name="visible_horizontal">True</property>
-		  <property name="visible_vertical">True</property>
-		  <property name="is_important">False</property>
-
-		  <child>
-		    <widget class="GtkVSeparator" id="vseparator1">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="expand">False</property>
-		  <property name="homogeneous">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToolButton" id="enter_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Record the current entry</property>
-		  <property name="label" translatable="yes">Enter</property>
-		  <property name="use_underline">True</property>
-		  <property name="stock_id">gtk-add</property>
-		  <property name="visible_horizontal">True</property>
-		  <property name="visible_vertical">True</property>
-		  <property name="is_important">False</property>
-		  <signal name="clicked" handler="gnc_invoice_window_recordCB"/>
-		</widget>
-		<packing>
-		  <property name="expand">False</property>
-		  <property name="homogeneous">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToolButton" id="cancel_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Cancel the current entry</property>
-		  <property name="label" translatable="yes">Cancel</property>
-		  <property name="use_underline">True</property>
-		  <property name="stock_id">gtk-undelete</property>
-		  <property name="visible_horizontal">True</property>
-		  <property name="visible_vertical">True</property>
-		  <property name="is_important">False</property>
-		  <signal name="clicked" handler="gnc_invoice_window_cancelCB"/>
-		</widget>
-		<packing>
-		  <property name="expand">False</property>
-		  <property name="homogeneous">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToolButton" id="delete_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Delete the current entry</property>
-		  <property name="label" translatable="yes">Delete</property>
-		  <property name="use_underline">True</property>
-		  <property name="stock_id">gnome-stock-trash</property>
-		  <property name="visible_horizontal">True</property>
-		  <property name="visible_vertical">True</property>
-		  <property name="is_important">False</property>
-		  <signal name="clicked" handler="gnc_invoice_window_deleteCB"/>
-		</widget>
-		<packing>
-		  <property name="expand">False</property>
-		  <property name="homogeneous">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToolItem" id="toolitem2">
-		  <property name="visible">True</property>
-		  <property name="visible_horizontal">True</property>
-		  <property name="visible_vertical">True</property>
-		  <property name="is_important">False</property>
-
-		  <child>
-		    <widget class="GtkVSeparator" id="vseparator2">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="expand">False</property>
-		  <property name="homogeneous">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToolButton" id="duplicate_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Make a copy of the current entry</property>
-		  <property name="label" translatable="yes">Duplicate</property>
-		  <property name="use_underline">True</property>
-		  <property name="stock_id">gtk-copy</property>
-		  <property name="visible_horizontal">True</property>
-		  <property name="visible_vertical">True</property>
-		  <property name="is_important">False</property>
-		  <signal name="clicked" handler="gnc_invoice_window_duplicateCB"/>
-		</widget>
-		<packing>
-		  <property name="expand">False</property>
-		  <property name="homogeneous">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToolButton" id="blank_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Move to the blank entry at the bottom of the Invoice</property>
-		  <property name="label" translatable="yes">Blank</property>
-		  <property name="use_underline">True</property>
-		  <property name="stock_id">gtk-new</property>
-		  <property name="visible_horizontal">True</property>
-		  <property name="visible_vertical">True</property>
-		  <property name="is_important">False</property>
-		  <signal name="clicked" handler="gnc_invoice_window_blankCB"/>
-		</widget>
-		<packing>
-		  <property name="expand">False</property>
-		  <property name="homogeneous">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToolItem" id="toolitem3">
-		  <property name="visible">True</property>
-		  <property name="visible_horizontal">True</property>
-		  <property name="visible_vertical">True</property>
-		  <property name="is_important">False</property>
-
-		  <child>
-		    <widget class="GtkVSeparator" id="vseparator3">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="expand">False</property>
-		  <property name="homogeneous">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToolButton" id="print_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Make a printable Invoice</property>
-		  <property name="label" translatable="yes">Print</property>
-		  <property name="use_underline">True</property>
-		  <property name="stock_id">gtk-print</property>
-		  <property name="visible_horizontal">True</property>
-		  <property name="visible_vertical">True</property>
-		  <property name="is_important">False</property>
-		  <signal name="clicked" handler="gnc_invoice_window_printCB"/>
-		</widget>
-		<packing>
-		  <property name="expand">False</property>
-		  <property name="homogeneous">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToolButton" id="post_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Post this Invoice to your Chart of Accounts</property>
-		  <property name="label" translatable="yes">Post</property>
-		  <property name="use_underline">True</property>
-		  <property name="stock_id">gtk-jump-to</property>
-		  <property name="visible_horizontal">True</property>
-		  <property name="visible_vertical">True</property>
-		  <property name="is_important">False</property>
-		  <signal name="clicked" handler="gnc_invoice_window_postCB"/>
-		</widget>
-		<packing>
-		  <property name="expand">False</property>
-		  <property name="homogeneous">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkToolButton" id="unpost_button">
-		  <property name="visible">True</property>
-		  <property name="tooltip" translatable="yes">Unpost this Invoice and make it editable</property>
-		  <property name="label" translatable="yes">Unpost</property>
-		  <property name="use_underline">True</property>
-		  <property name="stock_id">gtk-convert</property>
-		  <property name="visible_horizontal">True</property>
-		  <property name="visible_vertical">True</property>
-		  <property name="is_important">False</property>
-		  <signal name="clicked" handler="gnc_invoice_window_unpostCB"/>
-		</widget>
-		<packing>
-		  <property name="expand">False</property>
-		  <property name="homogeneous">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="placement">BONOBO_DOCK_TOP</property>
-	  <property name="band">1</property>
-	  <property name="position">0</property>
-	  <property name="offset">0</property>
-	  <property name="behavior">BONOBO_DOCK_ITEM_BEH_EXCLUSIVE</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="BonoboDockItem" id="summarybar_dock">
-	  <property name="visible">True</property>
-	  <property name="shadow_type">GTK_SHADOW_OUT</property>
-
-	  <child>
-	    <placeholder/>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="placement">BONOBO_DOCK_BOTTOM</property>
-	  <property name="band">0</property>
-	  <property name="position">0</property>
-	  <property name="offset">0</property>
-	  <property name="behavior">BONOBO_DOCK_ITEM_BEH_NORMAL</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkVBox" id="vbox1">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkHBox" id="hbox1">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkFrame" id="frame1">
-		  <property name="visible">True</property>
-		  <property name="label_xalign">0</property>
-		  <property name="label_yalign">0.5</property>
-		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox1">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
 
 		      <child>
-			<widget class="GtkVBox" id="vbox2">
+			<widget class="GtkLabel" id="label19">
 			  <property name="visible">True</property>
-			  <property name="homogeneous">True</property>
-			  <property name="spacing">0</property>
-
-			  <child>
-			    <widget class="GtkLabel" id="label1">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Invoice ID</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">1</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="label3">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Date Opened</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">1</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="posted_label">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Date Posted</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">1</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="acct_label">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Posted Account</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">1</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="label8">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes"></property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_CENTER</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="hide3">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes"></property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_CENTER</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
+			  <property name="label" translatable="yes">Billing ID</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
 			  <property name="expand">False</property>
-			  <property name="fill">True</property>
+			  <property name="fill">False</property>
 			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkVBox" id="vbox3">
+			<widget class="GtkLabel" id="label13">
 			  <property name="visible">True</property>
-			  <property name="homogeneous">True</property>
-			  <property name="spacing">0</property>
-
-			  <child>
-			    <widget class="GtkEntry" id="id_entry">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="editable">False</property>
-			      <property name="visibility">True</property>
-			      <property name="max_length">0</property>
-			      <property name="text" translatable="yes"></property>
-			      <property name="has_frame">True</property>
-			      <property name="invisible_char" translatable="yes">*</property>
-			      <property name="activates_default">False</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkHBox" id="date_opened_hbox">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">0</property>
-
-			      <child>
-				<placeholder/>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkHBox" id="date_posted_hbox">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">0</property>
-
-			      <child>
-				<placeholder/>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkEntry" id="acct_entry">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="editable">False</property>
-			      <property name="visibility">True</property>
-			      <property name="max_length">0</property>
-			      <property name="text" translatable="yes"></property>
-			      <property name="has_frame">True</property>
-			      <property name="invisible_char" translatable="yes">*</property>
-			      <property name="activates_default">False</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkCheckButton" id="active_check">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">Active</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-			      <property name="active">False</property>
-			      <property name="inconsistent">False</property>
-			      <property name="draw_indicator">True</property>
-			      <signal name="toggled" handler="gnc_invoice_window_active_toggled_cb"/>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="hide4">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes"></property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_CENTER</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
+			  <property name="label" translatable="yes">Terms</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
@@ -1864,461 +1126,141 @@
 			  <property name="fill">False</property>
 			</packing>
 		      </child>
-		    </widget>
-		  </child>
 
-		  <child>
-		    <widget class="GtkLabel" id="label25">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Invoice Information</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
+		      <child>
+			<widget class="GtkLabel" id="hide1">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
 		    </widget>
 		    <packing>
-		      <property name="type">label_item</property>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
 		    </packing>
 		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkFrame" id="frame3">
-		  <property name="visible">True</property>
-		  <property name="label_xalign">0</property>
-		  <property name="label_yalign">0.5</property>
-		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
 		  <child>
-		    <widget class="GtkHBox" id="hbox2">
+		    <widget class="GtkVBox" id="vbox9">
 		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
+		      <property name="homogeneous">True</property>
 		      <property name="spacing">0</property>
 
 		      <child>
-			<widget class="GtkVBox" id="vbox8">
+			<widget class="GtkHBox" id="owner_hbox">
 			  <property name="visible">True</property>
-			  <property name="homogeneous">True</property>
+			  <property name="homogeneous">False</property>
 			  <property name="spacing">0</property>
 
 			  <child>
-			    <widget class="GtkLabel" id="owner_label">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">(owner)</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">1</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="job_label">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Job</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">1</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="label19">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Billing ID</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">1</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="label13">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Terms</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">1</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="hide1">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes"></property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_CENTER</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
+			    <placeholder/>
 			  </child>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
 			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkVBox" id="vbox9">
+			<widget class="GtkHBox" id="job_hbox">
 			  <property name="visible">True</property>
-			  <property name="homogeneous">True</property>
+			  <property name="homogeneous">False</property>
 			  <property name="spacing">0</property>
 
 			  <child>
-			    <widget class="GtkHBox" id="owner_hbox">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">0</property>
-
-			      <child>
-				<placeholder/>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkHBox" id="job_hbox">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">0</property>
-
-			      <child>
-				<placeholder/>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkEntry" id="billing_id_entry">
-			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="editable">False</property>
-			      <property name="visibility">True</property>
-			      <property name="max_length">0</property>
-			      <property name="text" translatable="yes"></property>
-			      <property name="has_frame">True</property>
-			      <property name="invisible_char" translatable="yes">*</property>
-			      <property name="activates_default">False</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkOptionMenu" id="terms_menu">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="can_focus">True</property>
-			      <property name="history">0</property>
-
-			      <child internal-child="menu">
-				<widget class="GtkMenu" id="convertwidget7">
-				  <property name="visible">True</property>
-
-				  <child>
-				    <widget class="GtkMenuItem" id="convertwidget8">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">(terms)</property>
-				      <property name="use_underline">True</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="hide2">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes"></property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_CENTER</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
+			    <placeholder/>
 			  </child>
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
 			</packing>
 		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label26">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Billing Information</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="type">label_item</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkFrame" id="frame2">
-		  <property name="visible">True</property>
-		  <property name="label_xalign">0</property>
-		  <property name="label_yalign">0.5</property>
-		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-		  <child>
-		    <widget class="GtkScrolledWindow" id="scrolledwindow1">
-		      <property name="visible">True</property>
-		      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-		      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-		      <property name="shadow_type">GTK_SHADOW_IN</property>
-		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
 
 		      <child>
-			<widget class="GtkTextView" id="notes_text">
+			<widget class="GtkEntry" id="billing_id_entry">
 			  <property name="visible">True</property>
 			  <property name="can_focus">True</property>
-			  <property name="editable">True</property>
-			  <property name="overwrite">False</property>
-			  <property name="accepts_tab">True</property>
-			  <property name="justification">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap_mode">GTK_WRAP_WORD</property>
-			  <property name="cursor_visible">True</property>
-			  <property name="pixels_above_lines">0</property>
-			  <property name="pixels_below_lines">0</property>
-			  <property name="pixels_inside_wrap">0</property>
-			  <property name="left_margin">0</property>
-			  <property name="right_margin">0</property>
-			  <property name="indent">0</property>
+			  <property name="editable">False</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
 			  <property name="text" translatable="yes"></property>
-			  <signal name="focus-out-event" handler="gnc_invoice_window_leave_notes_cb"/>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
 			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label27">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Notes</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="type">label_item</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">3</property>
-	      <property name="expand">False</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkFrame" id="proj_frame">
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox8">
-		  <property name="border_width">3</property>
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label24">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Customer: </property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkHBox" id="proj_cust_hbox">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
 
 		      <child>
-			<placeholder/>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label25">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Job: </property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
+			<widget class="GtkOptionMenu" id="terms_menu">
+			  <property name="visible">True</property>
+			  <property name="sensitive">False</property>
+			  <property name="can_focus">True</property>
+			  <property name="history">0</property>
 
-		  <child>
-		    <widget class="GtkHBox" id="proj_job_hbox">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
+			  <child internal-child="menu">
+			    <widget class="GtkMenu" id="convertwidget7">
+			      <property name="visible">True</property>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget8">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">(terms)</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
 
 		      <child>
-			<placeholder/>
+			<widget class="GtkLabel" id="hide2">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 		    </widget>
 		    <packing>
@@ -2331,9 +1273,9 @@
 	      </child>
 
 	      <child>
-		<widget class="GtkLabel" id="label28">
+		<widget class="GtkLabel" id="label26">
 		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Default Chargeback Project</property>
+		  <property name="label" translatable="yes">Billing Information</property>
 		  <property name="use_underline">False</property>
 		  <property name="use_markup">False</property>
 		  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -2350,69 +1292,54 @@
 	      </child>
 	    </widget>
 	    <packing>
-	      <property name="padding">3</property>
-	      <property name="expand">True</property>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
 	      <property name="fill">True</property>
 	    </packing>
 	  </child>
 
 	  <child>
-	    <widget class="GtkFrame" id="to_charge_frame">
+	    <widget class="GtkFrame" id="frame2">
 	      <property name="visible">True</property>
 	      <property name="label_xalign">0</property>
 	      <property name="label_yalign">0.5</property>
 	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
 	      <child>
-		<widget class="GtkHBox" id="hbox9">
+		<widget class="GtkScrolledWindow" id="scrolledwindow1">
 		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label31">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Additional to Card:</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
+		  <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
 
 		  <child>
-		    <widget class="GtkHBox" id="to_charge_box">
+		    <widget class="GtkTextView" id="notes_text">
 		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<placeholder/>
-		      </child>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="overwrite">False</property>
+		      <property name="accepts_tab">True</property>
+		      <property name="justification">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap_mode">GTK_WRAP_WORD</property>
+		      <property name="cursor_visible">True</property>
+		      <property name="pixels_above_lines">0</property>
+		      <property name="pixels_below_lines">0</property>
+		      <property name="pixels_inside_wrap">0</property>
+		      <property name="left_margin">0</property>
+		      <property name="right_margin">0</property>
+		      <property name="indent">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <signal name="focus-out-event" handler="gnc_invoice_window_leave_notes_cb"/>
 		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
 		  </child>
 		</widget>
 	      </child>
 
 	      <child>
-		<widget class="GtkLabel" id="label30">
+		<widget class="GtkLabel" id="label27">
 		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Extra Payments</property>
+		  <property name="label" translatable="yes">Notes</property>
 		  <property name="use_underline">False</property>
 		  <property name="use_markup">False</property>
 		  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -2434,123 +1361,247 @@
 	      <property name="fill">True</property>
 	    </packing>
 	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">3</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="proj_frame">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
 	  <child>
-	    <widget class="GtkFrame" id="ledger_frame">
+	    <widget class="GtkHBox" id="hbox8">
+	      <property name="border_width">3</property>
 	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label24">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Customer: </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 
 	      <child>
-		<placeholder/>
+		<widget class="GtkHBox" id="proj_cust_hbox">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
 	      </child>
 
 	      <child>
-		<widget class="GtkLabel" id="label29">
+		<widget class="GtkLabel" id="label25">
 		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Invoice Entries</property>
+		  <property name="label" translatable="yes">Job: </property>
 		  <property name="use_underline">False</property>
 		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="justify">GTK_JUSTIFY_RIGHT</property>
 		  <property name="wrap">False</property>
 		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
+		  <property name="xalign">1</property>
 		  <property name="yalign">0.5</property>
 		  <property name="xpad">0</property>
 		  <property name="ypad">0</property>
 		</widget>
 		<packing>
-		  <property name="type">label_item</property>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="proj_job_hbox">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
 		</packing>
 	      </child>
 	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label28">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Default Chargeback Project</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
 	    <packing>
-	      <property name="padding">3</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
+	      <property name="type">label_item</property>
 	    </packing>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">3</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
       </child>
-    </widget>
-    <packing>
-      <property name="padding">0</property>
-      <property name="expand">True</property>
-      <property name="fill">True</property>
-    </packing>
-  </child>
 
-  <child internal-child="appbar">
-    <widget class="GnomeAppBar" id="status_bar">
-      <property name="visible">True</property>
-      <property name="has_progress">False</property>
-      <property name="has_status">True</property>
-    </widget>
-    <packing>
-      <property name="padding">0</property>
-      <property name="expand">True</property>
-      <property name="fill">True</property>
-    </packing>
-  </child>
-</widget>
+      <child>
+	<widget class="GtkFrame" id="to_charge_frame">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-<widget class="GtkMenu" id="Invoice Window Popup Menu">
-  <property name="visible">True</property>
+	  <child>
+	    <widget class="GtkHBox" id="hbox9">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-  <child>
-    <widget class="GtkMenuItem" id="enter_item">
-      <property name="visible">True</property>
-      <property name="tooltip" translatable="yes">Record the current entry</property>
-      <property name="label" translatable="yes">Enter</property>
-      <property name="use_underline">True</property>
-      <signal name="activate" handler="gnc_invoice_window_recordCB"/>
-    </widget>
-  </child>
+	      <child>
+		<widget class="GtkLabel" id="label31">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Additional to Card:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 
-  <child>
-    <widget class="GtkMenuItem" id="cancel_item">
-      <property name="visible">True</property>
-      <property name="tooltip" translatable="yes">Cancel the current entry</property>
-      <property name="label" translatable="yes">Cancel</property>
-      <property name="use_underline">True</property>
-      <signal name="activate" handler="gnc_invoice_window_cancelCB"/>
-    </widget>
-  </child>
+	      <child>
+		<widget class="GtkHBox" id="to_charge_box">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
 
-  <child>
-    <widget class="GtkMenuItem" id="delete_item">
-      <property name="visible">True</property>
-      <property name="tooltip" translatable="yes">Delete the current entry</property>
-      <property name="label" translatable="yes">Delete</property>
-      <property name="use_underline">True</property>
-      <signal name="activate" handler="gnc_invoice_window_deleteCB"/>
-    </widget>
-  </child>
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	  </child>
 
-  <child>
-    <widget class="GtkMenuItem" id="separator1">
-      <property name="visible">True</property>
-    </widget>
-  </child>
+	  <child>
+	    <widget class="GtkLabel" id="label30">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Extra Payments</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
 
-  <child>
-    <widget class="GtkMenuItem" id="duplicate_item">
-      <property name="visible">True</property>
-      <property name="tooltip" translatable="yes">Make a copy of the current entry</property>
-      <property name="label" translatable="yes">Duplicate</property>
-      <property name="use_underline">True</property>
-      <signal name="activate" handler="gnc_invoice_window_duplicateCB"/>
-    </widget>
-  </child>
+      <child>
+	<widget class="GtkFrame" id="ledger_frame">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-  <child>
-    <widget class="GtkMenuItem" id="blank_item">
-      <property name="visible">True</property>
-      <property name="tooltip" translatable="yes">Move to the blank entry at the bottom of the Invoice</property>
-      <property name="label" translatable="yes">Blank</property>
-      <property name="use_underline">True</property>
-      <signal name="activate" handler="gnc_invoice_window_blankCB"/>
+	  <child>
+	    <placeholder/>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label29">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Invoice Entries</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">3</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
   </child>
 </widget>
Index: gnc-plugin-business-ui.xml
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/ui/Attic/gnc-plugin-business-ui.xml,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -Lsrc/business/business-gnome/ui/gnc-plugin-business-ui.xml -Lsrc/business/business-gnome/ui/gnc-plugin-business-ui.xml -u -r1.1.2.4 -r1.1.2.5
--- src/business/business-gnome/ui/gnc-plugin-business-ui.xml
+++ src/business/business-gnome/ui/gnc-plugin-business-ui.xml
@@ -1,7 +1,7 @@
 <ui>
   <menubar>
     <placeholder name="AdditionalMenusPlaceholder">
-      <menu action="BusinessAction">
+      <menu name="Business" action="BusinessAction">
 	<menu name="CustomerMenu" action="CustomerMenuAction">
 	  <menuitem name="CustomerNewCustomerOpen"  action="CustomerNewCustomerOpenAction"/>
 	  <menuitem name="CustomerFindCustomerOpen" action="CustomerFindCustomerOpenAction"/>
@@ -30,16 +30,24 @@
 	  <menuitem name="EmployeeProcessPayment"   action="EmployeeProcessPaymentAction"/>
 	</menu>
 
+        <placeholder name="BusinessPlaceholderTop"/>
+        <separator name="Sep1"/>
+
 	<menuitem name="TaxTablesOpen" action="TaxTablesOpenAction"/>
 	<menuitem name="BillingTermsOpen" action="BillingTermsOpenAction"/>
 	<menuitem name="BillsDueReminderOpen" action="BillsDueReminderOpenAction"/>
 
+        <placeholder name="BusinessPlaceholderMiddle"/>
+        <separator name="Sep2"/>
+
 	<menu name="ExportMenu" action="ExportMenuAction">
 	  <menuitem name="QSFInvoice" action="QSFInvoiceAction"/>
 	  <menuitem name="QSFCustomer" action="QSFCustomerAction"/>
 	  <menuitem name="QSFVendor" action="QSFVendorAction"/>
 	  <menuitem name="QSFEmployee" action="QSFEmployeeAction"/>
 	</menu>
+        <placeholder name="BusinessPlaceholderBottom"/>
+
       </menu>
     </placeholder>
 
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/ui/Attic/Makefile.am,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -Lsrc/business/business-gnome/ui/Makefile.am -Lsrc/business/business-gnome/ui/Makefile.am -u -r1.1.2.1 -r1.1.2.2
--- src/business/business-gnome/ui/Makefile.am
+++ src/business/business-gnome/ui/Makefile.am
@@ -1,5 +1,6 @@
 uidir = $(GNC_UI_DIR)
 ui_DATA = \
-	gnc-plugin-business-ui.xml
+	gnc-plugin-business-ui.xml \
+	gnc-plugin-page-invoice-ui.xml
 
 EXTRA_DIST = $(ui_DATA)
--- /dev/null
+++ src/business/business-gnome/ui/gnc-plugin-page-invoice-ui.xml
@@ -0,0 +1,83 @@
+<ui>
+  <menubar>
+    <menu name="File" action="FileAction">
+      <menu name="FileNewMenu" action="FileNewMenuAction">
+        <placeholder name="FileNewTopPlaceholder">
+          <menuitem name="FileNewInvoice"         action="FileNewInvoiceAction"/>
+          <menuitem name="FileNewAccount"         action="FileNewAccountAction"/>
+        </placeholder>
+      </menu>
+    </menu>
+
+    <menu name="Edit" action="EditAction">
+      <placeholder name="EditSelectedPlaceholder">
+        <menuitem name="EditEditInvoice"        action="EditEditInvoiceAction"/>
+        <menuitem name="EditPostInvoice"        action="EditPostInvoiceAction"/>
+        <menuitem name="EditUnpostInvoice"      action="EditUnpostInvoiceAction"/>
+      </placeholder>
+    </menu>
+
+    <menu name="View" action="ViewAction">
+      <placeholder name="ViewPlaceholder">
+        <menu name="SortOrder"                  action="SortOrderAction">
+          <menuitem name="SortStandard"         action="SortStandardAction"/>
+          <separator name="ViewSep43"/>
+          <menuitem name="SortDate"             action="SortDateAction"/>
+          <menuitem name="SortDateEntry"        action="SortDateEntryAction"/>
+          <menuitem name="SortQuantity"         action="SortQuantityAction"/>
+          <menuitem name="SortPrice"            action="SortPriceAction"/>
+          <menuitem name="SortDescription"      action="SortDescriptionAction"/>
+        </menu>
+      </placeholder>
+    </menu>
+
+    <menu name="Actions" action="ActionsAction">
+      <placeholder name="ActionsPlaceholder">
+        <menuitem name="RecordEntry"       	action="RecordEntryAction"/>
+        <menuitem name="CancelEntry"       	action="CancelEntryAction"/>
+        <menuitem name="DeleteEntry"       	action="DeleteEntryAction"/>
+        <menuitem name="BlankEntry"        	action="BlankEntryAction"/>
+        <separator name="ActionsSep4"/>
+        <menuitem name="DuplicateEntry"    	action="DuplicateEntryAction"/>
+      </placeholder>
+    </menu>
+
+    <placeholder name="AdditionalMenusPlaceholder">
+      <menu name="Business" action="BusinessAction">
+        <placeholder name="BusinessPlaceholderMiddle">
+          <menuitem name="ToolsProcessPayment"     action="ToolsProcessPaymentAction"/>
+        </placeholder>
+      </menu>
+    </placeholder>
+
+    <menu name="Reports" action="ReportsAction">
+      <placeholder name="ReportsPlaceholder">
+        <menuitem name="ReportsCompanyReport"   action="ReportsCompanyReportAction"/>
+      </placeholder>
+    </menu>
+  </menubar>
+
+  <toolbar name="DefaultToolbar">
+    <placeholder name="DefaultToolbarPlaceholder">
+      <toolitem name="ToolbarEditInvoice"       action="EditEditInvoiceAction"/>
+      <toolitem name="ToolbarRecordEntry"    	action="RecordEntryAction"/>
+      <toolitem name="ToolbarCancelEntry"    	action="CancelEntryAction"/>
+      <toolitem name="ToolbarDeleteEntry"    	action="DeleteEntryAction"/>
+      <separator name="ToolbarSep66"/>
+      <toolitem name="ToolbarDuplicateEntry" 	action="DuplicateEntryAction"/>
+      <toolitem name="ToolbarBlankEntry"     	action="BlankEntryAction"/>
+      <separator name="ToolbarSep68"/>
+      <toolitem name="ToolbarPostInvoice"       action="EditPostInvoiceAction"/>
+      <toolitem name="ToolbarUnPostInvoice"     action="EditUnpostInvoiceAction"/>
+    </placeholder>
+  </toolbar>
+
+  <popup name="InvoicePopup"                    action="FakeToplevel">
+    <menuitem name="RecordEntry"       		action="RecordEntryAction"/>
+    <menuitem name="CancelEntry"       		action="CancelEntryAction"/>
+    <menuitem name="DeleteEntry"       		action="DeleteEntryAction"/>
+    <separator name="PopupSep1"/>
+    <menuitem name="DuplicateEntry"    		action="DuplicateEntryAction"/>
+    <menuitem name="BlankEntry"        		action="BlankEntryAction"/>
+  </popup>
+</ui>


More information about the gnucash-changes mailing list