GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gncEntryLedgerP.h
1 /*
2  * gncEntryLedgerP.h -- a ledger widget for manipulating GncEntry's
3  * Copyright (C) 2001, 2002 Derek Atkins
4  * Author: Derek Atkins <[email protected]>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, contact:
18  *
19  * Free Software Foundation Voice: +1-617-542-5942
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
21  * Boston, MA 02110-1301, USA [email protected]
22  */
23 
24 #ifndef GNC_ENTRY_LEDGERP_H
25 #define GNC_ENTRY_LEDGERP_H
26 
27 #include "qof.h"
28 #include "table-allgui.h"
29 #include "gncEntryLedger.h"
30 
32 {
33  GncGUID blank_entry_guid;
34  gboolean blank_entry_edited;
35  gboolean traverse_to_new;
36 
37  gboolean loading; /* To keep from recursing from events */
38  gboolean full_refresh; /* Is a full refresh ok? */
39  gint component_id; /* To register for events */
40 
41  GDate last_date_entered;
42 
43  GncEntry * hint_entry; /* A Hint for where to display */
44 
45  GtkWidget * parent;
46  QofBook * book;
47  Table * table;
48  GncOrder * order;
49  GncInvoice * invoice;
50  QofQuery * query;
51 
52  GncEntryLedgerType type;
53 
54  gboolean is_cust_doc; /* is this document customer or vendor related ? */
55  gboolean is_credit_note; /* is this an invoice (or a bill)? */
56 
57  const gchar * prefs_group;
58 };
59 
60 GncEntry * gnc_entry_ledger_get_entry (GncEntryLedger *ledger,
61  VirtualCellLocation vcell_loc);
62 Account * gnc_entry_ledger_get_account_by_name (GncEntryLedger *ledger, BasicCell * bcell,
63  const char *name, gboolean *isnew);
64 Account * gnc_entry_ledger_get_account (GncEntryLedger *ledger,
65  const char * cell_name);
66 GncTaxTable * gnc_entry_ledger_get_taxtable (GncEntryLedger *ledger,
67  const char *cell_name);
68 
69 gint gnc_entry_ledger_get_type (GncEntryLedger *ledger,
70  const char * cell_name);
71 gboolean gnc_entry_ledger_get_checkmark (GncEntryLedger *ledger,
72  const char * cell_name);
73 gboolean gnc_entry_ledger_get_numeric (GncEntryLedger *ledger,
74  const char *cell_name,
75  gnc_numeric *value);
76 
77 const char * gnc_entry_ledger_type_string_getter (char flag);
78 const char * gnc_entry_ledger_how_string_getter (char flag);
79 
80 gboolean gnc_entry_ledger_find_entry (GncEntryLedger *ledger, GncEntry *entry,
81  VirtualCellLocation *vcell_loc);
82 
83 void gnc_entry_ledger_load_xfer_cells (GncEntryLedger *ledger);
84 
85 void gnc_entry_ledger_display_init (GncEntryLedger *ledger);
86 void gnc_entry_ledger_display_fini (GncEntryLedger *ledger);
87 
88 void gnc_entry_ledger_compute_value (GncEntryLedger *ledger,
89  gnc_numeric *value,
90  gnc_numeric *tax_value);
91 
92 #endif /* GNC_ENTRY_LEDGERP_H */
struct _QofQuery QofQuery
Definition: qofquery.h:90
Definition: guid.h:65
Declarations for the Table object.