Register (old+new): Duplicated transactions need a DateEntered as well.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23046 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2013-06-09 21:39:34 +00:00
parent 85749ec058
commit bae4862575
3 changed files with 11 additions and 0 deletions

View File

@ -1352,6 +1352,10 @@ gnc_tree_control_split_reg_duplicate_current (GncTreeViewSplitReg *view)
xaccTransSetDatePostedSecsNormalized (new_trans, date);
/* We also must set a new DateEntered on the new entry
* because otherwise the ordering is not deterministic */
xaccTransSetDateEnteredSecs(new_trans, gnc_time(NULL));
/* set per book option */
gnc_set_num_action (new_trans, NULL, out_num, out_tnum);

View File

@ -1453,6 +1453,9 @@ create_balancing_transaction(QofBook *book, Account *account,
xaccTransSetCurrency(trans, xaccAccountGetCommodity(account));
xaccTransSetDatePostedSecsNormalized(trans, statement_date);
xaccTransSetDescription(trans, _("Balancing entry from reconcilation"));
/* We also must set a new DateEntered on the new entry
* because otherwise the ordering is not deterministic */
xaccTransSetDateEnteredSecs(trans, gnc_time(NULL));
// 1. Split
split = xaccMallocSplit(book);

View File

@ -634,6 +634,10 @@ gnc_split_register_duplicate_current (SplitRegister *reg)
xaccTransBeginEdit (new_trans);
gnc_copy_trans_onto_trans (trans, new_trans, FALSE, FALSE);
xaccTransSetDatePostedSecsNormalized (new_trans, date);
/* We also must set a new DateEntered on the new entry
* because otherwise the ordering is not deterministic */
xaccTransSetDateEnteredSecs(new_trans, gnc_time(NULL));
/* set per book option */
gnc_set_num_action (new_trans, NULL, out_num, out_tnum);
if (!reg->use_tran_num_for_num_field)