dialog-invoice.h

00001 /*
00002  * dialog-invoice.h -- Dialog(s) for Invoice search and entry
00003  * Copyright (C) 2002 Derek Atkins
00004  * Author: Derek Atkins <warlord@MIT.EDU>
00005  *
00006  * Copyright (c) 2005,2006 David Hampton <hampton@employees.org>
00007  *
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU General Public License as
00010  * published by the Free Software Foundation; either version 2 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, contact:
00020  *
00021  * Free Software Foundation           Voice:  +1-617-542-5942
00022  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652
00023  * Boston, MA  02110-1301,  USA       gnu@gnu.org
00024  */
00025 
00026 
00027 #ifndef GNC_DIALOG_INVOICE_H_
00028 #define GNC_DIALOG_INVOICE_H_
00029 
00030 typedef struct _invoice_window InvoiceWindow;
00031 
00032 #include "qof.h"
00033 #include "gncInvoice.h"
00034 #include "gncOwner.h"
00035 #include "dialog-search.h"
00036 #include "dialog-query-list.h"
00037 
00038 typedef enum
00039 {
00040   BY_STANDARD = 0,
00041   BY_DATE,
00042   BY_DATE_ENTERED,
00043   BY_DESC,
00044   BY_QTY,
00045   BY_PRICE
00046 } invoice_sort_type_t;
00047 
00048 
00049 #define GCONF_SECTION_INVOICE "dialogs/business/invoice"
00050 #define GCONF_SECTION_BILL    "dialogs/business/bill"
00051 #define GCONF_SECTION_VOUCHER "dialogs/business/voucher"
00052 
00053 
00054 /* Create and edit an invoice */
00055 InvoiceWindow * gnc_ui_invoice_edit (GncInvoice *invoice);
00056 InvoiceWindow * gnc_ui_invoice_new (GncOwner *owner, QofBook *book);
00057 
00058 /* Search for invoices */
00059 GNCSearchWindow * gnc_invoice_search (GncInvoice *start, GncOwner *owner, QofBook *book);
00060 
00061 /*
00062  * These callbacks are for use with the gnc_general_search widget
00063  *
00064  * select() provides a Select Dialog and returns it.
00065  * edit() opens the existing invoice for editing and returns NULL.
00066  */
00067 GNCSearchWindow * gnc_invoice_search_select (gpointer start, gpointer book);
00068 GNCSearchWindow * gnc_invoice_search_edit (gpointer start, gpointer book);
00069 
00070 void gnc_business_call_owner_report (GncOwner *owner, Account *acc);
00071 
00072 void gnc_invoice_window_sort (InvoiceWindow *iw, invoice_sort_type_t sort_code);
00073 
00074 GtkWidget * gnc_invoice_window_create_summary_bar (InvoiceWindow *iw);
00075 
00076 void gnc_invoice_window_changed (InvoiceWindow *iw, GtkWidget *window);;
00077 
00078 gchar *gnc_invoice_get_help (InvoiceWindow *iw);
00079 
00080 gchar *gnc_invoice_get_title (InvoiceWindow *iw);
00081 
00082 #ifdef __GNC_PLUGIN_PAGE_H
00083 #include "gnc-main-window.h"
00084 GncPluginPage *gnc_invoice_recreate_page (GncMainWindow *window, GKeyFile *key_file, const gchar *group_name);
00085 void gnc_invoice_save_page (InvoiceWindow *iw, GKeyFile *key_file, const gchar *group_name);
00086 #endif
00087 
00088 GtkWidget * gnc_invoice_create_page (InvoiceWindow *iw, gpointer page);
00089 
00090 DialogQueryList *gnc_invoice_show_bills_due (QofBook *book, double days_in_advance);
00091 
00092 GtkWidget *gnc_invoice_get_register(InvoiceWindow *iw);
00093 
00094 /* definitions for CB functions */
00095 void gnc_invoice_window_destroy_cb (GtkWidget *widget, gpointer data);
00096 
00097 void gnc_invoice_window_new_invoice_cb (GtkWidget *widget, gpointer data);
00098 void gnc_invoice_window_printCB (GtkWidget *widget, gpointer data);
00099 void gnc_invoice_window_cut_cb (GtkWidget *widget, gpointer data);
00100 void gnc_invoice_window_copy_cb (GtkWidget *widget, gpointer data);
00101 void gnc_invoice_window_paste_cb (GtkWidget *widget, gpointer data);
00102 void gnc_invoice_window_editCB (GtkWidget *widget, gpointer data);
00103 void gnc_invoice_window_postCB (GtkWidget *widget, gpointer data);
00104 void gnc_invoice_window_unpostCB (GtkWidget *widget, gpointer data);
00105 void gnc_invoice_window_recordCB (GtkWidget *widget, gpointer data);
00106 void gnc_invoice_window_cancelCB (GtkWidget *widget, gpointer data);
00107 void gnc_invoice_window_deleteCB (GtkWidget *widget, gpointer data);
00108 void gnc_invoice_window_blankCB (GtkWidget *widget, gpointer data);
00109 void gnc_invoice_window_duplicateCB (GtkWidget *widget, gpointer data);
00110 void gnc_invoice_window_payment_cb (GtkWidget *widget, gpointer data);
00111 void gnc_invoice_window_report_owner_cb (GtkWidget *widget, gpointer data);
00112 
00113 #endif /* GNC_DIALOG_INVOICE_H_ */

Generated on Mon Sep 8 05:03:48 2008 for GnuCash by  doxygen 1.5.2