GnuCash c935c2f+
Loading...
Searching...
No Matches
gncEntryLedger.h
Go to the documentation of this file.
1/*
2 * gncEntryLedger.h -- a ledger widget for manipulating GncEntry's
3 * Copyright (C) 2001, 2003 Derek Atkins
4 * Author: Derek Atkins <warlord@MIT.EDU>
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 gnu@gnu.org
22 */
23
24#ifndef GNC_ENTRY_LEDGER_H
25#define GNC_ENTRY_LEDGER_H
26
27#include "qof.h"
28#include "gncEntry.h"
29#include "gncOrder.h"
30#include "table-allgui.h"
38typedef enum
39{
40 GNC_ENTRY_ORDER_NONE = -1, //Force clang to use int representation of enum.
41 GNCENTRY_ORDER_ENTRY,
42 GNCENTRY_ORDER_VIEWER,
43 GNCENTRY_INVOICE_ENTRY,
44 GNCENTRY_INVOICE_VIEWER,
45 GNCENTRY_CUST_CREDIT_NOTE_ENTRY,
46 GNCENTRY_CUST_CREDIT_NOTE_VIEWER,
47 GNCENTRY_BILL_ENTRY,
48 GNCENTRY_BILL_VIEWER,
49 GNCENTRY_VEND_CREDIT_NOTE_ENTRY,
50 GNCENTRY_VEND_CREDIT_NOTE_VIEWER,
51 GNCENTRY_EXPVOUCHER_ENTRY,
52 GNCENTRY_EXPVOUCHER_VIEWER,
53 GNCENTRY_EMPL_CREDIT_NOTE_ENTRY,
54 GNCENTRY_EMPL_CREDIT_NOTE_VIEWER,
55 GNCENTRY_NUM_REGISTER_TYPES
56} GncEntryLedgerType;
57
58#define ENTRY_IACCT_CELL "inv-account"
59#define ENTRY_BACCT_CELL "bill-account"
60#define ENTRY_ACTN_CELL "action"
61#define ENTRY_DATE_CELL "date"
62#define ENTRY_DESC_CELL "description"
63#define ENTRY_DISC_CELL "discount"
64#define ENTRY_DISTYPE_CELL "discount-type"
65#define ENTRY_DISHOW_CELL "discount-how"
66#define ENTRY_PRIC_CELL "price"
67#define ENTRY_QTY_CELL "quantity"
68#define ENTRY_TAXABLE_CELL "istaxable"
69#define ENTRY_TAXTABLE_CELL "taxtable"
70#define ENTRY_TAXINCLUDED_CELL "taxincluded"
71#define ENTRY_BILLABLE_CELL "isbillable"
72
73#define ENTRY_INV_CELL "isinvoiced"
74#define ENTRY_VALUE_CELL "line-value"
75#define ENTRY_TAXVAL_CELL "line-tax-val"
76
77#define ENTRY_PAYMENT_CELL "payment"
78
79typedef struct GncEntryLedger_s GncEntryLedger;
80
81/* Prototypes ***************************************************/
82
84GncEntryLedger * gnc_entry_ledger_new (QofBook *book, GncEntryLedgerType type);
85
87void gnc_entry_ledger_set_default_order (GncEntryLedger *ledger,
88 GncOrder *order);
89
91void gnc_entry_ledger_set_default_invoice (GncEntryLedger *ledger,
92 GncInvoice *invoice);
93
95void gnc_entry_ledger_destroy (GncEntryLedger *ledger);
96
98GncEntry * gnc_entry_ledger_get_current_entry (GncEntryLedger *ledger);
99
101void gnc_entry_ledger_load (GncEntryLedger *ledger, GList *entry_list);
102
103void gnc_entry_ledger_display_refresh (GncEntryLedger *ledger);
104
106Table * gnc_entry_ledger_get_table (GncEntryLedger *ledger);
107
108void gnc_entry_ledger_set_parent (GncEntryLedger *ledger, GtkWidget *parent);
109
110void gnc_entry_ledger_set_readonly (GncEntryLedger *ledger, gboolean readonly);
111
112gboolean gnc_entry_ledger_changed (GncEntryLedger *ledger);
113
114void gnc_entry_ledger_cancel_cursor_changes (GncEntryLedger *ledger);
115
117gboolean gnc_entry_ledger_commit_entry (GncEntryLedger *ledger);
118
120gboolean gnc_entry_ledger_check_close (GtkWidget *parent, GncEntryLedger *ledger);
121
122void gnc_entry_ledger_reset_query (GncEntryLedger *ledger);
123
126GncEntry * gnc_entry_ledger_get_entry (GncEntryLedger *ledger,
127 VirtualCellLocation vcell_loc);
128
131GncEntry * gnc_entry_ledger_get_blank_entry (GncEntryLedger *ledger);
132
136gboolean gnc_entry_ledger_get_entry_virt_loc (GncEntryLedger *ledger,
137 const GncEntry *entry,
138 VirtualCellLocation *vcell_loc);
139
140void gnc_entry_ledger_delete_current_entry (GncEntryLedger *ledger);
141void gnc_entry_ledger_duplicate_current_entry (GncEntryLedger *ledger);
142
150void gnc_entry_ledger_move_current_entry_updown (GncEntryLedger *ledger,
151 gboolean move_up);
152
153QofQuery * gnc_entry_ledger_get_query (GncEntryLedger *ledger);
154
155void gnc_entry_ledger_set_prefs_group (GncEntryLedger *ledger, const gchar *string);
157#endif /* GNC_ENTRY_LEDGER_H */
Business Entry Interface.
GncEntry * gnc_entry_ledger_get_current_entry(GncEntryLedger *ledger)
Returns the Entry where the cursor is currently located.
GncEntry * gnc_entry_ledger_get_entry(GncEntryLedger *ledger, VirtualCellLocation vcell_loc)
Returns the GncEntry at the given location, or NULL if the location is not valid.
GncEntryLedger * gnc_entry_ledger_new(QofBook *book, GncEntryLedgerType type)
Create and return a new GncEntry Ledger.
void gnc_entry_ledger_destroy(GncEntryLedger *ledger)
Destroy the GncEntry Ledger.
gboolean gnc_entry_ledger_commit_entry(GncEntryLedger *ledger)
This will act just like hitting 'return' to record an entry.
Table * gnc_entry_ledger_get_table(GncEntryLedger *ledger)
Get the Table.
GncEntry * gnc_entry_ledger_get_blank_entry(GncEntryLedger *ledger)
Returns the GncEntry that represents the blank new line at the bottom of the ledger.
void gnc_entry_ledger_load(GncEntryLedger *ledger, GList *entry_list)
Copy GncEntry information from the list to the rows of the Ledger.
gboolean gnc_entry_ledger_get_entry_virt_loc(GncEntryLedger *ledger, const GncEntry *entry, VirtualCellLocation *vcell_loc)
Looks up the cell location of the given "entry" and writes the location into the variable pointed to ...
void gnc_entry_ledger_set_default_invoice(GncEntryLedger *ledger, GncInvoice *invoice)
Set the default invoice for this ledger.
void gnc_entry_ledger_set_default_order(GncEntryLedger *ledger, GncOrder *order)
Set the default order for this ledger.
void gnc_entry_ledger_move_current_entry_updown(GncEntryLedger *ledger, gboolean move_up)
This implements the command of moving the current entry (where the cursor is currently located) one r...
gboolean gnc_entry_ledger_check_close(GtkWidget *parent, GncEntryLedger *ledger)
This will ask the user if they really want to make a change.
GtkWidget * parent
A Hint for where to display.
QofBook reference.
Definition qofbook-p.hpp:47
A Query.
Definition qofquery.cpp:75
Declarations for the Table object.