r23046 - gnucash/trunk/src - Register (old+new): Duplicated transactions need a DateEntered as well.
Christian Stimming
cstim at code.gnucash.org
Sun Jun 9 17:39:34 EDT 2013
Author: cstim
Date: 2013-06-09 17:39:34 -0400 (Sun, 09 Jun 2013)
New Revision: 23046
Trac: http://svn.gnucash.org/trac/changeset/23046
Modified:
gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.c
gnucash/trunk/src/gnome/gnc-split-reg.c
gnucash/trunk/src/register/ledger-core/split-register.c
Log:
Register (old+new): Duplicated transactions need a DateEntered as well.
Modified: gnucash/trunk/src/gnome/gnc-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-split-reg.c 2013-06-09 21:33:19 UTC (rev 23045)
+++ gnucash/trunk/src/gnome/gnc-split-reg.c 2013-06-09 21:39:34 UTC (rev 23046)
@@ -1453,6 +1453,9 @@
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);
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.c 2013-06-09 21:33:19 UTC (rev 23045)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.c 2013-06-09 21:39:34 UTC (rev 23046)
@@ -1352,6 +1352,10 @@
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);
Modified: gnucash/trunk/src/register/ledger-core/split-register.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register.c 2013-06-09 21:33:19 UTC (rev 23045)
+++ gnucash/trunk/src/register/ledger-core/split-register.c 2013-06-09 21:39:34 UTC (rev 23046)
@@ -634,6 +634,10 @@
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)
More information about the gnucash-changes
mailing list