From 4b28001459d93e078a1dd729d41302eac049ab0c Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Thu, 27 Nov 2008 10:30:17 +0000 Subject: [PATCH] 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. BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17731 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome-utils/dialog-book-close.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gnome-utils/dialog-book-close.c b/src/gnome-utils/dialog-book-close.c index 72674dd16b..50fbdd5eca 100644 --- a/src/gnome-utils/dialog-book-close.c +++ b/src/gnome-utils/dialog-book-close.c @@ -94,6 +94,7 @@ find_or_create_txn(struct CloseAccountsCB* cacb, gnc_commodity* cmdty) 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 @@ find_or_create_txn(struct CloseAccountsCB* cacb, gnc_commodity* cmdty) 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); }