summaryrefslogtreecommitdiff
path: root/textual.cc
diff options
context:
space:
mode:
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);
}