r17739 - gnucash/branches/2.2/src/gnome-utils - [r17731] Bug #137017: Add flag to book-closing transactions to distinguish them from manually entered ones.

Christian Stimming cstim at cvs.gnucash.org
Thu Nov 27 06:18:34 EST 2008


Author: cstim
Date: 2008-11-27 06:18:33 -0500 (Thu, 27 Nov 2008)
New Revision: 17739
Trac: http://svn.gnucash.org/trac/changeset/17739

Modified:
   gnucash/branches/2.2/src/gnome-utils/dialog-book-close.c
Log:
[r17731] Bug #137017: Add flag to book-closing transactions to distinguish them from manually entered ones.

This seems to be a prerequisite for fixing the timezone issues discussed
in #137017 and references therein.

Modified: gnucash/branches/2.2/src/gnome-utils/dialog-book-close.c
===================================================================
--- gnucash/branches/2.2/src/gnome-utils/dialog-book-close.c	2008-11-27 11:18:24 UTC (rev 17738)
+++ gnucash/branches/2.2/src/gnome-utils/dialog-book-close.c	2008-11-27 11:18:33 UTC (rev 17739)
@@ -94,6 +94,7 @@
   txn = g_hash_table_lookup(cacb->txns, cmdty);
   if (!txn)
   {
+    kvp_frame* frame;
     txn = g_new0(struct CACBTransactionList, 1);
     txn->cmdty = cmdty;
     txn->total = gnc_numeric_zero();
@@ -103,6 +104,11 @@
     xaccTransSetDatePostedSecs(txn->txn, cacb->cbw->close_date);
     xaccTransSetDescription(txn->txn, cacb->cbw->desc);
     xaccTransSetCurrency(txn->txn, cmdty);
+    frame = xaccTransGetSlots(txn->txn);
+    /* Add a bool flag to indicate this txn was created automatically
+       by the book closing feature. See
+       https://lists.gnucash.org/pipermail/gnucash-devel/2008-August/023757.html */
+    kvp_frame_set_gint64(frame, "book_closing", 1);
 
     g_hash_table_insert(cacb->txns, cmdty, txn);
   }



More information about the gnucash-changes mailing list