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); }