summaryrefslogtreecommitdiff
path: root/parse.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2003-09-30 20:18:52 +0000
committerJohn Wiegley <johnw@newartisans.com>2003-09-30 20:18:52 +0000
commit487ea6a2171ec70b8ee0ff147a44abb6d89679dc (patch)
treea13fbc20b475c75fafe345b0bb29dd266c866b35 /parse.cc
parentf6c2e3d51eb8cd0892e5beeae59b74f12d14c027 (diff)
downloadfork-ledger-487ea6a2171ec70b8ee0ff147a44abb6d89679dc.tar.gz
fork-ledger-487ea6a2171ec70b8ee0ff147a44abb6d89679dc.tar.bz2
fork-ledger-487ea6a2171ec70b8ee0ff147a44abb6d89679dc.zip
*** empty log message ***
Diffstat (limited to 'parse.cc')
-rw-r--r--parse.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/parse.cc b/parse.cc
index cfca3b5f..3a6430bb 100644
--- a/parse.cc
+++ b/parse.cc
@@ -10,6 +10,11 @@ static char * next_element(char * buf, bool variable = false)
{
char * p;
+ // Convert any tabs to spaces, for simplicity's sake
+ for (p = buf; *p; p++)
+ if (*p == '\t')
+ *p = ' ';
+
if (variable)
p = std::strstr(buf, " ");
else
@@ -226,6 +231,8 @@ bool parse_ledger(std::istream& in)
#endif
xact->acct = find_account(p);
+ xact->acct->balance.credit(xact->cost);
+
curr->xacts.push_back(xact);
#ifdef HUQUQULLAH