27 #include <glib/gi18n.h> 35 #include "completioncell.h" 36 #include "gnc-component-manager.h" 39 #include "gnc-gui-query.h" 46 #include "engine-helpers.h" 52 static QofLogModule log_module = GNC_MOD_LEDGER;
55 static void gnc_split_register_load_xfer_cells (SplitRegister* reg,
59 gnc_split_register_load_recn_cells (SplitRegister* reg)
67 gnc_table_layout_get_cell (reg->table->layout, RECN_CELL);
71 s = gnc_get_reconcile_valid_flags();
73 gnc_recn_cell_set_flag_order (cell, gnc_get_reconcile_flag_order());
74 gnc_recn_cell_set_string_getter (cell, gnc_get_reconcile_str);
78 gnc_split_register_load_doclink_cells (SplitRegister* reg)
86 gnc_table_layout_get_cell (reg->table->layout, DOCLINK_CELL);
95 gnc_doclink_cell_set_read_only (cell, TRUE);
99 gnc_split_register_load_type_cells (SplitRegister* reg)
106 gnc_table_layout_get_cell (reg->table->layout, TYPE_CELL);
112 gnc_recn_cell_set_flag_order (cell,
"IP");
113 gnc_recn_cell_set_read_only (cell, TRUE);
117 gnc_split_register_load_desc_cells (SplitRegister* reg)
124 gnc_table_layout_get_cell (reg->table->layout, DESC_CELL);
194 gnc_split_register_add_transaction (SplitRegister* reg,
199 gboolean visible_splits,
200 gboolean start_primary_color,
202 Transaction* find_trans,
206 VirtualCellLocation* vcell_loc)
210 g_return_if_fail (reg);
211 g_return_if_fail (vcell_loc);
213 if (split == find_split)
214 *new_split_row = vcell_loc->virt_row;
218 TRUE, start_primary_color, *vcell_loc);
219 vcell_loc->virt_row++;
225 Split* secondary = node->data;
227 if (!xaccTransStillHasSplit (trans, secondary))
continue;
228 if (secondary == find_split && find_class == CURSOR_CLASS_SPLIT)
229 *new_split_row = vcell_loc->virt_row;
233 visible_splits, TRUE, *vcell_loc);
234 vcell_loc->virt_row++;
240 if (find_trans == trans && find_split == NULL &&
241 find_class == CURSOR_CLASS_SPLIT)
242 *new_split_row = vcell_loc->virt_row;
245 FALSE, TRUE, *vcell_loc);
246 vcell_loc->virt_row++;
251 _find_split_with_parent_txn (gconstpointer a, gconstpointer b)
253 Split* split = (Split*)a;
254 Transaction* txn = (Transaction*)b;
260 add_quickfill_completions (TableLayout* layout, Transaction* trans,
261 Split* split, gboolean has_last_num)
263 gnc_quickfill_cell_add_completion (
264 (
QuickFillCell*) gnc_table_layout_get_cell (layout, NOTES_CELL),
268 gnc_num_cell_set_last_num (
269 (
NumCell*) gnc_table_layout_get_cell (layout, NUM_CELL),
270 gnc_get_num_action (trans, split));
275 gnc_quickfill_cell_add_completion (
276 (
QuickFillCell*) gnc_table_layout_get_cell (layout, MEMO_CELL),
282 create_blank_split (
Account* default_account, SRInfo* info)
284 Transaction* new_trans;
285 gboolean currency_from_account = TRUE;
286 Split* blank_split = NULL;
292 ¤cy_from_account);
294 if (default_account != NULL && !currency_from_account)
297 gnc_info_dialog (NULL,
"%s",
298 _ (
"Could not determine the account currency. " 299 "Using the default currency provided by your system."));
302 gnc_suspend_gui_refresh();
310 xaccSplitSetParent (blank_split, new_trans);
320 info->blank_split_edited = FALSE;
321 info->auto_complete = FALSE;
322 DEBUG (
"created new blank_split=%p", blank_split);
324 gnc_resume_gui_refresh();
329 change_account_separator (SRInfo* info, Table*
table, SplitRegister* reg)
331 info->separator_changed = FALSE;
335 (
ComboCell*) gnc_table_layout_get_cell (
table->layout, MXFRM_CELL),
336 gnc_get_account_separator());
339 (
ComboCell*) gnc_table_layout_get_cell (
table->layout, XFRM_CELL),
340 gnc_get_account_separator());
343 gnc_recn_cell_set_confirm_cb (
344 (
RecnCell*) gnc_table_layout_get_cell (
table->layout, RECN_CELL),
345 gnc_split_register_recn_cell_confirm, reg);
349 update_info (SRInfo* info, SplitRegister* reg)
354 info->cursor_hint_trans_split =
356 info->cursor_hint_cursor_class =
359 if (!info->first_pass && !info->quickfill_setup)
360 info->quickfill_setup = TRUE;
362 info->hint_set_by_traverse = FALSE;
363 info->traverse_to_new = FALSE;
364 info->exact_traversal = FALSE;
365 info->first_pass = FALSE;
366 info->reg_loaded = TRUE;
370 add_completions_from_pre_filter_slist (TableLayout* layout, GList *pre_filter_slist,
371 gboolean first_pass, gboolean quickfill_setup,
372 gboolean has_last_num)
376 for (node = pre_filter_slist; node; node = node->next)
378 Split *split = node->data;
385 if (!first_pass && !quickfill_setup)
386 add_quickfill_completions (layout, trans, split, has_last_num);
392 GList* pre_filter_slist,
Account* default_account)
395 Transaction* pending_trans;
396 CursorBuffer* cursor_buffer;
397 GHashTable* trans_table = NULL;
401 Transaction* blank_trans;
402 Transaction* find_trans;
405 Split* find_trans_split;
411 gnc_commodity *account_comm = NULL;
413 gboolean start_primary_color = TRUE;
414 gboolean found_pending = FALSE;
415 gboolean need_divider_upper = FALSE;
416 gboolean found_divider_upper = FALSE;
417 gboolean found_divider = FALSE;
418 gboolean has_last_num = FALSE;
421 gboolean we_own_slist = FALSE;
423 gnc_get_current_book());
425 GNC_PREFS_GROUP_GENERAL_REGISTER,
426 GNC_PREF_FUTURE_AFTER_BLANK);
427 gboolean added_blank_trans = FALSE;
429 VirtualCellLocation vcell_loc;
430 VirtualLocation save_loc;
432 int new_trans_split_row = -1;
433 int new_trans_row = -1;
434 int new_split_row = -1;
435 time64 present, autoreadonly_time = 0;
437 g_return_if_fail (reg);
439 g_return_if_fail (
table);
440 info = gnc_split_register_get_info (reg);
441 g_return_if_fail (info);
443 ENTER (
"reg=%p, slist=%p, default_account=%p", reg, slist, default_account);
446 gnc_get_current_book());
449 gnc_get_current_book());
459 ((
PriceCell*) gnc_table_layout_get_cell (
table->layout, DEBT_CELL),
460 gnc_commodity_print_info (account_comm, FALSE));
463 ((
PriceCell*) gnc_table_layout_get_cell (
table->layout, CRED_CELL),
464 gnc_commodity_print_info (account_comm, FALSE));
467 ((
PriceCell*) gnc_table_layout_get_cell (reg->table->layout, PRIC_CELL),
468 gnc_commodity_print_info (account_comm, FALSE));
471 if (info->first_pass)
473 gnc_doclink_cell_set_use_glyphs
478 if (blank_split == NULL)
483 g_assert (pending_trans == NULL);
484 blank_split = create_blank_split (default_account, info);
488 DEBUG (
"blank_split=%p, blank_trans=%p, pending_trans=%p",
489 blank_split, blank_trans, pending_trans);
495 multi_line = (reg->style == REG_STYLE_JOURNAL);
496 dynamic = (reg->style == REG_STYLE_AUTO_LEDGER);
498 lead_cursor = gnc_split_register_get_passive_cursor (reg);
499 split_cursor = gnc_table_layout_get_cursor (
table->layout, CURSOR_SPLIT);
502 if (info->traverse_to_new)
504 find_trans = blank_trans;
506 find_trans_split = blank_split;
507 find_class = CURSOR_CLASS_SPLIT;
511 find_trans = info->cursor_hint_trans;
512 find_split = info->cursor_hint_split;
513 find_trans_split = info->cursor_hint_trans_split;
514 find_class = info->cursor_hint_cursor_class;
517 save_loc =
table->current_cursor_loc;
521 if (gnc_table_current_cursor_changed (
table, TRUE) &&
524 cursor_buffer = gnc_cursor_buffer_new();
525 gnc_table_save_current_cursor (
table, cursor_buffer);
528 cursor_buffer = NULL;
532 gnc_table_control_allow_move (
table->control, FALSE);
536 VirtualLocation virt_loc;
538 gnc_virtual_location_init (&virt_loc);
543 vcell_loc.virt_row = 0;
544 vcell_loc.virt_col = 0;
547 vcell_loc.virt_row++;
551 if (use_autoreadonly)
559 if (info->first_pass)
569 cell = (
NumCell*) gnc_table_layout_get_cell (
table->layout, NUM_CELL);
570 gnc_num_cell_set_last_num (cell, last_num);
576 gnc_split_register_load_xfer_cells (reg, default_account);
577 gnc_split_register_load_desc_cells (reg);
578 gnc_split_register_load_doclink_cells (reg);
579 gnc_split_register_load_recn_cells (reg);
580 gnc_split_register_load_type_cells (reg);
583 if (info->separator_changed)
584 change_account_separator (info,
table, reg);
586 table->model->dividing_row_upper = -1;
587 table->model->dividing_row = -1;
588 table->model->dividing_row_lower = -1;
592 if (pending_trans != NULL)
596 Split* pending_split = (Split*)node->data;
597 if (!xaccTransStillHasSplit (pending_trans, pending_split))
continue;
598 if (g_list_find (slist, pending_split) != NULL)
601 if (g_list_find_custom (slist, pending_trans,
602 _find_split_with_parent_txn) != NULL)
608 slist = g_list_copy (slist);
611 slist = g_list_append (slist, pending_split);
616 trans_table = g_hash_table_new (g_direct_hash, g_direct_equal);
619 if (
table->model->reverse_sort && !future_after_blank)
621 if (blank_trans == find_trans)
622 new_trans_row = vcell_loc.virt_row;
624 if (blank_split == find_trans_split)
625 new_trans_split_row = vcell_loc.virt_row;
628 if (info->first_pass)
630 save_loc.vcell_loc = vcell_loc;
631 save_loc.phys_row_offset = 0;
632 save_loc.phys_col_offset = 0;
636 table->model->blank_trans_row = vcell_loc.virt_row;
638 gnc_split_register_add_transaction (reg,
639 blank_trans, blank_split,
640 lead_cursor, split_cursor,
641 multi_line, start_primary_color,
642 info->blank_split_edited,
643 find_trans, find_split,
644 find_class, &new_split_row,
648 start_primary_color = !start_primary_color;
650 added_blank_trans = TRUE;
653 gnc_completion_cell_clear_menu (
654 (
CompletionCell*) gnc_table_layout_get_cell (reg->table->layout, DESC_CELL));
657 (
CompletionCell*) gnc_table_layout_get_cell (reg->table->layout, DESC_CELL),
658 table->model->reverse_sort);
660 if (!info->first_pass && pre_filter_slist)
662 add_completions_from_pre_filter_slist (reg->table->layout, pre_filter_slist,
663 info->first_pass, info->quickfill_setup,
668 for (node = slist; node; node = node->next)
673 if (!xaccTransStillHasSplit (trans, split))
676 if (pending_trans == trans)
677 found_pending = TRUE;
687 if (trans == blank_trans)
693 if (g_hash_table_lookup (trans_table, trans))
696 g_hash_table_insert (trans_table, trans, trans);
699 if (info->show_present_divider &&
701 !found_divider_upper)
706 table->model->dividing_row_upper = vcell_loc.virt_row;
707 found_divider_upper = TRUE;
711 need_divider_upper = TRUE;
715 if (info->show_present_divider && !found_divider &&
719 gint count_blank_splits = 1;
720 gint virt_row_offset = 2;
721 gboolean show_lower_divider = FALSE;
723 if (
table->model->reverse_sort)
727 if (count_blank_splits > 1)
728 count_blank_splits ++;
730 if (
table->model->reverse_sort && future_after_blank)
734 if ((
table->model->reverse_sort && vcell_loc.virt_row != count_blank_splits + virt_row_offset) ||
735 !
table->model->reverse_sort)
737 table->model->dividing_row = vcell_loc.virt_row;
738 show_lower_divider = TRUE;
741 found_divider = TRUE;
743 if (future_after_blank)
745 if (blank_trans == find_trans)
746 new_trans_row = vcell_loc.virt_row;
748 if (blank_split == find_trans_split)
749 new_trans_split_row = vcell_loc.virt_row;
752 if (info->first_pass)
754 save_loc.vcell_loc = vcell_loc;
755 save_loc.phys_row_offset = 0;
756 save_loc.phys_col_offset = 0;
760 table->model->blank_trans_row = vcell_loc.virt_row;
762 gnc_split_register_add_transaction (reg,
763 blank_trans, blank_split,
764 lead_cursor, split_cursor,
765 multi_line, start_primary_color,
766 info->blank_split_edited,
767 find_trans, find_split,
768 find_class, &new_split_row,
772 if (show_lower_divider)
773 table->model->dividing_row_lower = vcell_loc.virt_row;
776 start_primary_color = !start_primary_color;
778 added_blank_trans = TRUE;
784 if (!info->first_pass && !pre_filter_slist && !info->quickfill_setup)
785 add_quickfill_completions (reg->table->layout, trans, split, has_last_num);
787 if (!info->first_pass && !pre_filter_slist)
790 (
CompletionCell*) gnc_table_layout_get_cell (reg->table->layout, DESC_CELL),
794 if (trans == find_trans)
795 new_trans_row = vcell_loc.virt_row;
797 if (split == find_trans_split)
798 new_trans_split_row = vcell_loc.virt_row;
800 gnc_split_register_add_transaction (reg, trans, split,
801 lead_cursor, split_cursor,
802 multi_line, start_primary_color,
804 find_trans, find_split, find_class,
805 &new_split_row, &vcell_loc);
808 start_primary_color = !start_primary_color;
812 g_hash_table_destroy (trans_table);
815 if (pending_trans == blank_trans)
816 found_pending = TRUE;
819 if (info->show_present_divider &&
821 !found_divider_upper && need_divider_upper)
823 table->model->dividing_row_upper = vcell_loc.virt_row;
833 else if (pending_trans)
834 g_assert_not_reached();
836 pending_trans = NULL;
839 if (!added_blank_trans)
841 if (blank_trans == find_trans)
842 new_trans_row = vcell_loc.virt_row;
844 if (blank_split == find_trans_split)
845 new_trans_split_row = vcell_loc.virt_row;
848 if (info->first_pass)
850 save_loc.vcell_loc = vcell_loc;
851 save_loc.phys_row_offset = 0;
852 save_loc.phys_col_offset = 0;
856 table->model->blank_trans_row = vcell_loc.virt_row;
858 gnc_split_register_add_transaction (reg, blank_trans, blank_split,
859 lead_cursor, split_cursor,
860 multi_line, start_primary_color,
861 info->blank_split_edited,
862 find_trans, find_split,
863 find_class, &new_split_row,
866 if (future_after_blank)
868 table->model->dividing_row_lower = vcell_loc.virt_row;
873 if (info->first_pass)
876 new_trans_split_row = -1;
886 VirtualLocation trans_split_loc;
888 if (new_split_row > 0)
889 save_loc.vcell_loc.virt_row = new_split_row;
890 else if (new_trans_split_row > 0)
891 save_loc.vcell_loc.virt_row = new_trans_split_row;
892 else if (new_trans_row > 0)
893 save_loc.vcell_loc.virt_row = new_trans_row;
895 trans_split_loc = save_loc;
897 gnc_split_register_get_trans_split (reg, save_loc.vcell_loc,
898 &trans_split_loc.vcell_loc);
900 if (dynamic || multi_line || info->trans_expanded)
903 table, trans_split_loc.vcell_loc,
904 gnc_split_register_get_active_cursor (reg));
908 info->trans_expanded = (reg->style == REG_STYLE_LEDGER);
912 save_loc = trans_split_loc;
913 info->trans_expanded = FALSE;
919 new_split_row = save_loc.vcell_loc.virt_row;
922 gnc_table_restore_current_cursor (
table, cursor_buffer);
925 gnc_cursor_buffer_destroy (cursor_buffer);
926 cursor_buffer = NULL;
928 update_info (info, reg);
930 gnc_split_register_set_cell_fractions (
936 if (
table->model->reverse_sort)
938 VirtualCellLocation vc_loc;
941 gnc_split_register_show_trans (reg, vc_loc);
944 gnc_split_register_show_trans (reg,
table->current_cursor_loc.vcell_loc);
947 gnc_table_control_allow_move (
table->control, TRUE);
957 #define QKEY "split_reg_shared_quickfill" 960 skip_cb (
Account* account, gpointer x)
970 gnc_split_register_load_xfer_cells (SplitRegister* reg,
Account* base_account)
980 root = gnc_get_current_root_account();
985 store = gnc_get_shared_account_name_list_store (root, QKEY, skip_cb, NULL);
988 gnc_table_layout_get_cell (reg->table->layout, XFRM_CELL);
990 gnc_combo_cell_use_list_store_cache (cell, store);
993 gnc_table_layout_get_cell (reg->table->layout, MXFRM_CELL);
995 gnc_combo_cell_use_list_store_cache (cell, store);
CursorClass gnc_split_register_get_current_cursor_class(SplitRegister *reg)
Returns the class of a register's current cursor.
Split * gnc_split_register_get_current_trans_split(SplitRegister *reg, VirtualCellLocation *trans_split_loc)
Gets the anchoring split of the transaction at the current cursor location, which may be on the trans...
void gnc_recn_cell_set_valid_flags(RecnCell *cell, const char *flags, char default_flag)
note that chars is copied into the RecnCell directly, but remains the "property" of the caller...
The RecnCell object implements a cell handler that will cycle through a series of single-character va...
Transaction * xaccMallocTransaction(QofBook *book)
The xaccMallocTransaction() will malloc memory and initialize it.
The CompletionCell object implements a cell handler with a "combination-box" pull-down menu in it...
const char * xaccAccountGetLastNum(const Account *acc)
Get the last num field of an Account.
void xaccTransSetDatePostedSecsNormalized(Transaction *trans, time64 time)
This function sets the posted date of the transaction, specified by a time64 (see ctime(3))...
time64 xaccTransGetDate(const Transaction *trans)
Retrieve the posted date of the transaction.
void gnc_completion_cell_reverse_sort(CompletionCell *cell, gboolean is_reversed)
Register the sort direction.
void gnc_completion_cell_set_sort_enabled(CompletionCell *cell, gboolean enabled)
Enable sorting of the menu item's contents.
gboolean xaccTransIsOpen(const Transaction *trans)
The xaccTransIsOpen() method returns TRUE if the transaction is open for editing. ...
utility functions for the GnuCash UI
The QuickFillCell implements a text cell with quick-fill capabilities.
void gnc_split_register_set_trans_visible(SplitRegister *reg, VirtualCellLocation vcell_loc, gboolean visible, gboolean only_blank_split)
Set the visibility of the split rows belonging to a transaction located at vcell_loc.
Transaction * gnc_split_register_get_current_trans(SplitRegister *reg)
Gets the transaction at the current cursor location, which may be on the transaction itself or on any...
#define DEBUG(format, args...)
Print a debugging message.
Create an account-name quick-fill.
void gnc_table_move_cursor_gui(Table *table, VirtualLocation new_virt_loc)
will move the cursor and its GUI to the indicated location.
gboolean gnc_table_find_close_valid_cell(Table *table, VirtualLocation *virt_loc, gboolean exact_pointer)
Find a close valid cell.
void gnc_table_set_size(Table *table, int virt_rows, int virt_cols)
The gnc_table_set_size() method will resize the table to the indicated dimensions.
Transaction * xaccSplitGetParent(const Split *split)
Returns the parent transaction of the split.
The Doclinkcell object implements a cell handler that will cycle through a series of single-character...
void gnc_split_register_load(SplitRegister *reg, GList *slist, GList *pre_filter_slist, Account *default_account)
Populates the rows of a register.
#define ENTER(format, args...)
Print a function entry debugging message.
void gnc_combo_cell_set_complete_char(ComboCell *cell, gunichar complete_char)
Sets a character used for special completion processing.
QuickFill * gnc_get_shared_account_name_quickfill(Account *root, const char *key, AccountBoolCB cb, gpointer cb_data)
Create/fetch a quickfill of account names.
void xaccTransSetCurrency(Transaction *trans, gnc_commodity *curr)
Set a new currency on a transaction.
gnc_commodity * gnc_default_currency(void)
Return the default currency set by the user.
const char * xaccTransGetNotes(const Transaction *trans)
Gets the transaction Notes.
Transaction * xaccTransLookup(const GncGUID *guid, QofBook *book)
The xaccTransLookup() subroutine will return the transaction associated with the given id...
int xaccTransCountSplits(const Transaction *trans)
Returns the number of splits in this transaction.
#define xaccAccountGetGUID(X)
GDate * qof_book_get_autoreadonly_gdate(const QofBook *book)
Returns the GDate that is the threshold for auto-read-only.
Split * xaccSplitLookup(const GncGUID *guid, QofBook *book)
The xaccSplitLookup() subroutine will return the split associated with the given id, or NULL if there is no such split.
void gnc_table_refresh_gui(Table *table, gboolean do_scroll)
Refresh the whole GUI from the table.
Account handling public routines.
The ComboCell object implements a cell handler with a "combination-box" pull-down menu in it...
void gnc_doclink_cell_set_valid_flags(Doclinkcell *cell, const char *flags, char default_flag)
note that
CursorClass
Types of cursors.
The PriceCell object implements a cell handler that stores a single double-precision value...
const char * gnc_get_doclink_flag_order(void)
Get a string containing document link flag order.
#define CURSOR_HEADER
Standard Cursor Names.
private declarations for SplitRegister
const char * xaccTransGetDescription(const Transaction *trans)
Gets the transaction Description.
time64 gdate_to_time64(GDate d)
Turns a GDate into a time64, returning the first second of the day.
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.
void xaccTransCommitEdit(Transaction *trans)
The xaccTransCommitEdit() method indicates that the changes to the transaction and its splits are com...
#define xaccSplitGetGUID(X)
void xaccTransBeginEdit(Transaction *trans)
The xaccTransBeginEdit() method must be called before any changes are made to a transaction or any of...
API for checkbook register display area.
gnc_commodity * gnc_account_get_currency_or_parent(const Account *account)
Returns a gnc_commodity that is a currency, suitable for being a Transaction's currency.
Split * xaccMallocSplit(QofBook *book)
Constructor.
Generic api to store and retrieve preferences.
void gnc_completion_cell_add_menu_item(CompletionCell *cell, const char *menustr)
Add a menu item to the hash table list.
gnc_commodity * gnc_account_or_default_currency(const Account *account, gboolean *currency_from_account_found)
Returns a gnc_commodity that is a currency, suitable for being a Transaction's currency.
The NumCell object implements a number handling cell.
void gnc_price_cell_set_print_info(PriceCell *cell, GNCPrintAmountInfo print_info)
set the printing context of the price cell
Account * xaccSplitGetAccount(const Split *split)
Returns the account of this split, which was set through xaccAccountInsertSplit().
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_table_set_virt_cell_cursor(Table *table, VirtualCellLocation vcell_loc, CellBlock *cursor)
Set the cellblock handler for a virtual cell.
time64 gnc_time64_get_today_end(void)
The gnc_time64_get_today_end() routine returns a time64 value corresponding to the last second of tod...
gboolean gnc_prefs_get_bool(const gchar *group, const gchar *pref_name)
Get a boolean value from the preferences backend.
#define LEAVE(format, args...)
Print a function exit debugging message.
void gnc_combo_cell_use_quickfill_cache(ComboCell *cell, QuickFill *shared_qf)
Tell the combocell to use a shared QuickFill object.
const char * gnc_get_doclink_str(char link_flag)
Get a string representing the document link type.
const char * xaccSplitGetMemo(const Split *split)
Returns the memo string.
gint64 time64
Most systems that are currently maintained, including Microsoft Windows, BSD-derived Unixes and Linux...
const char * gnc_get_doclink_valid_flags(void)
Get a string containing documentation link valid flags.
gboolean qof_book_uses_autoreadonly(const QofBook *book)
Returns TRUE if the auto-read-only feature should be used, otherwise FALSE.
Account * gnc_account_get_root(Account *acc)
This routine returns the root account of the account tree that the specified account belongs to...
API for Transactions and Splits (journal entries)
Split * gnc_split_register_get_current_split(SplitRegister *reg)
Returns the split at which the cursor is currently located.
SplitList * xaccTransGetSplitList(const Transaction *trans)
The xaccTransGetSplitList() method returns a GList of the splits in a transaction.