Corrected a transient display order flaw
This was harmless, but affected the testability of results.
This commit is contained in:
parent
9f4307accd
commit
af94c94a6f
1 changed files with 10 additions and 1 deletions
11
src/xact.cc
11
src/xact.cc
|
|
@ -325,9 +325,18 @@ bool xact_base_t::finalize()
|
|||
DEBUG("xact.finalize", "there was a null posting");
|
||||
|
||||
if (balance.is_balance()) {
|
||||
bool first = true;
|
||||
const balance_t& bal(balance.as_balance());
|
||||
typedef std::map<string, amount_t> sorted_amounts_map;
|
||||
sorted_amounts_map samp;
|
||||
foreach (const balance_t::amounts_map::value_type& pair, bal.amounts) {
|
||||
std::pair<sorted_amounts_map::iterator, bool> result =
|
||||
samp.insert(sorted_amounts_map::value_type(pair.first->mapping_key(),
|
||||
pair.second));
|
||||
assert(result.second);
|
||||
}
|
||||
|
||||
bool first = true;
|
||||
foreach (sorted_amounts_map::value_type& pair, samp) {
|
||||
if (first) {
|
||||
null_post->amount = pair.second.negated();
|
||||
null_post->add_flags(POST_CALCULATED);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue