summaryrefslogtreecommitdiff
path: root/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-29 21:05:08 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-29 21:05:08 -0400
commit42e1d725aa9deb41396ba4c73c8499c7c3798508 (patch)
tree709aded6962addc668a127a0392aec739d74f750 /textual.cc
parentea27d1b45a5ff975a1e90e3e9f4b74ff8d34056e (diff)
downloadledger-42e1d725aa9deb41396ba4c73c8499c7c3798508.tar.gz
ledger-42e1d725aa9deb41396ba4c73c8499c7c3798508.tar.bz2
ledger-42e1d725aa9deb41396ba4c73c8499c7c3798508.zip
The next value expression scheme is working, but the individual accessor
functions for each of the journal objects has yet to be ported.
Diffstat (limited to 'textual.cc')
-rw-r--r--textual.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/textual.cc b/textual.cc
index 61fe66db..37c03c06 100644
--- a/textual.cc
+++ b/textual.cc
@@ -291,7 +291,10 @@ xact_t * parse_xact(char * line, account_t * account,
account_xdata_t& xdata(account_xdata(*xact->account));
if (xact->amount) {
- xdata.value += xact->amount;
+ 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);
}