From 676e7bcf4fd9e2130c2f2ab62656a858bfd4bd0d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 30 Jan 2009 19:28:07 -0400 Subject: [PATCH] Added debug code under the category "entry.extend". --- src/entry.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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());