mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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;
|
||||
|
||||
@@ -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 ();
|
||||
}
|
||||
|
||||
@@ -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 ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user