summaryrefslogtreecommitdiff
path: root/src/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-09 17:40:47 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-09 17:40:47 -0400
commit5419e74378134d34894c8f25d54e8a28482ff5a8 (patch)
treedb0a1964cd68c47a53f16b7c76b46ea4727aa390 /src/textual.cc
parentd2453088c461c6fde7542c591616eb42f93e15cf (diff)
parentd83e2f34874c46833143e7c1981ca707f88c16ab (diff)
downloadfork-ledger-5419e74378134d34894c8f25d54e8a28482ff5a8.tar.gz
fork-ledger-5419e74378134d34894c8f25d54e8a28482ff5a8.tar.bz2
fork-ledger-5419e74378134d34894c8f25d54e8a28482ff5a8.zip
Merge branch 'master' into v2.7a
Diffstat (limited to 'src/textual.cc')
-rw-r--r--src/textual.cc19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/textual.cc b/src/textual.cc
index e46ae22a..f10125ea 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -304,19 +304,6 @@ xact_t * parse_xact(char * line, account_t * account, entry_t * entry = NULL)
parse_assign:
if (entry != NULL) {
- // Add this amount to the related account now
-
- account_t::xdata_t& xdata(xact->account->xdata());
-
- if (! xact->amount.is_null()) {
- if (xdata.value.is_null())
- xdata.value = xact->amount;
- else
- xdata.value += xact->amount;
- DEBUG("ledger.textual.parse", "line " << linenum << ": " <<
- "XACT assign: account total = " << xdata.value);
- }
-
// Parse the optional assigned (= AMOUNT)
if (in.good() && ! in.eof()) {
@@ -349,6 +336,11 @@ xact_t * parse_xact(char * line, account_t * account, entry_t * entry = NULL)
// jww (2008-08-02): Save total_expr somewhere!
+ account_t::xdata_t& xdata(xact->account->xdata());
+
+ DEBUG("ledger.xact.assign", "account balance = " << xdata.value);
+ DEBUG("ledger.xact.assign", "xact amount = " << amt);
+
amount_t diff;
if (xdata.value.is_amount()) {
diff = amt - xdata.value.as_amount();
@@ -367,6 +359,7 @@ xact_t * parse_xact(char * line, account_t * account, entry_t * entry = NULL)
diff = amt;
}
+ DEBUG("ledger.xact.assign", "diff = " << diff);
DEBUG("ledger.textual.parse", "line " << linenum << ": " <<
"XACT assign: diff = " << diff);