GnuCash  5.6-150-g038405b370+
dialog-invoice.h
1 /*
2  * dialog-invoice.h -- Dialog(s) for Invoice search and entry
3  * Copyright (C) 2002 Derek Atkins
4  * Author: Derek Atkins <warlord@MIT.EDU>
5  *
6  * Copyright (c) 2005,2006 David Hampton <hampton@employees.org>
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of
11  * the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, contact:
20  *
21  * Free Software Foundation Voice: +1-617-542-5942
22  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
23  * Boston, MA 02110-1301, USA gnu@gnu.org
24  */
25 
26 
27 #ifndef GNC_DIALOG_INVOICE_H_
28 #define GNC_DIALOG_INVOICE_H_
29 
30 typedef struct _invoice_window InvoiceWindow;
31 
32 #include "qof.h"
33 #include "gncInvoice.h"
34 #include "gncOwner.h"
35 #include "dialog-search.h"
36 #include "dialog-query-view.h"
37 
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif
42 
43 typedef enum
44 {
45  INVSORT_BY_STANDARD = 0,
46  INVSORT_BY_DATE,
47  INVSORT_BY_DATE_ENTERED,
48  INVSORT_BY_DESC,
49  INVSORT_BY_QTY,
50  INVSORT_BY_PRICE
51 } invoice_sort_type_t;
52 
53 
54 /* Create and edit an invoice */
55 InvoiceWindow * gnc_ui_invoice_edit (GtkWindow *parent, GncInvoice *invoice);
56 InvoiceWindow * gnc_ui_invoice_new (GtkWindow *parent, GncOwner *owner, QofBook *book);
57 
68 InvoiceWindow* gnc_ui_invoice_duplicate (GtkWindow* parent, GncInvoice* old_invoice, gboolean open_properties, const GDate* new_date);
69 
70 /* Search for invoices */
71 GNCSearchWindow * gnc_invoice_search (GtkWindow *parent, GncInvoice *start, GncOwner *owner, QofBook *book);
72 
73 void gnc_business_call_owner_report (GtkWindow* parent, GncOwner *owner, Account *acc);
74 
75 void gnc_business_call_owner_report_with_enddate (GtkWindow* parent,
76  GncOwner *owner,
77  Account *acc,
78  time64 enddate);
79 
80 void gnc_invoice_window_sort (InvoiceWindow *iw, invoice_sort_type_t sort_code);
81 
82 GtkWidget * gnc_invoice_window_create_summary_bar (InvoiceWindow *iw);
83 
84 void gnc_invoice_window_changed (InvoiceWindow *iw, GtkWidget *window);
85 
86 gchar *gnc_invoice_get_help (InvoiceWindow *iw);
87 
88 gchar *gnc_invoice_get_title (InvoiceWindow *iw);
89 
90 GncInvoice * gnc_invoice_window_get_invoice (InvoiceWindow *iw);
91 
92 GtkWidget * gnc_invoice_window_get_doclink_button (InvoiceWindow *iw);
93 
94 void gnc_invoice_update_doclink_for_window (GncInvoice *invoice,
95  const gchar *uri);
96 
97 GncInvoiceType gnc_invoice_get_type_from_window(InvoiceWindow *iw);
98 
99 #ifdef __GNC_PLUGIN_PAGE_H
100 #include "gnc-main-window.h"
101 GncPluginPage *gnc_invoice_recreate_page (GncMainWindow *window, GKeyFile *key_file, const gchar *group_name);
102 void gnc_invoice_save_page (InvoiceWindow *iw, GKeyFile *key_file, const gchar *group_name);
103 #endif
104 
105 GtkWidget * gnc_invoice_create_page (InvoiceWindow *iw, gpointer page);
106 
107 GtkWidget *gnc_invoice_get_register(InvoiceWindow *iw);
108 GtkWidget *gnc_invoice_get_notes(InvoiceWindow *iw);
109 
110 /* definitions for CB functions */
111 void gnc_invoice_window_destroy_cb (GtkWidget *widget, gpointer data);
112 
113 void gnc_invoice_window_new_invoice_cb (GtkWindow* parent, gpointer data);
114 void gnc_invoice_window_printCB (GtkWindow* parent, gpointer data);
115 void gnc_invoice_window_cut_cb (GtkWidget *widget, gpointer data);
116 void gnc_invoice_window_copy_cb (GtkWidget *widget, gpointer data);
117 void gnc_invoice_window_paste_cb (GtkWidget *widget, gpointer data);
118 void gnc_invoice_window_editCB (GtkWindow* parent, gpointer data);
119 void gnc_invoice_window_duplicateInvoiceCB (GtkWindow* parent, gpointer data);
120 void gnc_invoice_window_postCB (GtkWidget *widget, gpointer data);
121 void gnc_invoice_window_unpostCB (GtkWidget *widget, gpointer data);
122 void gnc_invoice_window_recordCB (GtkWidget *widget, gpointer data);
123 void gnc_invoice_window_cancelCB (GtkWidget *widget, gpointer data);
124 void gnc_invoice_window_deleteCB (GtkWidget *widget, gpointer data);
125 void gnc_invoice_window_blankCB (GtkWidget *widget, gpointer data);
126 void gnc_invoice_window_duplicateCB (GtkWidget *widget, gpointer data);
127 void gnc_invoice_window_payment_cb (GtkWindow *parent, gpointer data);
128 void gnc_invoice_window_report_owner_cb (GtkWindow *parent, gpointer data);
129 
130 void gnc_invoice_window_save_document_layout_to_user_state (InvoiceWindow *iw);
131 void gnc_invoice_window_reset_document_layout_and_clear_user_state (InvoiceWindow *iw);
132 gboolean gnc_invoice_window_document_has_user_state (InvoiceWindow *iw);
133 
134 void gnc_invoice_window_entryUpCB (GtkWidget *widget, gpointer data);
135 void gnc_invoice_window_entryDownCB (GtkWidget *widget, gpointer data);
136 
137 #ifdef __cplusplus
138 }
139 #endif
140 
141 #endif /* GNC_DIALOG_INVOICE_H_ */
Business Interface: Object OWNERs.
The instance data structure for a content plugin.
STRUCTS.
Functions for adding content to a window.
This data structure does double duty.
Business Invoice Interface.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
Definition: gnc-date.h:87