summaryrefslogtreecommitdiff
path: root/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-09 07:17:12 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-09 07:17:12 -0400
commitd83e2f34874c46833143e7c1981ca707f88c16ab (patch)
tree0b6b583c23c732059765a1b53589c215ce8831b1 /textual.cc
parentef0d32cd5d91966490694da97f36b023700d9787 (diff)
downloadledger-d83e2f34874c46833143e7c1981ca707f88c16ab.tar.gz
ledger-d83e2f34874c46833143e7c1981ca707f88c16ab.tar.bz2
ledger-d83e2f34874c46833143e7c1981ca707f88c16ab.zip
Was forced to hack the '=' transaction operator to get it to work. This
feature's implementation needs more work, so it's being pulled from 2.6.1 in order to be developed further.
Diffstat (limited to 'textual.cc')
-rw-r--r--textual.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/textual.cc b/textual.cc
index 9ac018fa..8daf4d6a 100644
--- a/textual.cc
+++ b/textual.cc
@@ -293,16 +293,6 @@ transaction_t * parse_transaction(char * line, account_t * account,
parse_assign:
if (entry != NULL) {
- // Add this amount to the related account now
-
- account_xdata_t& xdata(account_xdata(*xact->account));
-
- if (xact->amount) {
- xdata.value += xact->amount;
- DEBUG_PRINT("ledger.textual.parse", "line " << linenum << ": " <<
- "XACT assign: account total = " << xdata.value);
- }
-
// Parse the optional assigned (= AMOUNT)
if (in.good() && ! in.eof()) {
@@ -327,6 +317,13 @@ parse_assign:
unsigned long end = (long)in.tellg();
+ account_xdata_t& xdata(account_xdata(*xact->account));
+
+ DEBUG_PRINT("ledger.xact.assign",
+ "account balance = " << xdata.value);
+ DEBUG_PRINT("ledger.xact.assign",
+ "xact amount = " << amt);
+
amount_t diff;
if (xdata.value.type == value_t::AMOUNT)
diff = amt - *((amount_t *) xdata.value.data);
@@ -337,6 +334,9 @@ parse_assign:
else
diff = amt;
+ DEBUG_PRINT("ledger.xact.assign",
+ "diff = " << diff);
+
DEBUG_PRINT("ledger.textual.parse", "line " << linenum << ": " <<
"XACT assign: diff = " << diff);