summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-09-19 08:08:15 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-09-19 08:08:15 -0400
commite85a52b72bc55d2a5ca1498b165269e09aeb2dac (patch)
tree3ad493d7f4f027ef1eb43e92e26bd28a0e4af11d /src
parent1c2944d8294a6bc25f6429403787ba0a951254bf (diff)
downloadfork-ledger-e85a52b72bc55d2a5ca1498b165269e09aeb2dac.tar.gz
fork-ledger-e85a52b72bc55d2a5ca1498b165269e09aeb2dac.tar.bz2
fork-ledger-e85a52b72bc55d2a5ca1498b165269e09aeb2dac.zip
Modified a debug class code.
Diffstat (limited to 'src')
-rw-r--r--src/entry.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/entry.cc b/src/entry.cc
index 1d4473d4..5bb55b39 100644
--- a/src/entry.cc
+++ b/src/entry.cc
@@ -114,6 +114,7 @@ bool entry_base_t::finalize()
foreach (xact_t * xact, xacts) {
if (xact->must_balance()) {
amount_t& p(xact->cost ? *xact->cost : xact->amount);
+ DEBUG("entry.finalize", "xact must balance = " << p);
if (! p.is_null()) {
add_or_set_value(balance, p);
} else {
@@ -127,7 +128,7 @@ bool entry_base_t::finalize()
}
assert(balance.valid());
- DEBUG("ledger.journal.finalize", "initial balance = " << balance);
+ DEBUG("entry.finalize", "initial balance = " << balance);
// If there is only one xact, balance against the default account if
// one has been set.
@@ -238,23 +239,23 @@ bool entry_base_t::finalize()
if (! (xact->cost ||
! xact->must_balance() ||
x_amt.commodity() == comm)) {
- DEBUG("ledger.journal.finalize", "before operation 1 = " << balance);
+ DEBUG("entry.finalize", "before operation 1 = " << balance);
balance -= x_amt;
- DEBUG("ledger.journal.finalize", "after operation 1 = " << balance);
- DEBUG("ledger.journal.finalize", "x_amt = " << x_amt);
- DEBUG("ledger.journal.finalize", "per_unit_cost = " << per_unit_cost);
+ DEBUG("entry.finalize", "after operation 1 = " << balance);
+ DEBUG("entry.finalize", "x_amt = " << x_amt);
+ DEBUG("entry.finalize", "per_unit_cost = " << per_unit_cost);
xact->cost = per_unit_cost * x_amt;
- DEBUG("ledger.journal.finalize", "*xact->cost = " << *xact->cost);
+ DEBUG("entry.finalize", "*xact->cost = " << *xact->cost);
balance += *xact->cost;
- DEBUG("ledger.journal.finalize", "after operation 2 = " << balance);
+ DEBUG("entry.finalize", "after operation 2 = " << balance);
}
}
}
- DEBUG("ledger.journal.finalize", "resolved balance = " << balance);
+ DEBUG("entry.finalize", "resolved balance = " << balance);
}
// Now that the xact list has its final form, calculate the balance
@@ -302,7 +303,7 @@ bool entry_base_t::finalize()
}
}
- DEBUG("ledger.journal.finalize", "final balance = " << balance);
+ DEBUG("entry.finalize", "final balance = " << balance);
// (if (value-zerop balance)
// (prog1