mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Mike Alexander's patch to fix lot date calculation, and to include all
splits when computing capital gain's instead of just the opening lot. Scrub lots when scrubbing everything else. Some MacOs X fixes. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13872 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1014,6 +1014,8 @@ xaccTransCommitEdit (Transaction *trans)
|
||||
*/
|
||||
if (!(trans->inst.do_free) && scrub_data &&
|
||||
!qof_book_shutting_down(xaccTransGetBook(trans))) {
|
||||
/* If scrubbing gains recurses through here, don't call it again. */
|
||||
scrub_data = 0;
|
||||
/* The total value of the transaction should sum to zero.
|
||||
* Call the trans scrub routine to fix it. Indirectly, this
|
||||
* routine also performs a number of other transaction fixes too.
|
||||
@@ -1021,6 +1023,8 @@ xaccTransCommitEdit (Transaction *trans)
|
||||
xaccTransScrubImbalance (trans, NULL, NULL);
|
||||
/* Get the cap gains into a consistent state as well. */
|
||||
xaccTransScrubGains (trans, NULL);
|
||||
/* Allow scrubbing in transaction commit again */
|
||||
scrub_data = 1;
|
||||
}
|
||||
|
||||
/* Record the time of last modification */
|
||||
|
||||
Reference in New Issue
Block a user