mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Don't show duplicate transactions in journal mode.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3205 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
a46cc74491
commit
1d4b894356
@ -3588,6 +3588,7 @@ xaccSRLoadRegister (SplitRegister *reg, Split **slist,
|
|||||||
Split *blank_split = xaccSplitLookup(&info->blank_split_guid);
|
Split *blank_split = xaccSplitLookup(&info->blank_split_guid);
|
||||||
Transaction *pending_trans = xaccTransLookup(&info->pending_trans_guid);
|
Transaction *pending_trans = xaccTransLookup(&info->pending_trans_guid);
|
||||||
SplitRegisterBuffer *reg_buffer;
|
SplitRegisterBuffer *reg_buffer;
|
||||||
|
GHashTable *trans_table = NULL;
|
||||||
CellBlock *lead_cursor;
|
CellBlock *lead_cursor;
|
||||||
Transaction *find_trans;
|
Transaction *find_trans;
|
||||||
Transaction *trans;
|
Transaction *trans;
|
||||||
@ -3698,6 +3699,9 @@ xaccSRLoadRegister (SplitRegister *reg, Split **slist,
|
|||||||
|
|
||||||
table->dividing_row = -1;
|
table->dividing_row = -1;
|
||||||
|
|
||||||
|
if (multi_line)
|
||||||
|
trans_table = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||||
|
|
||||||
/* populate the table */
|
/* populate the table */
|
||||||
if (slist)
|
if (slist)
|
||||||
split = slist[0];
|
split = slist[0];
|
||||||
@ -3715,6 +3719,13 @@ xaccSRLoadRegister (SplitRegister *reg, Split **slist,
|
|||||||
if (split == blank_split)
|
if (split == blank_split)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (multi_line)
|
||||||
|
{
|
||||||
|
if (g_hash_table_lookup (trans_table, trans))
|
||||||
|
continue;
|
||||||
|
g_hash_table_insert (trans_table, trans, trans);
|
||||||
|
}
|
||||||
|
|
||||||
if (info->show_present_divider &&
|
if (info->show_present_divider &&
|
||||||
!found_divider &&
|
!found_divider &&
|
||||||
(present < xaccTransGetDate (trans)))
|
(present < xaccTransGetDate (trans)))
|
||||||
@ -3756,6 +3767,9 @@ xaccSRLoadRegister (SplitRegister *reg, Split **slist,
|
|||||||
start_primary_color = !start_primary_color;
|
start_primary_color = !start_primary_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (multi_line)
|
||||||
|
g_hash_table_destroy (trans_table);
|
||||||
|
|
||||||
/* add the blank split at the end. */
|
/* add the blank split at the end. */
|
||||||
split = blank_split;
|
split = blank_split;
|
||||||
trans = xaccSplitGetParent (split);
|
trans = xaccSplitGetParent (split);
|
||||||
|
Loading…
Reference in New Issue
Block a user