summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-01-30 19:28:07 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-01-30 19:28:07 -0400
commit676e7bcf4fd9e2130c2f2ab62656a858bfd4bd0d (patch)
tree21e74e27b5f31234630368ab3eaea6dc0d8d9e9f /src
parent040255a52b48251dc54bd18e37acc58f858f287a (diff)
downloadfork-ledger-676e7bcf4fd9e2130c2f2ab62656a858bfd4bd0d.tar.gz
fork-ledger-676e7bcf4fd9e2130c2f2ab62656a858bfd4bd0d.tar.bz2
fork-ledger-676e7bcf4fd9e2130c2f2ab62656a858bfd4bd0d.zip
Added debug code under the category "entry.extend".
Diffstat (limited to 'src')
-rw-r--r--src/entry.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/entry.cc b/src/entry.cc
index 6a85bacd..09e2647a 100644
--- a/src/entry.cc
+++ b/src/entry.cc
@@ -358,6 +358,27 @@ void auto_entry_t::extend_entry(entry_base_t& entry, bool post)
amt = xact->amount;
}
+ IF_DEBUG("entry.extend") {
+ DEBUG("entry.extend",
+ "Initial xact on line " << initial_xact->beg_line << ": "
+ << "amount " << initial_xact->amount << " (precision "
+ << initial_xact->amount.precision() << ")");
+
+ if (initial_xact->amount.keep_precision())
+ DEBUG("entry.extend", " precision is kept");
+
+ DEBUG("entry.extend",
+ "Transaction on line " << xact->beg_line << ": "
+ << "amount " << xact->amount << ", amt " << amt
+ << " (precision " << xact->amount.precision()
+ << " != " << amt.precision() << ")");
+
+ if (xact->amount.keep_precision())
+ DEBUG("entry.extend", " precision is kept");
+ if (amt.keep_precision())
+ DEBUG("entry.extend", " amt precision is kept");
+ }
+
account_t * account = xact->account;
string fullname = account->fullname();
assert(! fullname.empty());