Bug 798680 - Not able to match a reverse transaction of a...

previously matched transaction.

Cloned transactions and copied splits shouldn't keep the online-id
slot.
This commit is contained in:
John Ralls 2022-12-13 13:13:13 -08:00
parent 598a6f1b6b
commit 73a134730f
2 changed files with 5 additions and 0 deletions

View File

@ -624,6 +624,8 @@ void
xaccSplitCopyKvp (const Split *from, Split *to)
{
qof_instance_copy_kvp (QOF_INSTANCE (to), QOF_INSTANCE (from));
/* But not the online-id */
qof_instance_set (QOF_INSTANCE (to), "online-id", NULL, NULL);
}
/*################## Added for Reg2 #################*/

View File

@ -693,6 +693,9 @@ xaccTransClone (const Transaction *from)
xaccTransBeginEdit (to);
qof_instance_copy_kvp (QOF_INSTANCE (to), QOF_INSTANCE (from));
/* But not the online-id! */
qof_instance_set (QOF_INSTANCE (to), "online-id", NULL, NULL);
for (GList* lfrom = from->splits, *lto = to->splits; lfrom && lto;
lfrom = g_list_next (lfrom), lto = g_list_next (lto))
xaccSplitCopyKvp (lfrom->data, lto->data);