AUDIT: r16848 - gnucash/trunk/src/gnome-utils - If you close the books on the same day twice don't insert double txns.
Derek Atkins
warlord at cvs.gnucash.org
Tue Jan 8 23:18:29 EST 2008
Author: warlord
Date: 2008-01-08 23:18:29 -0500 (Tue, 08 Jan 2008)
New Revision: 16848
Trac: http://svn.gnucash.org/trac/changeset/16848
Modified:
gnucash/trunk/src/gnome-utils/dialog-book-close.c
Log:
If you close the books on the same day twice don't insert double txns.
The BalanceAsOf() API checks <, not <=, so just add one to the time.
Should be backported only if the rest of the book closing is backported, so:
BP
Modified: gnucash/trunk/src/gnome-utils/dialog-book-close.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-book-close.c 2008-01-08 21:53:47 UTC (rev 16847)
+++ gnucash/trunk/src/gnome-utils/dialog-book-close.c 2008-01-09 04:18:29 UTC (rev 16848)
@@ -125,7 +125,7 @@
if (cacb->acct_type != xaccAccountGetType(a))
return;
- bal = xaccAccountGetBalanceAsOfDate(a, cacb->cbw->close_date);
+ bal = xaccAccountGetBalanceAsOfDate(a, cacb->cbw->close_date+1);
if (gnc_numeric_zero_p(bal))
return;
More information about the gnucash-changes
mailing list