fixed a bug with interval reporting

This commit is contained in:
John Wiegley 2004-09-23 19:17:21 -04:00
parent e742633cf1
commit 8a7cee24c8
2 changed files with 5 additions and 3 deletions

View file

@ -138,6 +138,8 @@ void collapse_transactions::report_cumulative_subtotal()
handle_value(result, &totals_account, last_entry, 0, xact_temps, handler); handle_value(result, &totals_account, last_entry, 0, xact_temps, handler);
} }
last_entry = NULL;
last_xact = NULL;
subtotal = 0; subtotal = 0;
count = 0; count = 0;
} }

2
walk.h
View file

@ -273,7 +273,7 @@ class collapse_transactions : public item_handler<transaction_t>
// If we've reached a new entry, report on the subtotal // If we've reached a new entry, report on the subtotal
// accumulated thus far. // accumulated thus far.
if (last_entry && last_entry != xact.entry) if (last_entry && last_entry != xact.entry && count > 0)
report_cumulative_subtotal(); report_cumulative_subtotal();
add_transaction_to(xact, subtotal); add_transaction_to(xact, subtotal);