27 #include <glib/gi18n.h> 31 #include "dialog-utils.h" 38 #include "gnc-component-manager.h" 40 #include "gnc-warnings.h" 49 static QofLogModule log_module =
"Business Entry Ledger";
54 gnc_entry_ledger_clear_blank_entry (GncEntryLedger *ledger)
63 if (!gncEntryIsOpen (entry))
64 gncEntryBeginEdit (entry);
65 gncEntryDestroy (entry);
69 ledger->blank_entry_edited = FALSE;
77 if (!ledger)
return NULL;
78 return gncEntryLookup (ledger->book, &(ledger->blank_entry_guid));
82 gnc_entry_ledger_get_account_by_name (GncEntryLedger *ledger, BasicCell * bcell,
83 const char *name, gboolean *isnew)
85 const char *placeholder = _(
"The account %s does not allow transactions.");
86 const char *missing = _(
"The account %s does not exist. " 87 "Would you like to create it?");
91 GList *account_types = NULL;
101 if (!gnc_verify_dialog (GTK_WINDOW (ledger->parent), TRUE, missing, name))
109 account_types = g_list_prepend (account_types, (gpointer)
ACCT_TYPE_ASSET);
111 if ( ledger->is_cust_doc )
118 g_list_free ( account_types );
126 if (g_strcmp0(account_name, gnc_basic_cell_get_value(bcell)))
128 gnc_combo_cell_set_value (cell, account_name);
129 gnc_basic_cell_set_changed (&cell->cell, TRUE);
131 g_free (account_name);
136 gnc_error_dialog (GTK_WINDOW (ledger->parent), placeholder, name);
143 Account * gnc_entry_ledger_get_account (GncEntryLedger *ledger,
144 const char * cell_name)
150 cell = gnc_table_layout_get_cell (ledger->table->layout, cell_name);
153 name = gnc_basic_cell_get_value (cell);
154 return gnc_entry_ledger_get_account_by_name (ledger, cell, name, &dummy);
157 GncTaxTable * gnc_entry_ledger_get_taxtable (GncEntryLedger *ledger,
158 const char *cell_name)
164 if (gnc_table_layout_get_cell_changed (ledger->table->layout,
167 name = gnc_table_layout_get_cell_value (ledger->table->layout, cell_name);
168 return gncTaxTableLookupByName (ledger->book, name);
173 if (ledger->is_cust_doc)
174 return gncEntryGetInvTaxTable (entry);
176 return gncEntryGetBillTaxTable (entry);
179 gboolean gnc_entry_ledger_get_checkmark (GncEntryLedger *ledger,
180 const char * cell_name)
183 (
CheckboxCell *) gnc_table_layout_get_cell (ledger->table->layout, cell_name);
191 gint gnc_entry_ledger_get_type (GncEntryLedger *ledger,
const char * cell_name)
194 (
RecnCell *) gnc_table_layout_get_cell (ledger->table->layout, cell_name);
199 return (gnc_recn_cell_get_flag (cell) -
'0');
203 gboolean gnc_entry_ledger_get_numeric (GncEntryLedger *ledger,
204 const char *cell_name,
208 (
PriceCell *) gnc_table_layout_get_cell (ledger->table->layout, cell_name);
219 VirtualCellLocation vcell_loc)
223 if (!ledger)
return NULL;
226 if (!guid)
return NULL;
228 return gncEntryLookup (ledger->book, guid);
234 if (!ledger)
return NULL;
238 ledger->table->current_cursor_loc.vcell_loc);
241 static void gnc_entry_ledger_config_action (GncEntryLedger *ledger)
245 cell = (
ComboCell *) gnc_table_layout_get_cell (ledger->table->layout,
257 gnc_entry_ledger_config_cells (GncEntryLedger *ledger)
262 gnc_table_layout_get_cell (ledger->table->layout, ENTRY_ACTN_CELL), TRUE);
267 gnc_table_layout_get_cell (ledger->table->layout, ENTRY_ACTN_CELL), FALSE);
270 gnc_entry_ledger_config_action (ledger);
276 GncEntryLedger *ledger;
278 if (!book)
return NULL;
279 if (type < 0 || type >= GNCENTRY_NUM_REGISTER_TYPES)
return NULL;
281 ledger = g_new0 (GncEntryLedger, 1);
284 ledger->traverse_to_new = TRUE;
285 ledger->prefs_group = NULL;
290 case GNCENTRY_ORDER_ENTRY:
291 case GNCENTRY_ORDER_VIEWER:
292 case GNCENTRY_INVOICE_ENTRY:
293 case GNCENTRY_INVOICE_VIEWER:
294 ledger->is_cust_doc = TRUE;
295 ledger->is_credit_note = FALSE;
297 case GNCENTRY_BILL_ENTRY:
298 case GNCENTRY_BILL_VIEWER:
299 case GNCENTRY_EXPVOUCHER_ENTRY:
300 case GNCENTRY_EXPVOUCHER_VIEWER:
301 case GNCENTRY_NUM_REGISTER_TYPES:
302 ledger->is_cust_doc = FALSE;
303 ledger->is_credit_note = FALSE;
305 case GNCENTRY_CUST_CREDIT_NOTE_ENTRY:
306 case GNCENTRY_CUST_CREDIT_NOTE_VIEWER:
307 ledger->is_cust_doc = TRUE;
308 ledger->is_credit_note = TRUE;
310 case GNCENTRY_VEND_CREDIT_NOTE_ENTRY:
311 case GNCENTRY_VEND_CREDIT_NOTE_VIEWER:
312 case GNCENTRY_EMPL_CREDIT_NOTE_ENTRY:
313 case GNCENTRY_EMPL_CREDIT_NOTE_VIEWER:
314 ledger->is_cust_doc = FALSE;
315 ledger->is_credit_note = TRUE;
318 PWARN (
"Bad GncEntryLedgerType");
325 ledger->blank_entry_edited = FALSE;
329 ledger->last_date_entered = *today;
334 TableLayout *layout = gnc_entry_ledger_layout_new (ledger);
336 TableControl *control = gnc_entry_ledger_control_new ();
337 model->handler_user_data = ledger;
338 control->user_data = ledger;
340 ledger->table = gnc_table_new (layout, model, control);
343 gnc_entry_ledger_config_cells (ledger);
347 VirtualCellLocation vcell_loc = { 0, 0 };
350 header = gnc_table_layout_get_cursor (ledger->table->layout,
CURSOR_HEADER);
357 VirtualLocation vloc;
360 vloc.vcell_loc.virt_row = 1;
361 vloc.vcell_loc.virt_col = 0;
362 vloc.phys_row_offset = 0;
363 vloc.phys_col_offset = 0;
365 cursor = gnc_table_layout_get_cursor (ledger->table->layout,
"cursor");
373 g_warning (
"Can't find valid initial location");
378 gnc_entry_ledger_display_init (ledger);
381 gnc_entry_ledger_set_readonly(ledger, TRUE);
392 gnc_entry_ledger_clear_blank_entry (ledger);
393 gnc_entry_ledger_display_fini (ledger);
394 gnc_table_destroy (ledger->table);
401 if (!ledger)
return NULL;
402 return ledger->table;
409 ledger->order = order;
411 if (!ledger->query && order)
413 ledger->query = qof_query_create_for (GNC_ENTRY_MODULE_NAME);
416 g_slist_prepend (g_slist_prepend (NULL,
419 gncOrderGetGUID (order), QOF_QUERY_AND);
421 gnc_entry_ledger_display_refresh (ledger);
424 static void create_invoice_query (GncEntryLedger *ledger)
429 if (!ledger->invoice)
455 ledger->query = qof_query_create_for (GNC_ENTRY_MODULE_NAME);
459 switch (ledger->type)
461 case GNCENTRY_INVOICE_ENTRY:
462 case GNCENTRY_INVOICE_VIEWER:
463 case GNCENTRY_CUST_CREDIT_NOTE_ENTRY:
464 case GNCENTRY_CUST_CREDIT_NOTE_VIEWER:
465 type = ENTRY_INVOICE;
467 case GNCENTRY_BILL_ENTRY:
468 case GNCENTRY_BILL_VIEWER:
469 case GNCENTRY_EXPVOUCHER_ENTRY:
470 case GNCENTRY_EXPVOUCHER_VIEWER:
471 case GNCENTRY_VEND_CREDIT_NOTE_ENTRY:
472 case GNCENTRY_VEND_CREDIT_NOTE_VIEWER:
473 case GNCENTRY_EMPL_CREDIT_NOTE_ENTRY:
474 case GNCENTRY_EMPL_CREDIT_NOTE_VIEWER:
478 g_warning (
"Invalid Ledger type");
479 type = ENTRY_INVOICE;
483 q = qof_query_create_for (GNC_ENTRY_MODULE_NAME);
488 if ((ledger->type == GNCENTRY_INVOICE_ENTRY ||
489 ledger->type == GNCENTRY_CUST_CREDIT_NOTE_ENTRY) &&
490 gncOwnerGetEndGUID (gncInvoiceGetOwner (ledger->invoice)) != NULL)
493 const GncGUID *invoice_parent =
495 QofQuery *q2 = qof_query_create_for (GNC_ENTRY_MODULE_NAME);
503 QOF_PARAM_GUID, NULL),
504 NULL, QOF_QUERY_AND);
506 QOF_PARAM_GUID, NULL),
507 invoice_parent, QOF_QUERY_AND);
509 QOF_PARAM_GUID, NULL),
510 invoice_parent, QOF_QUERY_OR);
514 TRUE, QOF_QUERY_AND);
516 INVOICE_IS_POSTED, NULL),
517 TRUE, QOF_QUERY_AND);
521 OWNER_PARENTG, NULL),
522 invoice_parent, QOF_QUERY_OR);
526 QOF_PARAM_GUID, NULL),
527 NULL, QOF_QUERY_AND);
548 ledger->invoice = invoice;
558 if (gncInvoiceGetOwnerType (invoice) == GNC_OWNER_VENDOR)
559 ledger->last_date_entered =
time64_to_gdate(gncInvoiceGetDateOpened (invoice));
561 if (!ledger->query && invoice)
562 create_invoice_query (ledger);
564 gnc_entry_ledger_display_refresh (ledger);
567 void gnc_entry_ledger_reset_query (GncEntryLedger *ledger)
570 if (!ledger->invoice)
return;
572 create_invoice_query (ledger);
573 gnc_entry_ledger_display_refresh (ledger);
576 void gnc_entry_ledger_set_parent (GncEntryLedger *ledger, GtkWidget *parent)
579 ledger->parent = parent;
582 gboolean gnc_entry_ledger_find_entry (GncEntryLedger *ledger, GncEntry *entry,
583 VirtualCellLocation *vcell_loc)
585 Table *
table = ledger->table;
589 for (v_row = 1; v_row <
table->num_virt_rows; v_row++)
591 VirtualCellLocation vc_loc = { v_row, 0 };
597 if (vcell_loc != NULL)
605 void gnc_entry_ledger_set_readonly (GncEntryLedger *ledger, gboolean readonly)
613 switch (ledger->type)
615 case GNCENTRY_ORDER_ENTRY:
616 ledger->type = GNCENTRY_ORDER_VIEWER;
618 case GNCENTRY_INVOICE_ENTRY:
619 ledger->type = GNCENTRY_INVOICE_VIEWER;
620 create_invoice_query (ledger);
622 case GNCENTRY_BILL_ENTRY:
623 ledger->type = GNCENTRY_BILL_VIEWER;
624 create_invoice_query (ledger);
626 case GNCENTRY_EXPVOUCHER_ENTRY:
627 ledger->type = GNCENTRY_EXPVOUCHER_VIEWER;
628 create_invoice_query (ledger);
630 case GNCENTRY_CUST_CREDIT_NOTE_ENTRY:
631 ledger->type = GNCENTRY_CUST_CREDIT_NOTE_VIEWER;
632 create_invoice_query (ledger);
634 case GNCENTRY_VEND_CREDIT_NOTE_ENTRY:
635 ledger->type = GNCENTRY_VEND_CREDIT_NOTE_VIEWER;
636 create_invoice_query (ledger);
638 case GNCENTRY_EMPL_CREDIT_NOTE_ENTRY:
639 ledger->type = GNCENTRY_EMPL_CREDIT_NOTE_VIEWER;
640 create_invoice_query (ledger);
648 switch (ledger->type)
650 case GNCENTRY_ORDER_VIEWER:
651 ledger->type = GNCENTRY_ORDER_ENTRY;
653 case GNCENTRY_INVOICE_VIEWER:
654 ledger->type = GNCENTRY_INVOICE_ENTRY;
655 create_invoice_query (ledger);
657 case GNCENTRY_BILL_VIEWER:
658 ledger->type = GNCENTRY_BILL_ENTRY;
659 create_invoice_query (ledger);
661 case GNCENTRY_EXPVOUCHER_VIEWER:
662 ledger->type = GNCENTRY_EXPVOUCHER_ENTRY;
663 create_invoice_query (ledger);
665 case GNCENTRY_CUST_CREDIT_NOTE_VIEWER:
666 ledger->type = GNCENTRY_CUST_CREDIT_NOTE_ENTRY;
667 create_invoice_query (ledger);
669 case GNCENTRY_VEND_CREDIT_NOTE_VIEWER:
670 ledger->type = GNCENTRY_VEND_CREDIT_NOTE_ENTRY;
671 create_invoice_query (ledger);
673 case GNCENTRY_EMPL_CREDIT_NOTE_VIEWER:
674 ledger->type = GNCENTRY_EMPL_CREDIT_NOTE_ENTRY;
675 create_invoice_query (ledger);
683 gnc_table_model_set_read_only (ledger->table->model, readonly);
687 gnc_entry_ledger_clear_blank_entry (ledger);
690 gnc_entry_ledger_display_refresh (ledger);
694 gnc_entry_ledger_changed (GncEntryLedger *ledger)
699 if (gnc_table_current_cursor_changed (ledger->table, FALSE))
706 gnc_entry_ledger_compute_value (GncEntryLedger *ledger,
707 gnc_numeric *value, gnc_numeric *tax_value)
709 gnc_numeric qty = gnc_numeric_zero(), price = gnc_numeric_zero(), discount = gnc_numeric_zero();
710 gint disc_type, disc_how;
711 gboolean taxable, taxincluded;
715 gnc_numeric value_unrounded, taxes_unrounded;
717 gnc_entry_ledger_get_numeric (ledger, ENTRY_QTY_CELL, &qty);
718 gnc_entry_ledger_get_numeric (ledger, ENTRY_PRIC_CELL, &price);
719 gnc_entry_ledger_get_numeric (ledger, ENTRY_DISC_CELL, &discount);
721 disc_type = gnc_entry_ledger_get_type (ledger, ENTRY_DISTYPE_CELL);
722 disc_how = gnc_entry_ledger_get_type (ledger, ENTRY_DISHOW_CELL);
726 if (ledger->type == GNCENTRY_BILL_ENTRY ||
727 ledger->type == GNCENTRY_BILL_VIEWER ||
728 ledger->type == GNCENTRY_VEND_CREDIT_NOTE_ENTRY ||
729 ledger->type == GNCENTRY_VEND_CREDIT_NOTE_VIEWER ||
730 ledger->type == GNCENTRY_EXPVOUCHER_ENTRY ||
731 ledger->type == GNCENTRY_EXPVOUCHER_VIEWER ||
732 ledger->type == GNCENTRY_EMPL_CREDIT_NOTE_ENTRY ||
733 ledger->type == GNCENTRY_EMPL_CREDIT_NOTE_VIEWER)
737 disc_how = GNC_DISC_PRETAX;
742 if (disc_type < 0 || disc_how < 0)
745 *value = gnc_numeric_zero ();
747 *tax_value = gnc_numeric_zero ();
751 taxable = gnc_entry_ledger_get_checkmark (ledger, ENTRY_TAXABLE_CELL);
752 taxincluded = gnc_entry_ledger_get_checkmark (ledger, ENTRY_TAXINCLUDED_CELL);
753 table = gnc_entry_ledger_get_taxtable (ledger, ENTRY_TAXTABLE_CELL);
756 if (ledger->type == GNCENTRY_EXPVOUCHER_ENTRY ||
757 ledger->type == GNCENTRY_EXPVOUCHER_VIEWER)
766 gnc_commodity *currency = gncInvoiceGetCurrency(ledger->invoice);
772 discount, disc_type, disc_how, 0,
773 &value_unrounded, NULL, &taxes);
789 VirtualCellLocation *vcell_loc)
795 if ((ledger == NULL) || (entry == NULL))
799 table = ledger->table;
803 for (v_row =
table->num_virt_rows - 1; v_row > 0; v_row--)
804 for (v_col = 0; v_col <
table->num_virt_cols; v_col++)
806 VirtualCellLocation vc_loc = { v_row, v_col };
817 e = gncEntryLookup (ledger->book, vcell->
vcell_data);
832 gnc_entry_ledger_delete_current_entry (GncEntryLedger *ledger)
847 gnc_entry_ledger_cancel_cursor_changes (ledger);
852 gnc_suspend_gui_refresh ();
853 if (!gncEntryIsOpen (entry))
854 gncEntryBeginEdit (entry);
860 order = gncEntryGetOrder (entry);
862 gncOrderRemoveEntry (order, entry);
864 invoice = gncEntryGetInvoice (entry);
866 gncInvoiceRemoveEntry (invoice, entry);
868 invoice = gncEntryGetBill (entry);
870 gncBillRemoveEntry (invoice, entry);
872 gncEntryDestroy (entry);
874 gnc_resume_gui_refresh ();
878 gnc_entry_ledger_duplicate_current_entry (GncEntryLedger *ledger)
891 changed = gnc_table_current_cursor_changed (ledger->table, FALSE);
899 gnc_suspend_gui_refresh ();
905 const char *title = _(
"Save the current entry?");
906 const char *message =
907 _(
"The current transaction has been changed. Would you like to " 908 "record the changes before duplicating this entry, or " 909 "cancel the duplication?");
913 dialog = gtk_message_dialog_new(GTK_WINDOW(ledger->parent),
914 GTK_DIALOG_DESTROY_WITH_PARENT,
915 GTK_MESSAGE_QUESTION,
918 gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
920 gtk_dialog_add_buttons(GTK_DIALOG(dialog),
921 _(
"_Cancel"), GTK_RESPONSE_CANCEL,
922 _(
"_Record"), GTK_RESPONSE_ACCEPT,
924 response = gnc_dialog_run(GTK_DIALOG(dialog), GNC_PREF_WARN_INV_ENTRY_DUP);
925 gtk_widget_destroy(dialog);
927 if (response != GTK_RESPONSE_ACCEPT)
929 gnc_resume_gui_refresh ();
935 gnc_resume_gui_refresh ();
942 GncEntry * new_entry;
944 new_entry = gncEntryCreate (ledger->book);
945 gncEntryCopy (entry, new_entry, TRUE);
950 gncEntrySetDateEntered (new_entry,
gnc_time (NULL));
953 ledger->hint_entry = new_entry;
956 gnc_resume_gui_refresh ();
961 gnc_entry_ledger_get_query (GncEntryLedger *ledger)
966 return ledger->query;
970 gnc_entry_ledger_set_prefs_group (GncEntryLedger *ledger,
const gchar *
string)
975 ledger->prefs_group = string;
981 GncEntry *blank, *current, *target;
982 VirtualCellLocation vcell_loc;
993 if (!current || current == blank)
997 vcell_loc = ledger->table->current_cursor_loc.vcell_loc;
1000 if (vcell_loc.virt_row == 0)
1002 vcell_loc.virt_row--;
1006 vcell_loc.virt_row++;
1012 if (!target || target == blank)
1026 if (g_date_compare(&d1, &d2) != 0)
1049 gnc_suspend_gui_refresh ();
1054 time64 time_current = gncEntryGetDateEntered(current);
1055 time64 time_target = gncEntryGetDateEntered(target);
1059 if (time_current == time_target)
1073 gncEntrySetDateEntered(current, time_target);
1074 gncEntrySetDateEntered(target, time_current);
1082 gnc_resume_gui_refresh ();
The RecnCell object implements a cell handler that will cycle through a series of single-character va...
gpointer vcell_data
Array of physical cells.
const GncGUID * gncOwnerGetGUID(const GncOwner *owner)
Get the GncGUID of the immediate owner.
int gnc_commodity_get_fraction(const gnc_commodity *cm)
Retrieve the fraction for the specified commodity.
This file contains the functions to present a gui to the user for creating a new account or editing a...
utility functions for the GnuCash UI
Expense accounts are used to denote expenses.
gpointer gnc_table_get_vcell_data(Table *table, VirtualCellLocation vcell_loc)
returns the virtual cell data associated with a cursor located at the given virtual coords...
holds information about each virtual cell.
TableModel * gnc_entry_ledger_model_new(GncEntryLedgerType type)
Public Interface.
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. ...
gboolean gnc_table_find_close_valid_cell(Table *table, VirtualLocation *virt_loc, gboolean exact_pointer)
Find a close valid cell.
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_numeric_zero_p(gnc_numeric a)
Returns 1 if the given gnc_numeric is 0 (zero), else returns 0.
GDate time64_to_gdate(time64 t)
Returns the GDate in which the time64 occurs.
GncEntryLedger * gnc_entry_ledger_new(QofBook *book, GncEntryLedgerType type)
Create and return a new GncEntry Ledger.
gnc_numeric gncAccountValueTotal(GList *list)
return the total for this list
void gncInvoiceSortEntries(GncInvoice *invoice)
Call this function when an Entry is changed and you want to re-sort the list of entries.
time64 gncEntryGetDate(const GncEntry *entry)
DEPRECATED - use gncEntryGetDateGDate() instead! (Because the time-of-day is a misleading extra infor...
#define PWARN(format, args...)
Log a warning.
char * gnc_get_account_name_for_register(const Account *account)
Get either the full name of the account or the simple name, depending on the configuration parameter ...
Account handling public routines.
gnc_numeric gnc_numeric_convert(gnc_numeric n, gint64 denom, gint how)
Change the denominator of a gnc_numeric value to the specified denominator under standard arguments '...
void qof_query_destroy(QofQuery *query)
Frees the resources associate with a Query object.
The ComboCell object implements a cell handler with a "combination-box" pull-down menu in it...
GncEntry * gnc_entry_ledger_get_current_entry(GncEntryLedger *ledger)
Returns the Entry where the cursor is currently located.
void gncEntryComputeValue(gnc_numeric qty, gnc_numeric price, const GncTaxTable *tax_table, gboolean tax_included, gnc_numeric discount, GncAmountType discount_type, GncDiscountHow discount_how, int SCU, gnc_numeric *value, gnc_numeric *discount_value, GList **tax_values)
Compute the Entry value, tax_value, and discount_value, based on the quantity, price, discount, tax_-table, and types.
Income accounts are used to denote income.
Account * gnc_account_lookup_by_code(const Account *parent, const char *code)
The gnc_account_lookup_by_code() subroutine works like gnc_account_lookup_by_name, but uses the account code.
The PriceCell object implements a cell handler that stores a single double-precision value...
void gnc_combo_cell_add_menu_item(ComboCell *cell, const char *menustr)
Add a menu item to the list.
VirtualCell * gnc_table_get_virtual_cell(Table *table, VirtualCellLocation vcell_loc)
returns the virtual cell associated with a particular virtual location.
#define CURSOR_HEADER
Standard Cursor Names.
void gnc_entry_ledger_set_default_order(GncEntryLedger *ledger, GncOrder *order)
Set the default order for this ledger.
void qof_query_set_book(QofQuery *query, QofBook *book)
Set the book to be searched.
void gnc_combo_cell_set_strict(ComboCell *cell, gboolean strict)
Determines whether the cell will accept strings not in the menu.
#define gncInvoiceGetGUID(x)
deprecated functions
GDate gncEntryGetDateGDate(const GncEntry *entry)
Returns the day of this entry.
void gnc_table_set_vcell(Table *table, CellBlock *cursor, gconstpointer vcell_data, gboolean visible, gboolean start_primary_color, VirtualCellLocation vcell_loc)
Indicate what handler should be used for a given virtual block.
QofQuery * qof_query_merge(QofQuery *q1, QofQuery *q2, QofQueryOp op)
Combine two queries together using the Boolean set (logical) operator 'op'.
void gncEntrySetDateGDate(GncEntry *entry, const GDate *date)
Set the date of this entry.
void gncAccountValueDestroy(GList *list)
Destroy a list of accountvalues.
asset (and liability) accounts indicate generic, generalized accounts that are none of the above...
void qof_query_add_guid_match(QofQuery *q, QofQueryParamList *param_list, const GncGUID *guid, QofQueryOp op)
DOCUMENT ME !!
Account * gnc_account_lookup_for_register(const Account *base_account, const char *name)
Retrieve the account matching the given name starting from the descendants of base_account.
unsigned int visible
Used by higher-level code.
void gnc_entry_ledger_destroy(GncEntryLedger *ledger)
Destroy the GncEntry Ledger.
gboolean qof_book_is_readonly(const QofBook *book)
Return whether the book is read only.
liability (and asset) accounts indicate generic, generalized accounts that are none of the above...
Account * gnc_ui_new_accounts_from_name_with_defaults(GtkWindow *parent, const char *name, GList *valid_types, const gnc_commodity *default_commodity, Account *parent_acct)
Display a modal window for creating a new account.
const GncGUID * guid_null(void)
Returns a GncGUID which is guaranteed to never reference any entity.
gboolean xaccAccountGetPlaceholder(const Account *acc)
Get the "placeholder" flag for an account.
void gnc_entry_ledger_set_default_invoice(GncEntryLedger *ledger, GncInvoice *invoice)
Set the default invoice for this ledger.
Round to the nearest integer, rounding away from zero when there are two equidistant nearest integers...
time64 gnc_time(time64 *tbuf)
get the current time
The CheckboxCell object implements a cell handler that will toggle between yes and no values when cli...
Table * gnc_entry_ledger_get_table(GncEntryLedger *ledger)
Get the Table.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
void qof_query_add_boolean_match(QofQuery *q, QofQueryParamList *param_list, gboolean value, QofQueryOp op)
Handy-dandy convenience routines, avoids having to create a separate predicate for boolean matches...
Business Entry Interface.
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 ...
The type used to store guids in C.
GncEntry * gnc_entry_ledger_get_blank_entry(GncEntryLedger *ledger)
Exported Functions.
gnc_numeric gnc_price_cell_get_value(PriceCell *cell)
return the value of a price cell
void gnc_table_move_cursor(Table *table, VirtualLocation new_virt_loc)
will move the cursor (but not the cursor GUI) to the indicated location.
gboolean gnc_entry_ledger_commit_entry(GncEntryLedger *ledger)
This will act just like hitting 'return' to record an entry.
modtime is the internal date of the last modtime See libgnucash/engine/TaxTableBillTermImmutability.txt for an explanation of the following Code that handles refcount, parent, child, invisible and children is identical to that in ::GncBillTerm
void gnc_combo_cell_set_autosize(ComboCell *cell, gboolean autosize)
Determines whether the popup list autosizes itself or uses all available space.
The Credit card account is used to denote credit (e.g.
GDate * gnc_g_date_new_today()
Returns a newly allocated date of the current clock time, taken from time(2).