mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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
This commit is contained in:
parent
ca2aa589d5
commit
4b28001459
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user