GnuCash 2.4.99
gncEntryLedgerP.h
00001 /*
00002  * gncEntryLedgerP.h -- a ledger widget for manipulating GncEntry's
00003  * Copyright (C) 2001, 2002 Derek Atkins
00004  * Author: Derek Atkins <warlord@MIT.EDU>
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License as
00008  * published by the Free Software Foundation; either version 2 of
00009  * the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, contact:
00018  *
00019  * Free Software Foundation           Voice:  +1-617-542-5942
00020  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652
00021  * Boston, MA  02110-1301,  USA       gnu@gnu.org
00022  */
00023 
00024 #ifndef GNC_ENTRY_LEDGERP_H
00025 #define GNC_ENTRY_LEDGERP_H
00026 
00027 #include "qof.h"
00028 #include "table-allgui.h"
00029 #include "gncEntryLedger.h"
00030 
00031 struct GncEntryLedger_s
00032 {
00033     GncGUID       blank_entry_guid;
00034     gboolean      blank_entry_edited;
00035     gboolean      traverse_to_new;
00036 
00037     gboolean      loading;       /* To keep from recursing from events */
00038     gboolean      full_refresh;  /* Is a full refresh ok? */
00039     gint          component_id;  /* To register for events */
00040 
00041     GDate       last_date_entered;
00042 
00043     GncEntry    * hint_entry;    /* A Hint for where to display */
00044 
00045     GtkWidget   * parent;
00046     QofBook     * book;
00047     Table       * table;
00048     GncOrder    * order;
00049     GncInvoice  * invoice;
00050     QofQuery    * query;
00051 
00052     GncEntryLedgerType type;
00053 
00054     gboolean   is_cust_doc;      /* is this document customer or vendor related ? */
00055     gboolean   is_credit_note;   /* is this an invoice (or a bill)? */
00056 
00057     const gchar * gconf_section;
00058 };
00059 
00060 GncEntry * gnc_entry_ledger_get_entry (GncEntryLedger *ledger,
00061                                        VirtualCellLocation vcell_loc);
00062 Account * gnc_entry_ledger_get_account_by_name (GncEntryLedger *ledger, BasicCell * bcell,
00063         const char *name, gboolean *new);
00064 Account * gnc_entry_ledger_get_account (GncEntryLedger *ledger,
00065                                         const char * cell_name);
00066 GncTaxTable * gnc_entry_ledger_get_taxtable (GncEntryLedger *ledger,
00067         const char *cell_name);
00068 
00069 gint gnc_entry_ledger_get_type (GncEntryLedger *ledger,
00070                                 const char * cell_name);
00071 gboolean gnc_entry_ledger_get_checkmark (GncEntryLedger *ledger,
00072         const char * cell_name);
00073 gboolean gnc_entry_ledger_get_numeric (GncEntryLedger *ledger,
00074                                        const char *cell_name,
00075                                        gnc_numeric *value);
00076 
00077 const char * gnc_entry_ledger_type_string_getter (char flag);
00078 const char * gnc_entry_ledger_how_string_getter (char flag);
00079 
00080 gboolean gnc_entry_ledger_find_entry (GncEntryLedger *ledger, GncEntry *entry,
00081                                       VirtualCellLocation *vcell_loc);
00082 
00083 void gnc_entry_ledger_load_xfer_cells (GncEntryLedger *ledger);
00084 
00085 void gnc_entry_ledger_display_init (GncEntryLedger *ledger);
00086 void gnc_entry_ledger_display_fini (GncEntryLedger *ledger);
00087 
00088 void gnc_entry_ledger_compute_value (GncEntryLedger *ledger,
00089                                      gnc_numeric *value,
00090                                      gnc_numeric *tax_value);
00091 
00092 #endif /* GNC_ENTRY_LEDGERP_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines