Implement idea from Mike Alexander (in #346063) to key lot scrubbing

off the environment variable GNC_AUTO_SCRUB_LOTS instead of commenting
it out of the code.  This make it easier for developers to test/users
to try lot scrubbing.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15791 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton
2007-04-04 04:58:07 +00:00
parent 09f8e28a83
commit 8c332ae13b
3 changed files with 10 additions and 5 deletions

View File

@@ -1021,7 +1021,8 @@ xaccTransCommitEdit (Transaction *trans)
/* Get the cap gains into a consistent state as well. */
/* Lot Scrubbing is temporarily disabled. */
//xaccTransScrubGains (trans, NULL);
if (g_getenv("GNC_AUTO_SCRUB_LOTS") != NULL)
xaccTransScrubGains (trans, NULL);
/* Allow scrubbing in transaction commit again */
scrub_data = 1;

View File

@@ -1165,7 +1165,8 @@ gnc_plugin_page_account_tree_cmd_scrub (GtkAction *action, GncPluginPageAccountT
xaccAccountScrubImbalance (account);
// XXX: Lots are disabled
//xaccAccountScrubLots (account);
if (g_getenv("GNC_AUTO_SCRUB_LOTS") != NULL)
xaccAccountScrubLots(account);
gnc_resume_gui_refresh ();
}
@@ -1183,7 +1184,8 @@ gnc_plugin_page_account_tree_cmd_scrub_sub (GtkAction *action, GncPluginPageAcco
xaccAccountTreeScrubImbalance (account);
// XXX: Lots are disabled
//xaccAccountTreeScrubLots (account);
if (g_getenv("GNC_AUTO_SCRUB_LOTS") != NULL)
xaccAccountTreeScrubLots(account);
gnc_resume_gui_refresh ();
}
@@ -1198,7 +1200,8 @@ gnc_plugin_page_account_tree_cmd_scrub_all (GtkAction *action, GncPluginPageAcco
xaccAccountTreeScrubOrphans (root);
xaccAccountTreeScrubImbalance (root);
// XXX: Lots are disabled
// xaccAccountTreeScrubLots (root);
if (g_getenv("GNC_AUTO_SCRUB_LOTS") != NULL)
xaccAccountTreeScrubLots(root);
gnc_resume_gui_refresh ();
}

View File

@@ -1229,7 +1229,8 @@ gnc_recn_scrub_cb(GtkAction *action, gpointer data)
xaccAccountTreeScrubImbalance (account);
// XXX: Lots are disabled.
//xaccAccountTreeScrubLots (account);
if (g_getenv("GNC_AUTO_SCRUB_LOTS") != NULL)
xaccAccountTreeScrubLots(account);
gnc_resume_gui_refresh ();
}