(related_transactions::flush): Handle the case where an auto_entry or
period_entry passes through the related_transactions handler.
This commit is contained in:
parent
3b112af362
commit
46302362dd
1 changed files with 21 additions and 8 deletions
17
walk.cc
17
walk.cc
|
|
@ -210,10 +210,11 @@ void collapse_transactions::operator()(transaction_t& xact)
|
||||||
|
|
||||||
void related_transactions::flush()
|
void related_transactions::flush()
|
||||||
{
|
{
|
||||||
if (transactions.size() > 0)
|
if (transactions.size() > 0) {
|
||||||
for (transactions_list::iterator i = transactions.begin();
|
for (transactions_list::iterator i = transactions.begin();
|
||||||
i != transactions.end();
|
i != transactions.end();
|
||||||
i++)
|
i++) {
|
||||||
|
if ((*i)->entry) {
|
||||||
for (transactions_list::iterator j = (*i)->entry->transactions.begin();
|
for (transactions_list::iterator j = (*i)->entry->transactions.begin();
|
||||||
j != (*i)->entry->transactions.end();
|
j != (*i)->entry->transactions.end();
|
||||||
j++) {
|
j++) {
|
||||||
|
|
@ -226,6 +227,18 @@ void related_transactions::flush()
|
||||||
item_handler<transaction_t>::operator()(**j);
|
item_handler<transaction_t>::operator()(**j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
transaction_xdata_t& xdata = transaction_xdata(**i);
|
||||||
|
if (! (xdata.dflags & TRANSACTION_HANDLED) &&
|
||||||
|
(! (xdata.dflags & TRANSACTION_RECEIVED) ?
|
||||||
|
! ((*i)->flags & (TRANSACTION_AUTO | TRANSACTION_VIRTUAL)) :
|
||||||
|
also_matching)) {
|
||||||
|
xdata.dflags |= TRANSACTION_HANDLED;
|
||||||
|
item_handler<transaction_t>::operator()(**i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
item_handler<transaction_t>::flush();
|
item_handler<transaction_t>::flush();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue