mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 122895 - general ledger should be named journal
This commit is contained in:
parent
51ebdcc51e
commit
8f717691b7
@ -28,7 +28,7 @@ Main Scheduled Transaction todo list
|
||||
X create a template register
|
||||
X store account and amount data in kvp_frames.
|
||||
. find a way to list multiple registers for template transaction purposes.
|
||||
. this is a "normal" general ledger + a "stock" general ledger
|
||||
. this is a "normal" general journal + a "stock" general journal
|
||||
. warlord's business stuff may extend this to more ledgers...
|
||||
. this is going to be: a tabbed notebook in which the tabs contain
|
||||
the number of transactions the GL they hold contain.
|
||||
|
@ -146,7 +146,7 @@ balances, transfer accounts, etc. The register is where the cells,
|
||||
cursor and table get put together into a unified whole. The register
|
||||
defines specific, actual layouts and widths of the date, price, etc.
|
||||
cells in a table. It includes a table header, and defines more than
|
||||
ten specific layouts: bank, credit-card, stock, general ledger, etc.
|
||||
ten specific layouts: bank, credit-card, stock, general journal, etc.
|
||||
|
||||
The split register implementation is divided into two components. The
|
||||
first component (src/register/splitreg.[ch]) defines the basic structure
|
||||
|
@ -81,7 +81,7 @@ typedef struct _SchedXaction SchedXaction;
|
||||
* . copying the fields of the template
|
||||
* . setting the date to the calculated "due" date.
|
||||
*
|
||||
* We should be able to use the GeneralLedger [or, yet-another-subtype
|
||||
* We should be able to use the GeneralJournal [or, yet-another-subtype
|
||||
* of the internal ledger] for this editing.
|
||||
**/
|
||||
struct _SchedXaction
|
||||
|
@ -310,7 +310,7 @@ where the Commit() routine triggers the actual update of the SQL database.
|
||||
|
||||
Note: 'Commit' is sometimes called 'post' in other systems: The
|
||||
act of 'commiting' a transaction is the same as 'posting' the
|
||||
transaction to the general ledger.
|
||||
transaction to the general journal.
|
||||
|
||||
Some important implementation details to understand: the GUI currently
|
||||
uses begin/end as a convenience, and thus, may hold a transaction in
|
||||
|
@ -2120,7 +2120,7 @@ gnc_tree_control_split_reg_paste_trans (GncTreeViewSplitReg *view)
|
||||
|
||||
window = gnc_tree_view_split_reg_get_parent (view);
|
||||
gnc_error_dialog (window, "%s",
|
||||
_("You can not paste from the general ledger to a register."));
|
||||
_("You can not paste from the general journal to a register."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1088,7 +1088,7 @@ gnc_tree_model_split_reg_update_query (GncTreeModelSplitReg *model, Query *query
|
||||
}
|
||||
|
||||
//FIXME Not sure why I need to do this, refresh / sort change segfaults on gl
|
||||
if (model->priv->display_gl == TRUE && model->type == GENERAL_LEDGER2)
|
||||
if (model->priv->display_gl == TRUE && model->type == GENERAL_JOURNAL2)
|
||||
{
|
||||
gnc_tm_get_today_start(&tm);
|
||||
tm.tm_mon--; /* Default the register to the last month's worth of transactions. */
|
||||
@ -2647,7 +2647,7 @@ gnc_tree_model_split_reg_commit_blank_split (GncTreeModelSplitReg *model)
|
||||
}
|
||||
|
||||
|
||||
/* Update the display sub account and general ledger settings */
|
||||
/* Update the display sub account and general journal settings */
|
||||
void
|
||||
gnc_tree_model_split_reg_set_display (GncTreeModelSplitReg *model, gboolean subacc, gboolean gl)
|
||||
{
|
||||
@ -2952,7 +2952,7 @@ gnc_tree_model_split_reg_update_action_list (GncTreeModelSplitReg *model)
|
||||
gtk_list_store_insert_with_values (store, &iter, 100, 0, _("Buy"), -1);
|
||||
gtk_list_store_insert_with_values (store, &iter, 100, 0, _("Sell"), -1);
|
||||
break;
|
||||
case GENERAL_LEDGER2:
|
||||
case GENERAL_JOURNAL2:
|
||||
case EQUITY_REGISTER2:
|
||||
gtk_list_store_insert_with_values (store, &iter, 100, 0, _("Buy"), -1);
|
||||
gtk_list_store_insert_with_values (store, &iter, 100, 0, _("Sell"), -1);
|
||||
|
@ -70,7 +70,7 @@ typedef enum
|
||||
TRADING_REGISTER2, //12
|
||||
NUM_SINGLE_REGISTER_TYPES2, //13
|
||||
|
||||
GENERAL_LEDGER2 = NUM_SINGLE_REGISTER_TYPES2, //13
|
||||
GENERAL_JOURNAL2 = NUM_SINGLE_REGISTER_TYPES2, //13
|
||||
INCOME_LEDGER2, //14
|
||||
PORTFOLIO_LEDGER2, //15
|
||||
SEARCH_LEDGER2, //16
|
||||
@ -233,7 +233,7 @@ Account * gnc_tree_model_split_reg_get_anchor (GncTreeModelSplitReg *model);
|
||||
/** Commit the blank split. */
|
||||
void gnc_tree_model_split_reg_commit_blank_split (GncTreeModelSplitReg *model);
|
||||
|
||||
/** Set display general ledger and show sub accounts. */
|
||||
/** Set display general journal and show sub accounts. */
|
||||
void gnc_tree_model_split_reg_set_display (GncTreeModelSplitReg *model, gboolean subacc, gboolean gl);
|
||||
|
||||
/** Change transactions in the tlist based on view movement. */
|
||||
|
@ -298,7 +298,7 @@ gnc_tree_util_split_reg_has_rate (GncTreeViewSplitReg *view)
|
||||
case EXPENSE_REGISTER2:
|
||||
case EQUITY_REGISTER2:
|
||||
case TRADING_REGISTER2:
|
||||
case GENERAL_LEDGER2:
|
||||
case GENERAL_JOURNAL2:
|
||||
case INCOME_LEDGER2:
|
||||
case SEARCH_LEDGER2:
|
||||
return TRUE;
|
||||
|
@ -661,7 +661,7 @@ gnc_tree_view_split_reg_get_colummn_list (GncTreeModelSplitReg *model)
|
||||
}
|
||||
break;
|
||||
|
||||
case GENERAL_LEDGER2:
|
||||
case GENERAL_JOURNAL2:
|
||||
{
|
||||
static ViewCol col_list[] = {
|
||||
COL_DATE, COL_NUMACT, COL_DESCNOTES, COL_TRANSFERVOID, COL_RECN,
|
||||
@ -1688,7 +1688,7 @@ gtv_sr_cdf0 (GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *s_mode
|
||||
{
|
||||
Account *acct = xaccSplitGetAccount (split);
|
||||
|
||||
// This will be all but the General Ledger which has anchor == NULL
|
||||
// This will be all but the General Journal which has anchor == NULL
|
||||
if ((xaccTransCountSplits (trans) == 0) && (anchor != NULL)) // First split on blank transaction
|
||||
acct = anchor;
|
||||
|
||||
@ -1703,7 +1703,7 @@ gtv_sr_cdf0 (GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *s_mode
|
||||
else
|
||||
string = g_strdup (" ");
|
||||
|
||||
if (anchor == acct && model->type != GENERAL_LEDGER2 && model->type != SEARCH_LEDGER2)
|
||||
if (anchor == acct && model->type != GENERAL_JOURNAL2 && model->type != SEARCH_LEDGER2)
|
||||
editable = FALSE;
|
||||
else
|
||||
editable = TRUE;
|
||||
@ -3098,7 +3098,7 @@ gtv_sr_titles (GncTreeViewSplitReg *view, RowDepth depth)
|
||||
gtk_tree_view_column_set_title (tvc, _("Bill"));
|
||||
break;
|
||||
|
||||
case GENERAL_LEDGER2:
|
||||
case GENERAL_JOURNAL2:
|
||||
if (depth == TRANS1 || depth == TRANS2 || depth == SPLIT3)
|
||||
gtk_tree_view_column_set_title (tvc, _("Funds Out"));
|
||||
break;
|
||||
@ -3179,7 +3179,7 @@ gtv_sr_titles (GncTreeViewSplitReg *view, RowDepth depth)
|
||||
gtk_tree_view_column_set_title (tvc, _("Payment"));
|
||||
break;
|
||||
|
||||
case GENERAL_LEDGER2:
|
||||
case GENERAL_JOURNAL2:
|
||||
if (depth == TRANS1 || depth == TRANS2 || depth == SPLIT3)
|
||||
gtk_tree_view_column_set_title (tvc, _("Funds In"));
|
||||
break;
|
||||
@ -5412,7 +5412,7 @@ gtv_sr_ed_key_press_cb (GtkWidget *widget, GdkEventKey *event, gpointer user_dat
|
||||
{
|
||||
gtk_tree_path_down (spath);
|
||||
|
||||
if (gtk_tree_view_row_expanded (GTK_TREE_VIEW (view), spath) && model->type == GENERAL_LEDGER2)
|
||||
if (gtk_tree_view_row_expanded (GTK_TREE_VIEW (view), spath) && model->type == GENERAL_JOURNAL2)
|
||||
{
|
||||
gtk_tree_path_down (spath);
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
; (gtk_accel_path "<Actions>/gnc-plugin-log-replay-actions/LogReplayAction" "")
|
||||
; (gtk_accel_path "<Actions>/gnc-plugin-business-actions/CustomerNewJobOpenAction" "")
|
||||
; (gtk_accel_path "<Actions>/MenuAdditions/PayableAgingAction" "")
|
||||
; (gtk_accel_path "<Actions>/MenuAdditions/GeneralLedgerAction" "")
|
||||
; (gtk_accel_path "<Actions>/MenuAdditions/GeneralJournalAction" "")
|
||||
; (gtk_accel_path "<Actions>/MainWindowActions/HelpTutorialAction" "")
|
||||
; (gtk_accel_path "<Actions>/gnc-plugin-basic-commands-actions/ActionsSinceLastRunAction" "")
|
||||
; (gtk_accel_path "<Actions>/gnc-plugin-business-actions/BusinessTestReloadOwnerAction" "")
|
||||
@ -97,7 +97,7 @@
|
||||
; (gtk_accel_path "<Actions>/MenuAdditions/BudgetProfitLossAction" "")
|
||||
; (gtk_accel_path "<Actions>/GncPluginPageRegisterActions/ScrubAllAction" "")
|
||||
; (gtk_accel_path "<Actions>/gnc-plugin-basic-commands-actions/ActionsMortgageLoanAction" "")
|
||||
; (gtk_accel_path "<Actions>/gnc-plugin-register-actions/ToolsGeneralLedgerAction" "")
|
||||
; (gtk_accel_path "<Actions>/gnc-plugin-register-actions/ToolsGeneralJournalAction" "")
|
||||
; (gtk_accel_path "<Actions>/GncPluginPageAccountTreeActions/EditDeleteAccountAction" "Delete")
|
||||
; (gtk_accel_path "<Actions>/MenuAdditions/VendorReportAction" "")
|
||||
; (gtk_accel_path "<Actions>/gnc-plugin-business-actions/CustomerFindCustomerOpenAction" "")
|
||||
|
@ -755,7 +755,7 @@ gnc_plugin_page_register_init (GncPluginPageRegister *plugin_page)
|
||||
parent = GNC_PLUGIN_PAGE(plugin_page);
|
||||
use_new = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_USE_NEW);
|
||||
g_object_set(G_OBJECT(plugin_page),
|
||||
"page-name", _("General Ledger"),
|
||||
"page-name", _("General Journal"),
|
||||
"page-uri", "default:",
|
||||
"ui-description", "gnc-plugin-page-register-ui.xml",
|
||||
"use-new-window", use_new,
|
||||
@ -1328,7 +1328,7 @@ gnc_plugin_page_register_save_page (GncPluginPage *plugin_page,
|
||||
g_key_file_set_string(key_file, group_name, KEY_ACCOUNT_NAME, name);
|
||||
g_free(name);
|
||||
}
|
||||
else if (reg->type == GENERAL_LEDGER)
|
||||
else if (reg->type == GENERAL_JOURNAL)
|
||||
{
|
||||
g_key_file_set_string(key_file, group_name, KEY_REGISTER_TYPE,
|
||||
LABEL_GL);
|
||||
@ -1603,9 +1603,9 @@ gnc_plugin_page_register_get_tab_name (GncPluginPage *plugin_page)
|
||||
case LD_GL:
|
||||
switch (reg->type)
|
||||
{
|
||||
case GENERAL_LEDGER:
|
||||
case GENERAL_JOURNAL:
|
||||
case INCOME_LEDGER:
|
||||
return g_strdup(_("General Ledger"));
|
||||
return g_strdup(_("General Journal"));
|
||||
case PORTFOLIO_LEDGER:
|
||||
return g_strdup(_("Portfolio"));
|
||||
case SEARCH_LEDGER:
|
||||
@ -2557,10 +2557,10 @@ gnc_reg_get_name (GNCLedgerDisplay *ledger, gboolean for_window)
|
||||
|
||||
switch (reg->type)
|
||||
{
|
||||
case GENERAL_LEDGER:
|
||||
case GENERAL_JOURNAL:
|
||||
case INCOME_LEDGER:
|
||||
if (for_window)
|
||||
reg_name = _("General Ledger");
|
||||
reg_name = _("General Journal");
|
||||
else
|
||||
reg_name = _("Transaction Report");
|
||||
break;
|
||||
@ -2639,7 +2639,7 @@ report_helper (GNCLedgerDisplay *ledger, Split *split, Query *query)
|
||||
arg = SCM_BOOL (reg->use_double_line);
|
||||
args = scm_cons (arg, args);
|
||||
|
||||
arg = SCM_BOOL (reg->type == GENERAL_LEDGER || reg->type == INCOME_LEDGER
|
||||
arg = SCM_BOOL (reg->type == GENERAL_JOURNAL || reg->type == INCOME_LEDGER
|
||||
|| reg->type == SEARCH_LEDGER);
|
||||
args = scm_cons (arg, args);
|
||||
|
||||
|
@ -102,7 +102,7 @@ GncPluginPage *
|
||||
gnc_plugin_page_register_new_ledger (GNCLedgerDisplay *ledger);
|
||||
|
||||
|
||||
/** Create a new "register" plugin page containing a general ledger.
|
||||
/** Create a new "register" plugin page containing a general journal.
|
||||
*
|
||||
* @return The newly created plugin page.
|
||||
*/
|
||||
|
@ -749,7 +749,7 @@ gnc_plugin_page_register2_init (GncPluginPageRegister2 *plugin_page)
|
||||
parent = GNC_PLUGIN_PAGE(plugin_page);
|
||||
use_new = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_USE_NEW);
|
||||
g_object_set(G_OBJECT(plugin_page),
|
||||
"page-name", _("General Ledger2"),
|
||||
"page-name", _("General Journal2"),
|
||||
"page-uri", "default:",
|
||||
"ui-description", "gnc-plugin-page-register2-ui.xml",
|
||||
"use-new-window", use_new,
|
||||
@ -1383,7 +1383,7 @@ gnc_plugin_page_register2_save_page (GncPluginPage *plugin_page,
|
||||
g_key_file_set_string (key_file, group_name, KEY_ACCOUNT_NAME, name);
|
||||
g_free (name);
|
||||
}
|
||||
else if (model->type == GENERAL_LEDGER2)
|
||||
else if (model->type == GENERAL_JOURNAL2)
|
||||
{
|
||||
g_key_file_set_string (key_file, group_name, KEY_REGISTER_TYPE,
|
||||
LABEL_GL);
|
||||
@ -1669,9 +1669,9 @@ gnc_plugin_page_register2_get_tab_name (GncPluginPage *plugin_page)
|
||||
case LD2_GL:
|
||||
switch (model->type)
|
||||
{
|
||||
case GENERAL_LEDGER:
|
||||
case GENERAL_JOURNAL:
|
||||
case INCOME_LEDGER:
|
||||
return g_strdup(_("General Ledger"));
|
||||
return g_strdup(_("General Journal"));
|
||||
case PORTFOLIO_LEDGER:
|
||||
return g_strdup(_("Portfolio"));
|
||||
case SEARCH_LEDGER:
|
||||
@ -2389,12 +2389,12 @@ gnc_reg_get_name (GNCLedgerDisplay2 *ledger, gboolean for_window) // this works
|
||||
|
||||
switch (model->type)
|
||||
{
|
||||
case GENERAL_LEDGER:
|
||||
case GENERAL_JOURNAL:
|
||||
case INCOME_LEDGER:
|
||||
if (for_window)
|
||||
reg_name = _("General Ledger");
|
||||
reg_name = _("General Journal");
|
||||
else
|
||||
reg_name = _("General Ledger Report");
|
||||
reg_name = _("General Journal Report");
|
||||
break;
|
||||
case PORTFOLIO_LEDGER:
|
||||
if (for_window)
|
||||
@ -2474,7 +2474,7 @@ report_helper (GNCLedgerDisplay2 *ledger, Split *split, Query *query) //this wor
|
||||
arg = SCM_BOOL (model->use_double_line);
|
||||
args = scm_cons (arg, args);
|
||||
|
||||
arg = SCM_BOOL (model->type == GENERAL_LEDGER2 || model->type == INCOME_LEDGER2
|
||||
arg = SCM_BOOL (model->type == GENERAL_JOURNAL2 || model->type == INCOME_LEDGER2
|
||||
|| model->type == SEARCH_LEDGER2);
|
||||
args = scm_cons (arg, args);
|
||||
|
||||
@ -3014,7 +3014,7 @@ gnc_plugin_page_register2_cmd_view_filter_by (GtkAction *action,
|
||||
if (priv->fd.save_filter == TRUE)
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||
|
||||
// General Ledgers can not save filters so disable button.
|
||||
// General Journals can not save filters so disable button.
|
||||
ledger_type = gnc_ledger_display2_type (priv->ledger);
|
||||
if (ledger_type == LD2_GL)
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (button), FALSE);
|
||||
|
@ -102,7 +102,7 @@ GncPluginPage *
|
||||
gnc_plugin_page_register2_new_ledger (GNCLedgerDisplay2 *ledger);
|
||||
|
||||
|
||||
/** Create a new "register" plugin page containing a general ledger.
|
||||
/** Create a new "register" plugin page containing a general journal.
|
||||
*
|
||||
* @return The newly created plugin page.
|
||||
*/
|
||||
|
@ -51,12 +51,12 @@ static GtkActionEntry gnc_plugin_actions [] =
|
||||
{
|
||||
{
|
||||
#ifdef REGISTER2_ENABLED
|
||||
"ToolsGeneralLedgerAction", NULL, N_("Old St_yle General Ledger"), NULL,
|
||||
N_("Open an old style general ledger window"),
|
||||
"ToolsGeneralJournalAction", NULL, N_("Old St_yle General Journal"), NULL,
|
||||
N_("Open an old style general journal window"),
|
||||
G_CALLBACK (gnc_plugin_register_cmd_general_ledger)
|
||||
#else
|
||||
"ToolsGeneralLedgerAction", NULL, N_("_General Ledger"), NULL,
|
||||
N_("Open general ledger window"),
|
||||
"ToolsGeneralJournalAction", NULL, N_("_General Journal"), NULL,
|
||||
N_("Open general journal window"),
|
||||
G_CALLBACK (gnc_plugin_register_cmd_general_ledger)
|
||||
#endif
|
||||
},
|
||||
|
@ -54,8 +54,8 @@ static GtkActionEntry gnc_plugin_actions [] =
|
||||
{
|
||||
#ifdef REGISTER2_ENABLED
|
||||
{
|
||||
"ToolsGeneralLedger2Action", NULL, N_("_General Ledger"), NULL,
|
||||
N_("Open a general ledger window"),
|
||||
"ToolsGeneralJournal2Action", NULL, N_("_General Journal"), NULL,
|
||||
N_("Open a general journal window"),
|
||||
G_CALLBACK (gnc_plugin_register2_cmd_general_ledger)
|
||||
},
|
||||
#endif
|
||||
|
@ -2110,7 +2110,7 @@ gnc_split_reg_get_placeholder( GNCSplitReg *gsr )
|
||||
|
||||
switch (reg->type)
|
||||
{
|
||||
case GENERAL_LEDGER:
|
||||
case GENERAL_JOURNAL:
|
||||
case INCOME_LEDGER:
|
||||
case PORTFOLIO_LEDGER:
|
||||
case SEARCH_LEDGER:
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "dialog-utils.h"
|
||||
|
||||
#define STATE_SECTION_REG_PREFIX "Register"
|
||||
#define STATE_SECTION_GEN_LEDGER "General Ledger"
|
||||
#define STATE_SECTION_GEN_JOURNAL "General Journal"
|
||||
|
||||
static QofLogModule log_module = GNC_MOD_GUI;
|
||||
|
||||
@ -259,8 +259,8 @@ gsr2_create_table (GNCSplitReg2 *gsr)
|
||||
|
||||
/* State_section is used to store per register state: column widths, sort order,... */
|
||||
ledger_type = gnc_ledger_display2_type (gsr->ledger);
|
||||
if (ledger_type == LD2_GL && model->type == GENERAL_LEDGER2)
|
||||
state_section = g_strdup (STATE_SECTION_GEN_LEDGER);
|
||||
if (ledger_type == LD2_GL && model->type == GENERAL_JOURNAL2)
|
||||
state_section = g_strdup (STATE_SECTION_GEN_JOURNAL);
|
||||
else if (ledger_type == LD2_SUBACCOUNT)
|
||||
{
|
||||
gchar guidstr[GUID_ENCODING_LENGTH+1];
|
||||
@ -322,7 +322,7 @@ gsr2_create_table (GNCSplitReg2 *gsr)
|
||||
|
||||
gnc_tree_view_configure_columns (GNC_TREE_VIEW (view));
|
||||
|
||||
if (ledger_type == LD2_GL && model->type == GENERAL_LEDGER2)
|
||||
if (ledger_type == LD2_GL && model->type == GENERAL_JOURNAL2)
|
||||
gnc_tree_view_set_show_column_menu (GNC_TREE_VIEW (view), TRUE);
|
||||
else
|
||||
gnc_tree_view_set_show_column_menu (GNC_TREE_VIEW (view), FALSE);
|
||||
@ -955,7 +955,7 @@ gnc_split_reg2_get_placeholder (GNCSplitReg2 *gsr)
|
||||
|
||||
switch (model->type)
|
||||
{
|
||||
case GENERAL_LEDGER2:
|
||||
case GENERAL_JOURNAL2:
|
||||
case INCOME_LEDGER2:
|
||||
case PORTFOLIO_LEDGER2:
|
||||
case SEARCH_LEDGER2:
|
||||
|
@ -2,7 +2,7 @@
|
||||
<menubar>
|
||||
<menu name="Tools" action="ToolsAction">
|
||||
<placeholder name="ToolsPlaceholder">
|
||||
<menuitem name="ToolsGeneralLedger" action="ToolsGeneralLedgerAction"/>
|
||||
<menuitem name="ToolsGeneralJournal" action="ToolsGeneralJournalAction"/>
|
||||
</placeholder>
|
||||
</menu>
|
||||
</menubar>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<menubar>
|
||||
<menu name="Tools" action="ToolsAction">
|
||||
<placeholder name="ToolsPlaceholder">
|
||||
<menuitem name="ToolsGeneralLedger2" action="ToolsGeneralLedger2Action"/>
|
||||
<menuitem name="ToolsGeneralJournal2" action="ToolsGeneralJournal2Action"/>
|
||||
</placeholder>
|
||||
</menu>
|
||||
|
||||
|
@ -405,7 +405,7 @@ gnc_plugin_ab_account_selected(GncPluginPage *plugin_page, Account *account,
|
||||
* current page is an "account tree" page, get the account corresponding to the
|
||||
* selected account. (What if multiple accounts are selected?) If the current
|
||||
* page is a "register" page, get the head account for the register. (Returns
|
||||
* NULL for a general ledger or search register.)
|
||||
* NULL for a general journal or search register.)
|
||||
*
|
||||
* @param window A pointer to a GncMainWindow object.
|
||||
* @return A pointer to an account, if one can be determined from the current
|
||||
|
@ -223,7 +223,7 @@ gnc_get_reg_type (Account *leader, GNCLedgerDisplayType ld_type)
|
||||
SplitRegisterType reg_type;
|
||||
|
||||
if (ld_type == LD_GL)
|
||||
return GENERAL_LEDGER;
|
||||
return GENERAL_JOURNAL;
|
||||
|
||||
account_type = xaccAccountGetType (leader);
|
||||
|
||||
@ -295,9 +295,9 @@ gnc_get_reg_type (Account *leader, GNCLedgerDisplayType ld_type)
|
||||
{
|
||||
/* If any of the sub-accounts have ACCT_TYPE_STOCK or
|
||||
* ACCT_TYPE_MUTUAL types, then we must use the PORTFOLIO_LEDGER
|
||||
* ledger. Otherwise, a plain old GENERAL_LEDGER will do. */
|
||||
* ledger. Otherwise, a plain old GENERAL_JOURNAL will do. */
|
||||
gpointer ret;
|
||||
reg_type = GENERAL_LEDGER;
|
||||
reg_type = GENERAL_JOURNAL;
|
||||
|
||||
ret = gnc_account_foreach_descendant_until(leader, look_for_portfolio_cb, NULL);
|
||||
if (ret) reg_type = PORTFOLIO_LEDGER;
|
||||
@ -317,12 +317,12 @@ gnc_get_reg_type (Account *leader, GNCLedgerDisplayType ld_type)
|
||||
|
||||
case ACCT_TYPE_EQUITY:
|
||||
case ACCT_TYPE_TRADING:
|
||||
reg_type = GENERAL_LEDGER;
|
||||
reg_type = GENERAL_JOURNAL;
|
||||
break;
|
||||
|
||||
default:
|
||||
PERR ("unknown account type:%d", account_type);
|
||||
reg_type = GENERAL_LEDGER;
|
||||
reg_type = GENERAL_JOURNAL;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -388,7 +388,7 @@ gnc_ledger_display_subaccounts (Account *account)
|
||||
return ld;
|
||||
}
|
||||
|
||||
/* Opens up a general ledger window. */
|
||||
/* Opens up a general journal window. */
|
||||
GNCLedgerDisplay *
|
||||
gnc_ledger_display_gl (void)
|
||||
{
|
||||
@ -429,7 +429,7 @@ gnc_ledger_display_gl (void)
|
||||
FALSE, 0,
|
||||
QOF_QUERY_AND);
|
||||
|
||||
ld = gnc_ledger_display_internal (NULL, query, LD_GL, GENERAL_LEDGER,
|
||||
ld = gnc_ledger_display_internal (NULL, query, LD_GL, GENERAL_JOURNAL,
|
||||
REG_STYLE_JOURNAL, FALSE, FALSE);
|
||||
LEAVE("%p", ld);
|
||||
return ld;
|
||||
@ -739,7 +739,7 @@ gnc_ledger_display_internal (Account *lead_account, Query *q,
|
||||
|
||||
if (!q)
|
||||
{
|
||||
PWARN ("general ledger with no query");
|
||||
PWARN ("general journal with no query");
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -84,7 +84,7 @@ GNCLedgerDisplay * gnc_ledger_display_simple (Account *account);
|
||||
* its children. */
|
||||
GNCLedgerDisplay * gnc_ledger_display_subaccounts (Account *account);
|
||||
|
||||
/* opens up a general ledger window */
|
||||
/* opens up a general journal window */
|
||||
GNCLedgerDisplay * gnc_ledger_display_gl (void);
|
||||
|
||||
/**
|
||||
@ -96,7 +96,7 @@ GNCLedgerDisplay * gnc_ledger_display_gl (void);
|
||||
**/
|
||||
GNCLedgerDisplay * gnc_ledger_display_template_gl (char *id);
|
||||
|
||||
/* display a general ledger for an arbitrary query */
|
||||
/* display a general journal for an arbitrary query */
|
||||
GNCLedgerDisplay * gnc_ledger_display_query (Query *query,
|
||||
SplitRegisterType type,
|
||||
SplitRegisterStyle style);
|
||||
|
@ -232,7 +232,7 @@ gnc_get_reg_type (Account *leader, GNCLedgerDisplay2Type ld_type)
|
||||
SplitRegisterType2 reg_type;
|
||||
|
||||
if (ld_type == LD2_GL)
|
||||
return GENERAL_LEDGER2;
|
||||
return GENERAL_JOURNAL2;
|
||||
|
||||
account_type = xaccAccountGetType (leader);
|
||||
|
||||
@ -304,9 +304,9 @@ gnc_get_reg_type (Account *leader, GNCLedgerDisplay2Type ld_type)
|
||||
{
|
||||
/* If any of the sub-accounts have ACCT_TYPE_STOCK or
|
||||
* ACCT_TYPE_MUTUAL types, then we must use the PORTFOLIO_LEDGER
|
||||
* ledger. Otherwise, a plain old GENERAL_LEDGER will do. */
|
||||
* ledger. Otherwise, a plain old GENERAL_JOURNAL will do. */
|
||||
gpointer ret;
|
||||
reg_type = GENERAL_LEDGER2;
|
||||
reg_type = GENERAL_JOURNAL2;
|
||||
|
||||
ret = gnc_account_foreach_descendant_until(leader, look_for_portfolio_cb, NULL);
|
||||
if (ret) reg_type = PORTFOLIO_LEDGER2;
|
||||
@ -326,12 +326,12 @@ gnc_get_reg_type (Account *leader, GNCLedgerDisplay2Type ld_type)
|
||||
|
||||
case ACCT_TYPE_EQUITY:
|
||||
case ACCT_TYPE_TRADING:
|
||||
reg_type = GENERAL_LEDGER2;
|
||||
reg_type = GENERAL_JOURNAL2;
|
||||
break;
|
||||
|
||||
default:
|
||||
PERR ("unknown account type:%d", account_type);
|
||||
reg_type = GENERAL_LEDGER2;
|
||||
reg_type = GENERAL_JOURNAL2;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -397,7 +397,7 @@ gnc_ledger_display2_subaccounts (Account *account)
|
||||
return ld;
|
||||
}
|
||||
|
||||
/* Opens up a general ledger window. */
|
||||
/* Opens up a general journal window. */
|
||||
GNCLedgerDisplay2 *
|
||||
gnc_ledger_display2_gl (void)
|
||||
{
|
||||
@ -438,7 +438,7 @@ gnc_ledger_display2_gl (void)
|
||||
FALSE, 0,
|
||||
QOF_QUERY_AND);
|
||||
|
||||
ld = gnc_ledger_display2_internal (NULL, query, LD2_GL, GENERAL_LEDGER2,
|
||||
ld = gnc_ledger_display2_internal (NULL, query, LD2_GL, GENERAL_JOURNAL2,
|
||||
REG2_STYLE_JOURNAL, FALSE, FALSE);
|
||||
LEAVE("%p", ld);
|
||||
return ld;
|
||||
@ -759,7 +759,7 @@ gnc_ledger_display2_internal (Account *lead_account, Query *q,
|
||||
|
||||
if (!q)
|
||||
{
|
||||
PWARN ("general ledger with no query");
|
||||
PWARN ("general journal with no query");
|
||||
}
|
||||
|
||||
is_gl = TRUE;
|
||||
@ -863,8 +863,8 @@ gnc_ledger_display2_find_by_query (Query *q)
|
||||
if (ledger_display)
|
||||
{
|
||||
model = ledger_display->model;
|
||||
// To get a new search page from a general ledger, search register is a LD2_GL also.
|
||||
if (model->type == GENERAL_LEDGER2)
|
||||
// To get a new search page from a general journal, search register is a LD2_GL also.
|
||||
if (model->type == GENERAL_JOURNAL2)
|
||||
ledger_display = NULL;
|
||||
}
|
||||
return ledger_display;
|
||||
|
@ -95,7 +95,7 @@ GNCLedgerDisplay2 * gnc_ledger_display2_simple (Account *account);
|
||||
* its children. */
|
||||
GNCLedgerDisplay2 * gnc_ledger_display2_subaccounts (Account *account);
|
||||
|
||||
/* opens up a general ledger window */
|
||||
/* opens up a general journal window */
|
||||
GNCLedgerDisplay2 * gnc_ledger_display2_gl (void);
|
||||
|
||||
/**
|
||||
@ -107,7 +107,7 @@ GNCLedgerDisplay2 * gnc_ledger_display2_gl (void);
|
||||
**/
|
||||
GNCLedgerDisplay2 * gnc_ledger_display2_template_gl (char *id);
|
||||
|
||||
/* display a general ledger for an arbitrary query */
|
||||
/* display a general journal for an arbitrary query */
|
||||
GNCLedgerDisplay2 * gnc_ledger_display2_query (Query *query,
|
||||
SplitRegisterType2 type,
|
||||
SplitRegisterStyle2 style);
|
||||
|
@ -263,7 +263,7 @@ gnc_split_register_set_cells (SplitRegister *reg, TableLayout *layout)
|
||||
|
||||
/* --------------------------------------------------------- */
|
||||
case INCOME_LEDGER:
|
||||
case GENERAL_LEDGER:
|
||||
case GENERAL_JOURNAL:
|
||||
case SEARCH_LEDGER:
|
||||
{
|
||||
curs = gnc_table_layout_get_cursor (layout,
|
||||
@ -556,7 +556,7 @@ gnc_split_register_layout_add_cursors (SplitRegister *reg,
|
||||
break;
|
||||
|
||||
case INCOME_LEDGER:
|
||||
case GENERAL_LEDGER:
|
||||
case GENERAL_JOURNAL:
|
||||
case SEARCH_LEDGER:
|
||||
if (reg->is_template)
|
||||
num_cols = 8;
|
||||
|
@ -77,7 +77,7 @@ gnc_split_register_get_rbaln (VirtualLocation virt_loc, gpointer user_data, gboo
|
||||
/* Get a list of accounts for matching */
|
||||
account = gnc_split_register_get_default_account(reg);
|
||||
if (!account)
|
||||
/* Register has no account (perhaps general ledger) so it has no
|
||||
/* Register has no account (perhaps general journal) so it has no
|
||||
well defined balance, return zero. */
|
||||
return balance;
|
||||
|
||||
@ -258,7 +258,7 @@ gnc_split_register_get_tran_num_label (VirtualLocation virt_loc,
|
||||
case RECEIVABLE_REGISTER:
|
||||
case PAYABLE_REGISTER:
|
||||
return _("T-Ref");
|
||||
case GENERAL_LEDGER:
|
||||
case GENERAL_JOURNAL:
|
||||
case INCOME_LEDGER:
|
||||
case SEARCH_LEDGER:
|
||||
{
|
||||
@ -1473,7 +1473,7 @@ get_trans_total_amount_subaccounts (SplitRegister *reg, Transaction *trans)
|
||||
/* Get a list of all subaccounts for matching */
|
||||
parent = gnc_split_register_get_default_account(reg);
|
||||
if (!parent)
|
||||
/* Register has no account, perhaps it's the general ledger. If it
|
||||
/* Register has no account, perhaps it's the general journal. If it
|
||||
has no account then we have no way of picking out the desired splits,
|
||||
return zero. */
|
||||
return total;
|
||||
@ -1509,7 +1509,7 @@ gnc_split_register_get_tdebcred_entry (VirtualLocation virt_loc,
|
||||
|
||||
switch (reg->type)
|
||||
{
|
||||
case GENERAL_LEDGER:
|
||||
case GENERAL_JOURNAL:
|
||||
case INCOME_LEDGER:
|
||||
total = get_trans_total_amount_subaccounts (reg, xaccSplitGetParent (split));
|
||||
break;
|
||||
@ -1551,7 +1551,7 @@ gnc_split_reg_has_rate_cell (SplitRegisterType type)
|
||||
case EXPENSE_REGISTER:
|
||||
case EQUITY_REGISTER:
|
||||
case TRADING_REGISTER:
|
||||
case GENERAL_LEDGER:
|
||||
case GENERAL_JOURNAL:
|
||||
case INCOME_LEDGER:
|
||||
case SEARCH_LEDGER:
|
||||
return TRUE;
|
||||
|
@ -2284,7 +2284,7 @@ gnc_split_register_type_to_account_type (SplitRegisterType sr_type)
|
||||
return ACCT_TYPE_CURRENCY;
|
||||
case TRADING_REGISTER:
|
||||
return ACCT_TYPE_TRADING;
|
||||
case GENERAL_LEDGER:
|
||||
case GENERAL_JOURNAL:
|
||||
return ACCT_TYPE_NONE;
|
||||
case EQUITY_REGISTER:
|
||||
return ACCT_TYPE_EQUITY;
|
||||
@ -2490,7 +2490,7 @@ gnc_split_register_config_action (SplitRegister *reg)
|
||||
gnc_combo_cell_add_menu_item (cell, _("Buy"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Sell"));
|
||||
break;
|
||||
case GENERAL_LEDGER:
|
||||
case GENERAL_JOURNAL:
|
||||
case EQUITY_REGISTER:
|
||||
gnc_combo_cell_add_menu_item (cell, _("Buy"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Sell"));
|
||||
|
@ -166,7 +166,7 @@ typedef enum
|
||||
TRADING_REGISTER,
|
||||
NUM_SINGLE_REGISTER_TYPES,
|
||||
|
||||
GENERAL_LEDGER = NUM_SINGLE_REGISTER_TYPES,
|
||||
GENERAL_JOURNAL = NUM_SINGLE_REGISTER_TYPES,
|
||||
INCOME_LEDGER,
|
||||
PORTFOLIO_LEDGER,
|
||||
SEARCH_LEDGER,
|
||||
|
@ -642,7 +642,7 @@
|
||||
;; ----------------------------------
|
||||
;; add the splits to the table
|
||||
;; ----------------------------------
|
||||
;; The general ledger has a split that doesn't have an account
|
||||
;; The general journal has a split that doesn't have an account
|
||||
;; set yet (the new entry transaction).
|
||||
;; This split should be skipped or the report errors out.
|
||||
;; See bug #639082
|
||||
|
@ -164,7 +164,7 @@
|
||||
'current
|
||||
(list (vector 'current
|
||||
(N_ "Current Trial Balance")
|
||||
(N_ "Uses the exact balances in the general ledger"))
|
||||
(N_ "Uses the exact balances in the general journal"))
|
||||
(vector 'pre-adj
|
||||
(N_ "Pre-adjustment Trial Balance")
|
||||
(N_ "Ignores Adjusting/Closing entries"))
|
||||
@ -474,7 +474,7 @@
|
||||
(define atb-col 2) ;; adjusted trial balance column
|
||||
(define is-col 3) ;; income statement column
|
||||
(define bs-col 4) ;; balance sheet column
|
||||
(define bal-col 5) ;; for the current (general ledger) balance
|
||||
(define bal-col 5) ;; for the current (general journal) balance
|
||||
|
||||
(define (report-val amt)
|
||||
(gnc:sum-collector-commodity
|
||||
|
Loading…
Reference in New Issue
Block a user